LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-25-2017, 03:38 PM   #1
cristian.barbarosie
LQ Newbie
 
Registered: Jan 2017
Location: Portugal
Distribution: archlinux
Posts: 17

Rep: Reputation: Disabled
split console like an open book


Hello everybody,
This is a crazy question, but craziness is welcome in linux forums - isn't it ?
I work a lot in console (no X windows), mostly for viewing and editing program files. My laptop has a rather wide screen, which means I see a few lines of code on the leftnbut the right half of the screen is almost useless. I would like to make a better use of the right half of the screen.
But I don't want two consoles. I want only one virtual console, double the height of the screen, half the width of the screen, cut in half, its upper half displayed in the left half of the screen, its lower half displayed in the right half of the screen. Like an open book, you see ?
I know there are several solutions for splitting the console (terminal multiplexers), e.g. screen or tmux. I haven't studied them in full detail, but I have the feeling they don't do the "book" trick - do they ?
Any suggestions ?
Thanks a lot
Cristian Barbarosie

Last edited by cristian.barbarosie; 01-26-2017 at 01:24 PM. Reason: switched left and right - must have been very tired when I wrote this
 
Old 01-25-2017, 04:49 PM   #2
killingthemonkey
Member
 
Registered: Mar 2011
Location: Winston-Salem, NC
Distribution: Fedora, CentOS, Linux Mint
Posts: 207

Rep: Reputation: 20
Cristian,
I like Terminator. It will do exactly what you're asking. Boot to your desktop. Open Terminator. One keystroke later, you have a second Console Tab.

Doug

Note: You can have multiple tabs. Not just two.

Quote:
Originally Posted by cristian.barbarosie View Post
Hello everybody,
This is a crazy question, but crazyness is welcome in linux forums - isn't it ?
I work a lot in console (no X windows), mostly for viewing and editing program files. My laptop has a rather wide screen, which means I see a few lines of code but the left half of the screen is almost useless. I would like to make a better use of the left half of the screen.
But I don't want two consoles. I want only one virtual console, double the height of the screen, half the width of the screen, cut in half, its upper half displayed in the right half of the screen, its lower half displayed in the left half of the screen. Like a book, you see ?
I know there are several solutions for splitting the console (terminal multiplexers), e.g. screen or tmux. I haven't studied them in full detail, but I have the feeling they don't do the "book" trick - do they ?
Any suggestions ?
Thanks a lot
Cristian Barbarosie
 
Old 01-25-2017, 05:05 PM   #3
cristian.barbarosie
LQ Newbie
 
Registered: Jan 2017
Location: Portugal
Distribution: archlinux
Posts: 17

Original Poster
Rep: Reputation: Disabled
Terminator works under X windows, right ? I am interested in text-only mode.
You refer "one keystroke". This is not helpful. Please specify, which keystroke ?
You refer "a second console", but I don't want two consoles. I want the same console to begin in the left half of the screen and to continue on the right half of the screen, like a book.

Quote:
Originally Posted by killingthemonkey View Post
Cristian,
I like Terminator. It will do exactly what you're asking. Boot to your desktop. Open Terminator. One keystroke later, you have a second Console Tab.

Doug

Note: You can have multiple tabs. Not just two.
 
Old 01-25-2017, 05:08 PM   #4
goumba
Senior Member
 
Registered: Dec 2009
Location: New Jersey, USA
Distribution: Current: Debian and OpenSUSE. Past: Arch, RedHat (pre-RHEL). FreeBSD & OpenBSD novice, Hackintosh
Posts: 1,193
Blog Entries: 7

Rep: Reputation: 336Reputation: 336Reputation: 336Reputation: 336
Quote:
Originally Posted by cristian.barbarosie View Post
Terminator works under X windows, right ? I am interested in text-only mode.
You refer "one keystroke". This is not helpful. Please specify, which keystroke ?
You refer "a second console", but I don't want two consoles. I want the same console to begin in the left half of the screen and to continue on the right half of the screen, like a book.
GNU screen or tmux are exactly what you want. Check your distro's repositories. See which works better for you.

https://www.gnu.org/software/screen/
https://tmux.github.io/
 
Old 01-25-2017, 05:17 PM   #5
cristian.barbarosie
LQ Newbie
 
Registered: Jan 2017
Location: Portugal
Distribution: archlinux
Posts: 17

Original Poster
Rep: Reputation: Disabled
Are you sure screen or tmux provide this feature of one console beginning on the left half of my screen, the same console continuing on the right half ? I don't seem to find anything like it in the docs. Could you please point to the specific keystroke or manual section ?

Quote:
Originally Posted by goumba View Post
GNU screen or tmux are exactly what you want. Check your distro's repositories. See which works better for you.

https://www.gnu.org/software/screen/
https://tmux.github.io/

Last edited by cristian.barbarosie; 01-25-2017 at 05:46 PM.
 
Old 01-25-2017, 05:34 PM   #6
goumba
Senior Member
 
Registered: Dec 2009
Location: New Jersey, USA
Distribution: Current: Debian and OpenSUSE. Past: Arch, RedHat (pre-RHEL). FreeBSD & OpenBSD novice, Hackintosh
Posts: 1,193
Blog Entries: 7

Rep: Reputation: 336Reputation: 336Reputation: 336Reputation: 336
http://lukaszwrobel.pl/blog/tmux-tut...windows-easily

First hit Googling "split screen vertical tmux".
 
Old 01-25-2017, 07:41 PM   #7
cristian.barbarosie
LQ Newbie
 
Registered: Jan 2017
Location: Portugal
Distribution: archlinux
Posts: 17

Original Poster
Rep: Reputation: Disabled
A terminal multiplexer like screen or tmux makes it possible to run two independent shells, one in each half of my screen. I only want one shell.
Let's talk poetry. Using tmux is like reading two different poems at the same time. What I want is to read one long poem like in a book. The text should begin on the left page and continue on the right page.
When the right-hand-side page scrolls up (e.g. when I give a shell command), I want the left page to scroll too, by the same number of lines. The lines disappearing at the top of the right page should reappear at the bottom of the left page.
If I open a file in emacs for instance, I want to see half of the text in the left side of the screen and half in the right side of the screen.

Quote:
Originally Posted by goumba View Post
http://lukaszwrobel.pl/blog/tmux-tut...windows-easily

First hit Googling "split screen vertical tmux".

Last edited by cristian.barbarosie; 01-26-2017 at 01:28 PM. Reason: tiny typo
 
Old 01-25-2017, 08:36 PM   #8
goumba
Senior Member
 
Registered: Dec 2009
Location: New Jersey, USA
Distribution: Current: Debian and OpenSUSE. Past: Arch, RedHat (pre-RHEL). FreeBSD & OpenBSD novice, Hackintosh
Posts: 1,193
Blog Entries: 7

Rep: Reputation: 336Reputation: 336Reputation: 336Reputation: 336
You're going to have to work with the multiplexers to do what you want, there's no dedicated application to do what you want.
 
Old 01-26-2017, 01:34 AM   #9
cristian.barbarosie
LQ Newbie
 
Registered: Jan 2017
Location: Portugal
Distribution: archlinux
Posts: 17

Original Poster
Rep: Reputation: Disabled
Well, apparently muliplexers just don't do what I want.
So, I guess I'll have to build my own dedicated application. Probably by getting my hands dirty and tweaking the console driver.
Anyway, thank you for answering.
Cristian Barbarosie

Quote:
Originally Posted by goumba View Post
You're going to have to work with the multiplexers to do what you want, there's no dedicated application to do what you want.
 
Old 01-26-2017, 01:43 AM   #10
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 16,641

Rep: Reputation: 5615Reputation: 5615Reputation: 5615Reputation: 5615Reputation: 5615Reputation: 5615Reputation: 5615Reputation: 5615Reputation: 5615Reputation: 5615Reputation: 5615
Quote:
Originally Posted by cristian.barbarosie View Post
So, I guess I'll have to build my own dedicated application. Probably by getting my hands dirty and tweaking the console driver.
Yes, you are right. I do not think this is already available, but you may have luck.
Anyway, you do not need to write a driver but a terminal emulator (or something similar) which can display the content of your terminal in two columns.
 
1 members found this post helpful.
Old 01-26-2017, 02:55 PM   #11
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 17,426
Blog Entries: 10

Rep: Reputation: 5249Reputation: 5249Reputation: 5249Reputation: 5249Reputation: 5249Reputation: 5249Reputation: 5249Reputation: 5249Reputation: 5249Reputation: 5249Reputation: 5249
https://www.linuxquestions.org/quest...ok-4175598298/
 
Old 01-27-2017, 10:53 AM   #12
cristian.barbarosie
LQ Newbie
 
Registered: Jan 2017
Location: Portugal
Distribution: archlinux
Posts: 17

Original Poster
Rep: Reputation: Disabled
Smile update

The application tcvt does what I want.
See also this thread at Linux-kernel (as already referred by ondoho)
 
Old 02-01-2017, 04:47 AM   #13
cristian.barbarosie
LQ Newbie
 
Registered: Jan 2017
Location: Portugal
Distribution: archlinux
Posts: 17

Original Poster
Rep: Reputation: Disabled
Post update

tcvt is buggy. In emacs, it sometimes displays pieces of text totally out of their place.

However, emacs itself has a feature called follow-mode which does exactly what I wanted !

Apparently, vim can do it, too.
 
Old 04-07-2017, 09:22 PM   #14
cristian.barbarosie
LQ Newbie
 
Registered: Jan 2017
Location: Portugal
Distribution: archlinux
Posts: 17

Original Poster
Rep: Reputation: Disabled
Post update

follow-mode in emacs works very well, but is somewhat slow. At least, on my old laptop I really notice increased latency, compared with emacs with follow-mode disabled. The cursor is less responsive, as well as text selection highlighting.
 
  


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
LXer: How to split a large archive*file into multiple small files using Split command in Linux LXer Syndicated Linux News 0 11-07-2016 05:20 PM
How to split a file using 'split ' without destroying lines? CaptainDerp Linux - Software 6 09-20-2016 04:08 AM
package management (to split or not to split packages) frischi Linux - Desktop 2 05-06-2010 03:15 PM
console split in half on Kubuntu 6.10 sikofitt Linux - Software 2 03-27-2007 02:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:19 PM.

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