[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Problem scrolling back in runlevel 2. Etch netinst



On Sat, Aug 23, 2008 at 04:56:10PM +0200, Nigel Henry wrote:
> When working in runlevel 2, as with my Etch netinst, I'm unable to scroll 
> back. for example I run lsmod, but only see what's on the screen, which is 
> the tail end of lsmod.

You can only scroll back if you have not moved to a different virtual
console (and back). Specifically, an X server would be in a different
virtual console.

> 
> Now there must be some sort of basic window drawing ability, because nano 
> works ok. Is there some similar app that I can start in runlevel 2 that I can 
> use like a CLI, Konsole, for example, that I normally use when I have access 
> to KDE's Desktop?

Note here a small difference between the Linux virtual console and most
X terminals:

Most X terminals maintain an "alternate screen". When you run nano, vi
and most other full-screen programs, they will switch to the other
screen buffer temporarily. Thus it does not mess the current buffer of
your console. You may also notice that sometimes when you start an
editor, you get a glimpse of the previous editing session (as it is
still in the alternate screen buffer.

The Linux virtual console does not support this. Hence starting nano
may erase a screenfull of your scroll-back buffer.

An interesting tool to look at is 'screen'. Scrolling in it is a bit
unintuituve (get into copy mode with ctrl-a-Esc), but will actually 
work in the console.

> 
> I'm installing KDE, and the X window system at the moment, and usually with 
> big installs, updates, etc, I save the Konsole history to my /home/user 
> directory, suitably date stamped, and in my History-files dir. It's nice to 
> be able to save the history like this, as it's easy to look back to when the 
> system was last updated for example, and see just whick packages were 
> installed, and any other stuff that was printed out while doing the updates.

screen can also record history (ctrl-a h)

Likewise look into the 'history' command in your shell:

  history >> ~/useful_history
  vi ~/useful_history # to clear irrelevant stuff

And finally, you can run some commands in a 'script' session:

  script log_file
  # starts a shell . do what you need to do there
  exit # to exit the subshell and return to your original session
  vi log_file

-- 
Tzafrir Cohen         | tzafrir@jabber.org | VIM is
http://tzafrir.org.il |                    | a Mutt's
tzafrir@cohens.org.il |                    |  best
ICQ# 16849754         |                    | friend


Reply to: