View previous topic :: View next topic |
Author |
Message |
Gherald2 Guru
Joined: 02 Jul 2003 Posts: 326 Location: Madison, WI USA
|
Posted: Wed Jul 07, 2004 1:55 am Post subject: Access the console from within X Windows and/or with ssh |
|
|
Version 0.2
I trust you have heard of "screen". It is a wonderful porgram, but it can be tedious to remember to start it every time you log in.
Furthermore, using reconnect commands like "screen -ls" and "screen -dr" quickly becomes redundant.
This is a tip to make cloning your Alt+F# virtual terminal/consoles easy!
First, make certain you have screen installed properly:
Code: | emerge screen -a
chmod u+s /usr/bin/screen #set uid root
chmod go-w /var/run/screen |
Then, append the following lines to /etc/profile:
Code: | alias vc1="screen -x vc-1"
alias vc2="screen -x vc-2"
alias vc3="screen -x vc-3"
alias vc4="screen -x vc-4"
alias vc5="screen -x vc-5"
alias vc6="screen -x vc-6"
#automatically start screen if we are a virtual console
if [ `tty | grep vc` ]; then screen; logout; fi
#any commands such as "fortune" that print messages after login should be placed here, after screen. |
Now whenever you:
1) ssh to your box and want to access a console program you left running
or 2) are in X and don't want to Ctrl+Alt+F# out of it
...simply run "vc#" and whallaaaa... how cool is that?
Last edited by Gherald2 on Thu Jul 08, 2004 10:13 pm; edited 1 time in total |
|
Back to top |
|
|
Milez Tux's lil' helper
Joined: 21 Aug 2002 Posts: 116 Location: Atlanta, GA
|
Posted: Wed Jul 07, 2004 2:10 am Post subject: |
|
|
Dude, I love this trick. Nice combination. Don't you just love how unix allows you to be creative in setting up your system? _________________ -=Miles Stoudenmire=-
Adopt a post initiative |
|
Back to top |
|
|
Gherald2 Guru
Joined: 02 Jul 2003 Posts: 326 Location: Madison, WI USA
|
Posted: Thu Jul 08, 2004 10:16 pm Post subject: |
|
|
Yep!
Tip updated to v0.2 on July 8, 2004:
- added logout invocation so screen behaves like a regular login session
- explained where commands should go that print text after login
- other minor edits |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|