LinuxQuestions.org
Visit Jeremy's Blog.
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 01-30-2017, 12:31 PM   #1
MrMeeSeeks
Member
 
Registered: Jan 2017
Posts: 32

Rep: Reputation: Disabled
minor question - scrolling in terminal


Heyo,
so scrolling in terminal is all good and well, especially since I realized most commands are quite similiar to those used in emacs.
However, I find it quite unnerving to not see the command line while scrolling and have the view always jump to the bottom when starting to type.
I don't quite know what program to attribute this problem to, but I guess it would be xterm?! If not, using bash and KDE here.
So 'man xterm' had a line
" +sk This option indicates that pressing a key while using the scrollbar should not cause the window to be repositioned."
in it, and I started 'xterm +sk' from terminal but apart from looking horrific and no longer accepting <shift-page-(u|d)> for scrolling and instead printing an "H", the new xterm also didn't do what that text had me think it would: view still jumped down when typing.

Okay, as you can see, I am thoroughly confused by now. Google didn't really help, as it seems "beginners guide to scrolling" has been beneath everyones dignity so far. Well, not mine it appears.
So if you could tell me where I can read up on this - comprehensively - or help me out with quick fixes I'd be delighted.
 
Old 01-30-2017, 01:03 PM   #2
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,983

Rep: Reputation: 3182Reputation: 3182Reputation: 3182Reputation: 3182Reputation: 3182Reputation: 3182Reputation: 3182Reputation: 3182Reputation: 3182Reputation: 3182Reputation: 3182
I am not sure I follow your question

Are you wanting the prompt to remain visible whilst scrolling?? If so the prompt would need to be in an alternate window / portion of the window. The reason it jumps back to the prompt when typing would be because most people would probably need to know what they are typing.

I could be wrong, but personally have not seen a terminal that has this capability. If you are not able to use the history feature in bash to get to the information you need to see in the terminal,
may I suggest you simply open a second terminal so you can keep the information you want to see available or if it is output from a command, you could always redirect it to a file so you could
review that to then be used later.

If I have misunderstood your requirement, please explain a little more
 
Old 01-30-2017, 01:14 PM   #3
MrMeeSeeks
Member
 
Registered: Jan 2017
Posts: 32

Original Poster
Rep: Reputation: Disabled
Well that would certainly be an option, but seems pretty inconvenient to me, especially since I might not always have separate windows or multiple displays.

The point is, I don't need to keep track of my input, but have large outputs that I need to scroll through while typing to the prompt - to use info from it etc.

So what I'd basically like is indeed to have some sort of a separation between the prompt and the rest of the "window", kind of like the buffer in emacs; I'll try and illustrate:
1) Coming from here:
# f
# g
# h
# i
# j
----
/bla@bla:/direc/foo/bar$ some-unfinished-command

2) Going here, without having either the prompt disappear scrolling up and neither have the view jump back to 1) when typing to the prompt.
# d
# e
# f
# g
# h
----
/bla@bla:/direc/foo/bar$ same-unfinished-command but some more typing here


Hope that helped to clarify.

Last edited by MrMeeSeeks; 01-30-2017 at 01:40 PM.
 
Old 01-31-2017, 02:18 AM   #4
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Perhaps this might help you: input and output in separate terminal emulator windows:

http://stackoverflow.com/questions/1...nd-output-area
 
Old 01-31-2017, 02:47 AM   #5
aragorn2101
Member
 
Registered: Dec 2012
Location: Mauritius
Distribution: Slackware
Posts: 567

Rep: Reputation: 301Reputation: 301Reputation: 301Reputation: 301
Hi,

I use KDE and it is very easy to do that. In my konsole terminal there is Ctrl+( and Ctrl+) to split the screen vertically and horizontally respectively.

I can split the screen and then scroll wherever I want in the top screen, then I select the bottom screen and start typing there. The top screen remains fixed at the scrolled position. Screenshot: Click image for larger version

Name:	Konsole_split_screen.jpg
Views:	26
Size:	163.8 KB
ID:	24089

Check out the shortcuts of your konsole.
 
Old 01-31-2017, 05:19 AM   #6
MrMeeSeeks
Member
 
Registered: Jan 2017
Posts: 32

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by aragorn2101 View Post
Hi,

I use KDE and it is very easy to do that. In my konsole terminal there is Ctrl+( and Ctrl+) to split the screen vertically and horizontally respectively.

I can split the screen and then scroll wherever I want in the top screen, then I select the bottom screen and start typing there. The top screen remains fixed at the scrolled position. Screenshot: Attachment 24089

Check out the shortcuts of your konsole.
First off, thank you. But I can't seem to make this work, the shortcuts simply do nothing.
However, this would not really solve my problem anyway as far as I understand, since the output to the command in one window would still appear in the same window, thus I'd have to continually switch frames which appears to me to be too much of a hassle.

Quote:
Originally Posted by hydrurga
Perhaps this might help you: input and output in separate terminal emulator windows:

http://stackoverflow.com/questions/1...nd-output-area
That's more like it, but still dependant on a window-system, which I'd really like to avoid.

I can't imagine this could be that difficult ... I just don't know where to start either.

Last edited by MrMeeSeeks; 01-31-2017 at 06:56 AM.
 
Old 01-31-2017, 07:35 AM   #7
aragorn2101
Member
 
Registered: Dec 2012
Location: Mauritius
Distribution: Slackware
Posts: 567

Rep: Reputation: 301Reputation: 301Reputation: 301Reputation: 301
Quote:
Originally Posted by MrMeeSeeks View Post
First off, thank you. But I can't seem to make this work, the shortcuts simply do nothing.
However, this would not really solve my problem anyway as far as I understand, since the output to the command in one window would still appear in the same window, thus I'd have to continually switch frames which appears to me to be too much of a hassle.
Concerning the konsole, I think you can configure the shortcuts in order to make it work. But, if this is inappropriate for you, then I will suggest a terminal multiplexer like tmux. Try to see if it is installed on your system. When you have it, you can run
Code:
tmux new-session \; split-window -v \; resize-pane -D 20 \; setw synchronize-panes on
Screenshot: Click image for larger version

Name:	tmux_split_screen.jpg
Views:	23
Size:	124.0 KB
ID:	24090

But you'll have to learn a few things in order to use it. It's not as straightforward. Check this out: http://linuxcommand.org/lc3_adv_termmux.php

For example, you use Ctrl+b and arrow keys to move between panes and in order to scroll up or down, you need to use Ctrl+b+[ and then the arrow keys or PgUp/PgDown.
 
1 members found this post helpful.
Old 01-31-2017, 07:47 AM   #8
MrMeeSeeks
Member
 
Registered: Jan 2017
Posts: 32

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by aragorn2101 View Post
Concerning the konsole, I think you can configure the shortcuts in order to make it work. But, if this is inappropriate for you, then I will suggest a terminal multiplexer like tmux. Try to see if it is installed on your system. When you have it, you can run
Code:
tmux new-session \; split-window -v \; resize-pane -D 20 \; setw synchronize-panes on
Screenshot: Attachment 24090

But you'll have to learn a few things in order to use it. It's not as straightforward. Check this out: http://linuxcommand.org/lc3_adv_termmux.php

For example, you use Ctrl+b and arrow keys to move between panes and in order to scroll up or down, you need to use Ctrl+b+[ and then the arrow keys or PgUp/PgDown.
Hey, that appears to be quite a workable solution for now. Thanks a lot mate.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Troubleshoot wvdial . Terminal Procedures and Scrolling through Terminal Lines theKbStockpiler Linux - General 7 01-27-2012 06:44 PM
[SOLVED] Is there a way to stop command output to continue scrolling down the terminal uriha Linux - General 4 01-06-2011 02:38 AM
scrolling in terminal using vim, less, and more deuberger Linux - Software 2 09-30-2010 10:16 AM
scrolling / pageup in terminal briemac Linux - General 4 01-17-2007 04:26 PM
Scrolling command line terminal FlashAsh99 Linux - Newbie 3 06-27-2005 10:02 AM

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

All times are GMT -5. The time now is 04:28 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