what is it called when programs operate like man?

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

what is it called when programs operate like man?

#1 Post by disciple »

Does anyone know if there is a term to describe what programs like `man` do, where they take over your terminal to display stuff without printing to stdout, so when they are finished/exited the stuff disappears?

Thanks.
Last edited by disciple on Sun 01 Sep 2013, 00:38, edited 1 time in total.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#2 Post by amigo »

I suspect most are just 'clearing' the screen -by printf-ing the 'clear screen character'. Others, like fsck don't clear the whole screen, but clear a single line each time the output updates and when the program finishes.

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#3 Post by disciple »

amigo wrote:I suspect most are just 'clearing' the screen -by printf-ing the 'clear screen character'.
Like pressing Ctrl-L ?
That's quite different from what man or less does, as you can scroll up to see the output afterwards.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

Ibidem
Posts: 549
Joined: Wed 26 May 2010, 03:31
Location: State of Jefferson

#4 Post by Ibidem »

I think that's a terminal emulator feature, called alternate screen switching or something like that. Basically, when a "full-screen" terminal program starts, the terminal emulator switches the buffers around; when the program exits, the terminal emulator switches it back to the main screen buffer.
In xterm, you can ctrl+middleclick to select/unselect this feature.
If you run the programs in the Linux console, you don't have alternate screen switching.

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#5 Post by technosaurus »

Those programs are in "raw mode", a bit of info is here:
http://www.tldp.org/HOWTO/Text-Terminal ... ormal_exit
but no code - I think dialog does the same thing (maybe all curses programs?)
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
Ted Dog
Posts: 3965
Joined: Wed 14 Sep 2005, 02:35
Location: Heart of Texas

#6 Post by Ted Dog »

clear command as the last statement in a script.

jamesbond
Posts: 3433
Joined: Mon 26 Feb 2007, 05:02
Location: The Blue Marble

#7 Post by jamesbond »

Ibidem wrote:I think that's a terminal emulator feature, called alternate screen switching or something like that. Basically, when a "full-screen" terminal program starts, the terminal emulator switches the buffers around; when the program exits, the terminal emulator switches it back to the main screen buffer.
In xterm, you can ctrl+middleclick to select/unselect this feature.
If you run the programs in the Linux console, you don't have alternate screen switching.
Bingo!
http://invisible-island.net/xterm/ctlse ... n%20Buffer

You can use "tput smcup" to activate the alternate buffer, and "tput rmcup" to return to the original buffer. As Ibidem said - it won't work on linux console itself because the capability isn't supported, but on xterm and urxvt it works well.
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#8 Post by disciple »

Ah, thanks.
So here's someone circumventing it ;)
https://blogs.oracle.com/samf/entry/smcup_rmcup_hate
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

jamesbond
Posts: 3433
Joined: Mon 26 Feb 2007, 05:02
Location: The Blue Marble

#9 Post by jamesbond »

disciple wrote:Ah, thanks.
So here's someone circumventing it ;)
https://blogs.oracle.com/samf/entry/smcup_rmcup_hate
Haven't he heard of "screen" or "tmux" (or, how about opening multiple xterm windows)?
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]

Ibidem
Posts: 549
Joined: Wed 26 May 2010, 03:31
Location: State of Jefferson

#10 Post by Ibidem »

jamesbond wrote:
disciple wrote:Ah, thanks.
So here's someone circumventing it ;)
https://blogs.oracle.com/samf/entry/smcup_rmcup_hate
Haven't he heard of "screen" or "tmux" (or, how about opening multiple xterm windows)?
Or Ctrl+Middleclick?
(For xterm, there are menus. You just have to press Ctrl while you click.)

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#11 Post by disciple »

He probably thinks this is nice and simple compared to them.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

Post Reply