Linux - SoftwareThis 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.
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.
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
Code:
amarok
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:
*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.
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
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.