Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 11-02-2011, 07:12 AM   #1
LQ Newbie
Registered: Jul 2006
Posts: 10

Rep: Reputation: 0
Running GUI commands in console without locking it


How to run GUI commands in console without locking it?

For example, I just installed Skype in CentOS, and to run it, I type "skype" in the console, but then the prompt doesn't returns until I quit the application (either with control+c or quit in the app itself).

Old 11-02-2011, 07:28 AM   #2
Registered: Jun 2010
Location: Slovakia
Distribution: Debian 8, Ubuntu 10.04 and 12.04; SLAX 6.0; ConnochaetOS 0.9.; LFS; Natty chip: VT1708S
Posts: 108
Blog Entries: 2

Rep: Reputation: 7
Hello rapahelmsx,
I am afraid that you are right. When you type "skype" in the console, the prompt does not return until you quit the application. However you can open another console in several ways:
1. from the console you typed "skype" you go to the menu and open a new console terminal, "new tab"
2. form the GUI menu you can open a new terminal console
3. using [CTRL]+[ALT]+[F1-7]
Hopefully, this can help
P.S: the reason why this console is blocked while you are skype-ing is that this is the bridge between the application and your computer it works as the GUI application, it will be close when you clik the X at the window.
Old 11-02-2011, 07:38 AM   #3
Registered: Mar 2010
Posts: 202

Rep: Reputation: 84
Add an ampersand ( '&' ) after the command:

me@localhost:~$skype &
The shell will execute the program in the background. If you want to bring it back to foreground, type "fg". If you want to send to background a program that is already in the foreground, you first stop it with "ctrl+z" and type "bg".

This is all documented in the bash manual (man bash), press "/" and search "JOB CONTROL".

Note that you will still get messages from that program in the console, if you don't want that you could close its standard output and standard error:

me@localhost:~$skype >&- 2>&-
Here, ">&-" closes standard output and "2>&-" closes standard error. I think there's a way to close both descriptors with one redirection but I don't know the syntax.

Similarly, this is documented in the bash manual in the section "REDIRECTION".

Last edited by Juako; 11-02-2011 at 08:05 AM.
Old 11-02-2011, 01:05 PM   #4
Registered: Aug 2009
Location: Oregon, USA
Distribution: Arch
Posts: 864
Blog Entries: 31

Rep: Reputation: 148Reputation: 148
Another recommendation is to prepend nohup to the command, so that you can close the X terminal without closing Skype as well (I believe closing an X terminal is treated as a logout, and sends SIGHUP to all "connected" processes ).


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
Terminal commands running behind the GUI Suhail Sherif Linux - Newbie 1 01-10-2010 01:25 PM
Problems running console commands using QProcess montylee Programming 4 09-27-2008 01:36 AM
console commands for gui actions pcandpc Linux - Newbie 2 05-16-2005 09:29 PM
fluxbox - running commands without console geomatt Linux - Software 18 09-22-2004 11:17 AM
Console commands && GUI DaFrEQ Programming 10 05-29-2003 12:00 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:34 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration