LinuxQuestions.org
Visit Jeremy's Blog.
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 05-07-2002, 03:11 PM   #1
vfs
Member
 
Registered: Apr 2002
Location: Brazil
Distribution: Slackware
Posts: 184

Rep: Reputation: 30
[trick] Leave console free for apps while running X


This is good:

startx &

Now you have a free console.

Better:

startx &> /dev/null &

No messages.

Now you can switch console/X session pressing Ctl+Alt+[1-6] and Ctl+Alt+[7<]

Cheers!

vfs.
 
Old 05-07-2002, 03:34 PM   #2
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
yes, if you use the ampersand ( & ) after running a program from the console or command, it runs it in the background.. now do you know how to bring it back ?
 
Old 05-07-2002, 03:56 PM   #3
vfs
Member
 
Registered: Apr 2002
Location: Brazil
Distribution: Slackware
Posts: 184

Original Poster
Rep: Reputation: 30
Uh, tried to fool me?

Just type in:

jobs

look which number is 'startx' then:

fg number

Ta-da!

Try this too:

startx

Now press Ctrl+Z and startx is in the background, leaving the console free...

regards,

vfs.
 
Old 05-07-2002, 04:05 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
well.. the fool worked.. ehh trickykid?

we do know all of these "tips" btw.
 
Old 05-07-2002, 04:15 PM   #5
vfs
Member
 
Registered: Apr 2002
Location: Brazil
Distribution: Slackware
Posts: 184

Original Poster
Rep: Reputation: 30
Ok, I just posted because YOU and YOUR friends must know EVERYTHING about Slackware, but there are lots of newbies in this forum.

I posted for THEM, NOT exactly for YOU, ok?

vfs.
 
Old 05-07-2002, 04:31 PM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
well they are not specific to slackware at all. i'd recommend similar posts go in the "linux - general" forum.
 
Old 05-07-2002, 04:33 PM   #7
vfs
Member
 
Registered: Apr 2002
Location: Brazil
Distribution: Slackware
Posts: 184

Original Poster
Rep: Reputation: 30
Hum... Ok.

Sorry the screams...

vfs.
 
Old 05-08-2002, 10:21 AM   #8
theguide
LQ Newbie
 
Registered: Apr 2002
Location: Utrecht, Netherlands
Distribution: Slackware
Posts: 16

Rep: Reputation: 0
Quote:
Originally posted by vfs
........

Try this too:

startx

Now press Ctrl+Z and startx is in the background, leaving the console free...
eehrm... i think that is not quite correct.
When you press CTRL+Z, startx will not be run in the background. It will be paused (at least the console says 'stopped'). You have to type: 'bg' (background) to unpause startx and to run it in the background. So CTRL+Z is not enough to move your startx into the background.

BTW: if you want to pull startx out of the background, just type 'fg' and it will return to you
 
Old 05-08-2002, 01:38 PM   #9
Rashkae
Member
 
Registered: May 2002
Distribution: Slackware
Posts: 125

Rep: Reputation: 15
Bringing X Back to Forground

The question that begs to be asked is, why would anyone *want* to bring X back to the forground? It's not as though it had any interative feaures. (If I'm wrong about this, someone please enlighten me.)
 
Old 05-08-2002, 06:32 PM   #10
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
well, no particular reason i can think of, maybe you need to ctrl+c it..
 
Old 05-09-2002, 09:01 AM   #11
vfs
Member
 
Registered: Apr 2002
Location: Brazil
Distribution: Slackware
Posts: 184

Original Poster
Rep: Reputation: 30
To theguide:

I think so...

But, at least in my system, when you 'ps ax' you see X with a '?', quite like a daemon. There's no need of 'bg'. I can even log out and X continues running.

I don't know the X internals, but I think related to the server+client arch...

to acid:

Or maybe it could be easier to 'killall xinit' or 'startx'.

vfs.
 
Old 05-09-2002, 09:06 AM   #12
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
well yeah a kill -9 or something would be easier... just a potential reason.
 
Old 05-09-2002, 10:54 AM   #13
SiliconBadger
Member
 
Registered: May 2002
Location: Houston
Distribution: Gentoo
Posts: 32

Rep: Reputation: 15
You have no chance to survive, make your time!

I don't understand the > /dev/null & part of startx &> /dev/null &.

Also, acid_kewpie: why, as a moderator, would you discourage people from posting tips saying, "we do know all of these tips"?... as if everyone who enters this forum already knows all linux tips. I do agree that these particular tips are better posted in the general linux area though. I just don't understand the point of a moderator trying to make people feel dumb for posting something they apparently consider to be elementary. It would stand to reason that a lot of posts on a BBS for questions about a particular topic would involve subjects that the moderators already know in detail. That's one big reason for having moderator status. Anyway...
 
Old 05-09-2002, 11:11 AM   #14
Rashkae
Member
 
Registered: May 2002
Distribution: Slackware
Posts: 125

Rep: Reputation: 15
> /dev/null

/dev/null is a special device that goes... absolutely nowhere, the big bit bucket in the sky. (It's also a great device to use for backups. Guaranteed, backups will go many times faster.).

X outputs all kinds of status messages all the time. This can be useful for debugging when something goes wrong, but would make running X in the background almost useless, because the console is getting bombarded with the status messages. > is used to redicred standard output. In this case, we are redirectiong to /dev/null (quietly disposing of all the data.). Alternatively, you can redirect data to a file to keep a log (or for programs that output to STDOUT and you need to capture it)...
> /somedir/somefile.. Note that as well as STDOUT, there is also STDERR where most programs will send error messages. These are redirected independant of STDOUT with 2>.. for example: startx > /dev/null 2> /somedir/error.log

And finally, you only need one & for the whole thing.

startx > /dev/null &

Last edited by Rashkae; 05-09-2002 at 11:13 AM.
 
Old 05-09-2002, 11:46 AM   #15
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
of course people are perfectly free to post useful tips and such, but, being a continually changing forum, tips and such always sink without trace within a very short period of time. some point last year one guy took it upon himself to write a series of lengthy FAQ's that were quite good actually, but naturally as VERY few members ever use the search features on the site it dissapeared within a day.

In actual fact in a short while a few extra features are gonna be added to the site for tips and tutorials and stuff that will hang around permanently. I'm sure contributions will be welcome.
 
  


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
How to prune a print & file server to leave minimal services running wolfpeach Linux - Security 4 06-29-2004 07:35 AM
leave process running after logoff nakkaya Linux - Software 4 04-09-2004 03:21 AM
Where have all my console apps gone? JordanH Red Hat 2 11-01-2003 10:14 PM
X apps from console after su tobyl Slackware 14 04-16-2003 05:37 PM
using custom fonts for console apps Beav Linux - General 1 09-28-2002 11:43 AM


All times are GMT -5. The time now is 09:38 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration