SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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.
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!
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.