Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
| 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
08-11-2008, 10:58 AM
|
#1
|
|
LQ Newbie
Registered: Jun 2007
Posts: 24
Rep:
|
Detaching Amarok from bash script run from KMenu
Hi,
I'm using a bash script run from the KMenu to launch Amarok, so that I can mount the NFS share on which my music directory is located. The script checks to see if the directory is mounted. If not, it attempts to mount it. If the directory is mounted at that point, it launches Amarok. Otherwise, it terminates. This makes sure that Amarok doesn't launch without the music directory mounted, which would require me to rebuild the collection the next time I open it with the directory mounted.
Anyway, my problem is with launching the script from the KMenu. When I run the script from the terminal, just using will allow me to close the terminal after Amarok's been launched, without any problems with Amarok terminating as well. But when I launch the script from the KMenu, none of the following (which I found online) work for me:
Code:
( ( amarok & ) & )
disown %1
Any ideas on how to get this to work?
Thanks!
Last edited by srunni; 08-11-2008 at 11:00 AM.
|
|
|
|
08-11-2008, 11:17 AM
|
#2
|
|
Senior Member
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853
Rep:
|
Try $(nohup amarok).
*shrug* I can't give any explanation as to why you should try it, I just know it's worked for me in the past to keep applications from closing until they are terminated through their built in calls.
|
|
|
|
08-11-2008, 11:22 AM
|
#3
|
|
LQ Newbie
Registered: Jun 2007
Posts: 24
Original Poster
Rep:
|
I'm getting there - now it's not closing the terminal once the script terminates, but when I close the terminal manually, Amarok stays open. Any chance you'd know how to automatically close the terminal as well? I tried and it didn't work.
Last edited by srunni; 08-11-2008 at 11:24 AM.
|
|
|
|
08-11-2008, 12:23 PM
|
#4
|
|
Senior Member
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853
Rep:
|
Is it necessary for the terminal to show when the script is being run? I only ask because it sounds like you have the "Run in terminal" box checked, in which case it's a simple fix - just uncheck the "Run in terminal" box.
|
|
|
|
08-11-2008, 02:26 PM
|
#5
|
|
LQ Newbie
Registered: Jun 2007
Posts: 24
Original Poster
Rep:
|
Well, I'd like to see the output that the NFS share couldn't be mounted. But I guess if there's no way around it, I'll just uncheck that.
|
|
|
|
08-11-2008, 02:55 PM
|
#6
|
|
Senior Member
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853
Rep:
|
I realize it's a slightly unnecessary step, but you could use a package like Zenity to provide a GTK+ message box to tell you if the NFS shares were mounted successfully or not -- it's like "dialog" but provides a nice GTK+ interface, and is used by the command-line.
|
|
|
|
08-11-2008, 04:39 PM
|
#7
|
|
LQ Newbie
Registered: Jun 2007
Posts: 24
Original Poster
Rep:
|
Is there a way to do that with Qt? ;/
|
|
|
|
08-12-2008, 02:09 AM
|
#8
|
|
Guru
Registered: May 2003
Location: London, UK
Distribution: Ubuntu 10.04, mostly
Posts: 6,002
|
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 02:17 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|