Linux - NewbieThis 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!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I am running an offshoot of Redhat 8.0 under a distro call ThizLinux 7.0. Very friendly version of linux, good for a newbie like myself. I wrote a little bash script file that will start my BF1942 dedicated server. The script works when I execute in from xterm. Now here is my question:
How can I execute this script from a shortcut on my KDE desktop?
It would be convenient to just have a link/shortcut on my desktop that will open up xterm and start my game server using the script. I do not have any commands in the script that opens xterm, not sure if it is needed.
"How can I execute this script from a shortcut on my KDE desktop?"
You can create a desktop icon for the script by right clicking on an empty spot on the desktop.
In the pop up menu select Create New -> Link to Application. Fill out the form. On the Execute page be sure to click on Run in terminal.
I tried that. With the run in terminal box checked, a termal pops up and then closes so fast I cannot read what it says. I have tried every combo I can think of using the kde shortcut. Basicall my script just changes a directory and then starts the game server. Do I need something in my bash script to open a termal first and then start the server?
"With the run in terminal box checked, a termal pops up and then closes so fast I cannot read what it says."
It is normal behavior for the terminal to close when the script ends. If you want the terminal to stay open then open a terminal and type in your script at the command prompt. The terminal will stay open after your script ends and you can read any error messages that appear. After you get the script debugged then you can go back to running it from the desktop.
You can close your open terminal with the exit command.
Are you running your script as su? Does it contain commands that only su can run?
If so the following link may help a little. I had same prob getting script to run from desktop shortcut, for me it was permissions problem. Good luck.
I am running the script as su. A xterm window opens and closes quickly so I think the script file is executing. What the script is supposed to is start a game server. If I execute the script from xterm, it does. If I execute the script from the kde shortcut, xterm pops open for a split second, then closes, but no game server is running. I guess I need the script file to actually open a xterm window, change to the proper directory, and then start the server. Not sure how to do this.
when working properly, you will still get the same "open and close to fast to read" bit.
that doesnt mean the script isnt working.
from your most recent post it does indeed seem that permissions is the problem.
Someone more knowledgeble please help with this.
in the mean time look into permissions. good luck
perhaps to test for permission problems you could open the xterm and try to run the script as a regular user, if you dont have any errors that way then it probably isnt permission problems after all.
hopefully jailbait will get back to you.good luck
Last edited by toastermaker; 02-12-2004 at 06:20 PM.