DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 26th September 2008
18Googol2's Avatar
18Googol2 18Googol2 is offline
Real Name: whoami
Spam Deminer
 
Join Date: Apr 2008
Location: pwd
Posts: 283
Thanked 20 Times in 18 Posts
Default Terminal display behavior

I couldnt think of good key words to google, so I thought I should seek help here

The terminal Im using atm is Gnome-terminal in FreeBSD. I notice those differences:

1. Man page display

FreeBSD:



Linux:



I really like the way how man page displayed in linux, because I can read more with less interaction. 1-0 for linux . How can I config this in FreeBSD?

2. VIM

FreeBSD:



Linux:



If I finish vim session, the file content can be displayed by scrolling up in FreeBSD. However, in Linux, the content is gone . Equalizer for FreeBSD, 1-1

Im a bit confused, I thought the display is independent of OS, and it is a job of the terminal?
__________________
The power of plain text? It can control an entire OS
Reply With Quote
  #2   (View Single Post)  
Old 26th September 2008
richardpl richardpl is offline
Spam Deminer
 
Join Date: May 2008
Location: Croatia
Posts: 284
Thanked 25 Times in 24 Posts
Default

1. Explain a little bit more.
Does linux use same $PAGER as FreeBSD?

2. Read ":h xterm-save-screen" in vim
Reply With Quote
  #3   (View Single Post)  
Old 26th September 2008
18Googol2's Avatar
18Googol2 18Googol2 is offline
Real Name: whoami
Spam Deminer
 
Join Date: Apr 2008
Location: pwd
Posts: 283
Thanked 20 Times in 18 Posts
Default

Quote:
Originally Posted by richardpl View Post
1. Explain a little bit more.
Does linux use same $PAGER as FreeBSD?

2. Read ":h xterm-save-screen" in vim
Thank you, problem number 2 solved . Here is the solution for anyone interested:

Add this line to editor startup file (.vimrc for vim or .exrc for vi)

Code:
set t_ti= t_te=
1. The display width isnt the same. Its wider in Linux. Both linux and FreeBSD have no PAGER variable set. Also, setting it to less or more doesnt make any difference :S
__________________
The power of plain text? It can control an entire OS
Reply With Quote
  #4   (View Single Post)  
Old 26th September 2008
jb_daefo jb_daefo is offline
Package Pilot
 
Join Date: May 2008
Posts: 196
Thanked 5 Times in 5 Posts
Default

alias man='env PAGER=lookat man $1'
................
I've set that in .zshrc. Don't know how to do it in other shells really,
but /lookat/ is super for man pages :
s-- search
q-- exit
t -- top of page
b -- bottom
[number] -- go to line
and its default color is more readable, here at least.
................
__________________
using /LOOKAT/ with /var/db/pkg files and portmaster/aliases/pipes/find/grep to meteorically speedup port upgrades/installs...
Reply With Quote
  #5   (View Single Post)  
Old 26th September 2008
18Googol2's Avatar
18Googol2 18Googol2 is offline
Real Name: whoami
Spam Deminer
 
Join Date: Apr 2008
Location: pwd
Posts: 283
Thanked 20 Times in 18 Posts
Default

Im happy with black and white color man page. The problem properly because man page format in FreeBSD differs from Linux? This is how the raw man file looks like with vim, in FreeBSD:

vim /usr/share/man/cat8/ifconfig.8.gz

__________________
The power of plain text? It can control an entire OS
Reply With Quote
  #6   (View Single Post)  
Old 26th September 2008
richardpl richardpl is offline
Spam Deminer
 
Join Date: May 2008
Location: Croatia
Posts: 284
Thanked 25 Times in 24 Posts
Default

Linux does things differently. It use width of terminal when creating manual page output via troff to be viewed in PAGER.
It may be something different in man itself or in groff macro package (man on freebsd use mdoc).

What happens when you resize terminal on linux when viewing man pages?
Reply With Quote
  #7   (View Single Post)  
Old 26th September 2008
18Googol2's Avatar
18Googol2 18Googol2 is offline
Real Name: whoami
Spam Deminer
 
Join Date: Apr 2008
Location: pwd
Posts: 283
Thanked 20 Times in 18 Posts
Default

Oh, it is auto resized in Linux. Also, I realise the same behavior when viewing man page in Linux. If I finish viewing man page, the content is gone, just like how it happenned with vi. Do you know how to config it?
__________________
The power of plain text? It can control an entire OS
Reply With Quote
  #8   (View Single Post)  
Old 26th September 2008
richardpl richardpl is offline
Spam Deminer
 
Join Date: May 2008
Location: Croatia
Posts: 284
Thanked 25 Times in 24 Posts
Default

No, but look in PAGER how it handles it ... eg. Does less clear screen when displaying every file. Maybe termcap/terminfo on linux is different than on FreeBSD.

Similar experience I have with elinks on xterm on FreeBSD, as fast hack I kill it with Ctrl+\ (this hack also works with linux manual pages ....)
Reply With Quote
  #9   (View Single Post)  
Old 26th September 2008
ephemera's Avatar
ephemera ephemera is offline
Knuth's homeboy
 
Join Date: Apr 2008
Posts: 537
Thanked 49 Times in 43 Posts
Default

1. try this with different term sizes:

$ gzcat /usr/share/man/man1/man1.gz | groff -man -rLL=`tput cols`n -Tascii - | $PAGER
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
HOWTO: Encoding // Pure Terminal // Virtual Terminal vermaden Guides 1 25th June 2010 08:02 AM
netbsd terminal error jaideep_jdof NetBSD General 1 22nd November 2008 12:50 AM
Odd font display TerryP Feedback and Suggestions 4 2nd November 2008 11:22 AM
terminal darken FreeBSD General 8 18th July 2008 07:12 PM
Strange network behavior Weaseal Off-Topic 4 27th May 2008 05:34 PM


All times are GMT. The time now is 07:09 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick