LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-21-2011, 08:52 AM   #1
needsleep
Member
 
Registered: Apr 2011
Location: Minneapolis
Distribution: CentOS 7
Posts: 80

Rep: Reputation: 0
using vi, i'd like to be able to scroll back beyond invocation to see O/S work


It seems to me I used to be able to (using HP-UX) run a vi session and be able to scroll back before invocation to see what I had been doing. Often this information pertains to my current vi session. Using CentOS, invoking vi replaces my current window and only exiting vi will restore it. I can also shell out of course. Is there a way to allow the screen to scroll back like the old HP sessions?

Thanks.
 
Old 08-21-2011, 11:59 AM   #2
bmarx
Member
 
Registered: Dec 2004
Distribution: Slackware, Arch, FreeBSD
Posts: 202

Rep: Reputation: 34
Sounds like the command "screen" may be your answer.
 
Old 08-21-2011, 09:51 PM   #3
needsleep
Member
 
Registered: Apr 2011
Location: Minneapolis
Distribution: CentOS 7
Posts: 80

Original Poster
Rep: Reputation: 0
I didn't think so. I used to use screen to hold a terminal session while I drove home from the office, for example. Package Manager says screen allows me to have multiple logins on the same terminal. I don't think it will actually change the behavior of vi.

What I was looking for, in case my original post was not clear, is that when I vi a file, I start at line 1 of the file, and no matter how long I've been on this session, the vertical scroll bar turns to a solid bar, meaning that I'm at the top of the screen - there are no more lines or screens of data earlier than my vi screen. Now we both know that to get into vi, I must have at least logged in, right? So the former behavior that I seek, was to allow me to see, in this case, the login information and the invocation of vi itself. This is a trival example, but the more general is just as easy to see. Whenever I vi a file, I want to be able to scroll back as many pages before that as my buffer will hold. The vertical scroll bar is not solid, it stays almost the same size as when I first invoked vi.
 
Old 08-21-2011, 10:59 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
I know what you mean, but I can't get google to tell me what you are looking for; I know its do-able(??)
You could try here for a start http://www.computerhope.com/unix/uxterm.htm; might help
 
Old 08-22-2011, 12:08 AM   #5
needsleep
Member
 
Registered: Apr 2011
Location: Minneapolis
Distribution: CentOS 7
Posts: 80

Original Poster
Rep: Reputation: 0
Thanks, but I'm not using Xterm, I'm using gnome-terminal, but you've given me an idea to read the list of options for it.
 
Old 08-22-2011, 12:21 AM   #6
needsleep
Member
 
Registered: Apr 2011
Location: Minneapolis
Distribution: CentOS 7
Posts: 80

Original Poster
Rep: Reputation: 0
There are few options for gnome-terminal compared to X-term. I was able to shut off the bell, which was also bugging me, but I was not able to find an option for a screen scrollback option. I believe it wouldn't have worked for me anyway, because the scrollback works fine if I'm not in vi. It must have something to do with vi, which I will now look at in the man pages.
 
Old 08-22-2011, 12:29 AM   #7
needsleep
Member
 
Registered: Apr 2011
Location: Minneapolis
Distribution: CentOS 7
Posts: 80

Original Poster
Rep: Reputation: 0
Reporting that there are no options in gnome-terminal to alter the behaviour previously described. Thanks all for your thoughts.
 
Old 08-22-2011, 01:25 AM   #8
rob.rice
Senior Member
 
Registered: Apr 2004
Distribution: slack what ever
Posts: 1,076

Rep: Reputation: 205Reputation: 205Reputation: 205
go to a real virtual terminal instead of an emulated one with crtl+alt+F1 log in then try it
 
Old 08-22-2011, 08:13 AM   #9
needsleep
Member
 
Registered: Apr 2011
Location: Minneapolis
Distribution: CentOS 7
Posts: 80

Original Poster
Rep: Reputation: 0
Well, that's very interesting. I am now in a virtual terminal session. I ran vi on a text file while here, but same behavior is experienced. In fact, because I have no scrollback even when I'm not in vi, it's a slightly worse experience.

RTFMing the manual, I read this: "Generally, there is no reason to leave the default console (virtual console #6) for graphical (X-Window) installations unless you are attempting to diagnose installation problems."

Further, during startup, this explains what that 3 second option is to login, before X-Window starts up.

If you run the experiment, hitting CONTROL-ALT-F1 (Note: I'm using CentOS 5.6), to get back to X-Window, type CTRL-ALT-F7. I note that the speed with which I was magically transported to the virtual terminal suggested that I hadn't actually left my X-Window session, and I am grateful today that I found the way back (unsaved work!)
 
Old 08-22-2011, 08:34 AM   #10
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
Well, I don't mean to offend you, but I'm using a win machine to access my servers with TeraTermPRO client software and it does scroll back from VI file (in my case VIM) an I can see all the buffer before editing file. (I hope it helps, if you try with some other client)

good luck...
 
Old 08-22-2011, 08:53 AM   #11
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
Quote:
Originally Posted by needsleep View Post
It seems to me I used to be able to (using HP-UX) run a vi session and be able to scroll back before invocation to see what I had been doing. Often this information pertains to my current vi session. Using CentOS, invoking vi replaces my current window and only exiting vi will restore it. I can also shell out of course. Is there a way to allow the screen to scroll back like the old HP sessions?

Thanks.
I have also noted this difference between HPUX and Centos. Not sure what causes it, but it is very annoying. In fact, in "terminator" which is an emulator, vi will lock me from having ANY scrollback at all until it is terminated. I wonder if there is a bug report, or "new feature" report out there explaining this difference.

Last edited by szboardstretcher; 08-22-2011 at 08:56 AM.
 
Old 08-22-2011, 09:02 AM   #12
needsleep
Member
 
Registered: Apr 2011
Location: Minneapolis
Distribution: CentOS 7
Posts: 80

Original Poster
Rep: Reputation: 0
No offense taken. I'm actually using Win XP for these posts. My current thinking, now that you've reminded me of it, is that I need to use a terminal emulator, like Reflections (or your TeraTermPRO) to connect via telnet(?) to the Linux box. This is the actual environment that I, too, experienced this ability to scroll back during a vi session. So, yeah, I think you hit it on the head.
 
Old 08-22-2011, 07:15 PM   #13
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
This is a lateral thinking/comment, but using Putty to access xterm on Solaris (from Win XP), I can scroll back just fine.
HTH
 
Old 08-23-2011, 12:58 AM   #14
needsleep
Member
 
Registered: Apr 2011
Location: Minneapolis
Distribution: CentOS 7
Posts: 80

Original Poster
Rep: Reputation: 0
Great minds think alike, chrism01. I just downloaded Putty this afternoon. Yet to install. Thanks for the confirmation that I am on the right track.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Viewing code snippets from Dolphin on Android: No option to scroll back and forth. Kenny_Strawn LQ Suggestions & Feedback 6 12-31-2010 01:48 PM
How to make Secire Shell(SSH) scroll back more lines cy163 Linux - Newbie 3 04-11-2009 10:01 AM
Debian - BitchX IRC - Console - Scroll back buffer? critical Linux - Software 0 02-15-2005 05:10 PM
Scroll feature in Logitech Scroll mouse does not work ssmaitra Linux - Hardware 6 11-11-2003 07:43 AM
scroll on mouse can't work phatish Linux - Newbie 9 09-05-2003 12:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration