LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-23-2004, 11:53 AM   #1
marlor
Member
 
Registered: May 2004
Distribution: Slackware C
Posts: 274

Rep: Reputation: 30
console having several "desktops"


hi people,

is there a way in console mode to have different "desktops". what i mean is, in windows managers you can switch between the desktops (usually 4 or 6) and run different apps. but i have no idea how to do it in colsole. to run something, i use tty1 and if i want to do something else at the same time i also have to login in tty2.

is that the way to do it? or is there a simple solution for this? and if there is a command for it how does it work?



thanks in advance
 
Old 07-23-2004, 12:17 PM   #2
ringwraith
Senior Member
 
Registered: Sep 2003
Location: Indiana
Distribution: Slackware 15.0
Posts: 1,272

Rep: Reputation: 65
alt+F1-alt+F6
 
Old 07-23-2004, 12:18 PM   #3
Joseph_M
Member
 
Registered: May 2004
Posts: 71

Rep: Reputation: 15
alt+F2 for second login prompt, alt+F3 for third, alt+F4...
 
Old 07-23-2004, 12:22 PM   #4
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
I am able to change ttys with the 'windows logo' keys on my keyboard
 
Old 07-23-2004, 12:24 PM   #5
marlor
Member
 
Registered: May 2004
Distribution: Slackware C
Posts: 274

Original Poster
Rep: Reputation: 30
thx for the replies but ...

if you read my post above you will see that i know that already & it is not what i mean.

for what you say i have to login on every screen. is there not a way to login once and still be able to use different "desktops"


thanks
 
Old 07-23-2004, 01:17 PM   #6
shilo
Senior Member
 
Registered: Nov 2002
Location: Stockton, CA
Distribution: Slackware 11 - kernel 2.6.19.1 - Dropline Gnome 2.16.2
Posts: 1,132

Rep: Reputation: 50
I don't know if this helps, but the & symbol sends something to the background. For example, if I want to manually update my search databas, I would type "updatedb". The problem is that my console is now tied up for a bit. What you can type instead is "updatedb&". This will start the program in the background, leaving the console open to do other things.
 
Old 07-23-2004, 01:36 PM   #7
Mephisto
Member
 
Registered: Oct 2002
Location: Washington D.C, USA
Distribution: Slack 12, Etch, Gutsy
Posts: 453

Rep: Reputation: 31
try screen. "man screen" for more info.
 
Old 07-23-2004, 06:05 PM   #8
Vincent_Vega
Member
 
Registered: Nov 2003
Location: South Jersey
Distribution: Slackware, Raspbian, Manjaro
Posts: 826

Rep: Reputation: 31
Maybe what you want to do is what Shilo recommends. You can also use Ctrl-Z to send a running process to the background.
Use 'bg' to see what's in the backgroung.
Use 'fg' to bring something to the foreground.
If you have several background processes you can list them with 'jobs' and then use the corresponding job # to pinpoint the one you want, e.g., fg %3
would bring job #3 to the foreground.
Other than that, I don't know if you can do what you're asking but that's what these commands are meant to do. Try 'em out!
 
Old 07-23-2004, 06:42 PM   #9
Genesee
Member
 
Registered: Dec 2002
Distribution: Slackware
Posts: 927

Rep: Reputation: 30
Quote:
Originally posted by Mephisto
try screen. "man screen" for more info.
exactly - check out screen, its a very cool prog...

what vincent suggested will work as well, depending on what you want to do

 
Old 07-23-2004, 07:35 PM   #10
Mephisto
Member
 
Registered: Oct 2002
Location: Washington D.C, USA
Distribution: Slack 12, Etch, Gutsy
Posts: 453

Rep: Reputation: 31
I am a little bored tonight (sad isn't it?) so I thought I would write up a quick screen explanation.

First, what a screen does is it creates multiplexes a terminal across multiple processes. What that allows you to do is have multiple shells open at the same time, and even detach the shells from a terminal and reconnect them on a different one.

1. To start create a term window (xterm, aterm, ssh somewhere, or login to a TTY, etc...) and type "screen", you are now in a screen terminal.
2. Type a command, any command say "ls" just so we have something in the screen.
3. Type "<ctrl>a <ctrl>c" this will spawn a new terminal in screen in here do a different command
4. Type "<ctrl>a <ctrl>c" again and you will spawn a third window, etc ad anuseum

now we have multiple screens, so how do you navigate? Glad you asked:
"<ctrl>a #" such as "<ctrl>a 0" will send you to that screen. screen numbering starts at 0.
"<ctrl>a A" (note that is a capital A) will allow you to name a particular screen, for example I might name a screen where I am editing bashrc "bashrc"
"<ctrl>a "" (that is control a - double quote) will bring up a list of screens that are available. This is especially useful with <ctrl>a A.


finally "<ctrl>a d" will detach the screen session. this does not close it though. any processes you had are still there. You can logoff the physical terminal, close the xterm, disconnect from ssh, or what have you. The screen will still be there when you connect again.

To reconnect to a detached screen, enter a terminal and type "screen -r" and the screen will be reattached. You can have multiple sets of detached screens and reattach to a specific one. "screen -list" will list all screens. If you do plan on having multiple sets of detached screens then I would suggest starting screen using "screen -S <name>" so that you can reattach to a particular screen instance using "screen -r <name>"

That's about it for the basics. Beyond that I would read the man for screen. Hope that helps.
 
Old 07-24-2004, 12:34 AM   #11
Vincent_Vega
Member
 
Registered: Nov 2003
Location: South Jersey
Distribution: Slackware, Raspbian, Manjaro
Posts: 826

Rep: Reputation: 31
Sounds pretty handy but it's definitely something that will take some getting used to!
 
Old 07-24-2004, 02:42 AM   #12
Mephisto
Member
 
Registered: Oct 2002
Location: Washington D.C, USA
Distribution: Slack 12, Etch, Gutsy
Posts: 453

Rep: Reputation: 31
It has it's uses. For instance Lotus Domino is a server that generates constant output to stdout. You can launch it inside a screen and have it running, then as needed go into a terminal and reattach the screen, do whatever you need to do, then detach it. Very handy for remote administration. I like to run JBoss in the same way when debugging. Another use is to run a make that takes a while, then detach or go to another screen. This is especially useful if you are running make across ssh to a "compile box". SSH in, start the run, detach screen, close ssh, then reconnect through ssh later, reattach screen and see how the compile went.

You can do some of the stuff with background processes and redirection, but i find screen more convenient.
 
Old 07-24-2004, 10:56 AM   #13
Mephisto
Member
 
Registered: Oct 2002
Location: Washington D.C, USA
Distribution: Slack 12, Etch, Gutsy
Posts: 453

Rep: Reputation: 31
Just thought I would share one last use for screen that I came up with while trying to debug my fvwm2rc. From a tty you can call "screen -d -m startx" and it will run startx in a detached screen. Then from the xsession open xterm and type "screen -r" and you have the output of x inside the terminal and dont have to <ctrl><alt><F1> to take a look at the output.

Last edited by Mephisto; 07-24-2004 at 10:58 AM.
 
  


Reply



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
bash script: using "select" to show multi-word options? (like "option 1"/"o zidane_tribal Programming 7 12-19-2015 01:03 AM
what is "sticky bit mode" , "SUID" , "SGID" augustus123 Linux - General 10 08-03-2012 04:40 AM
Telling people to use "Google," to "RTFM," or "Use the search feature" Ausar General 77 03-21-2010 11:26 AM
"Xlib: extension "XFree86-DRI" missing on display ":0.0"." zaps Linux - Games 9 05-14-2007 03:07 PM
FC4 not booting w/ message "ERROR opening /dev/console!!!!: 20" Dimension User Fedora 5 10-24-2005 05:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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