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! |
| 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. |
|
 |
02-12-2004, 12:56 PM
|
#1
|
|
LQ Newbie
Registered: Feb 2004
Distribution: Thizlinux
Posts: 10
Rep:
|
shell script link/shortcut in KDE
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.
Any ideas?
|
|
|
|
02-12-2004, 02:07 PM
|
#2
|
|
Guru
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Squeeze, Fedora 14
Posts: 7,268
Rep:
|
"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.
___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html
Steve Stites
|
|
|
|
02-12-2004, 02:40 PM
|
#3
|
|
LQ Newbie
Registered: Feb 2004
Distribution: Thizlinux
Posts: 10
Original Poster
Rep:
|
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?
Not sure what to try next.
|
|
|
|
02-12-2004, 03:07 PM
|
#4
|
|
Guru
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Squeeze, Fedora 14
Posts: 7,268
Rep:
|
"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.
---------------------
Steve Sites
|
|
|
|
02-12-2004, 04:07 PM
|
#5
|
|
Member
Registered: Oct 2003
Location: coastal alabama, united states
Distribution: Mandrake 10.0 official, slackware 9.1
Posts: 219
Rep:
|
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.
http://www.linuxquestions.org/questi...le+not+working
|
|
|
|
02-12-2004, 04:34 PM
|
#6
|
|
LQ Newbie
Registered: Feb 2004
Distribution: Thizlinux
Posts: 10
Original Poster
Rep:
|
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.
|
|
|
|
02-12-2004, 05:12 PM
|
#7
|
|
Member
Registered: Oct 2003
Location: coastal alabama, united states
Distribution: Mandrake 10.0 official, slackware 9.1
Posts: 219
Rep:
|
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
<edit>
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 05:20 PM.
|
|
|
|
02-12-2004, 05:37 PM
|
#8
|
|
LQ Newbie
Registered: Feb 2004
Distribution: Thizlinux
Posts: 10
Original Poster
Rep:
|
Finally got it to work. The shortcut was executing the script and starting the server, I just did not know it. So I added :
xterm -a bfsmd
to the script, and it opened xterm, then started the server. Now I see the sever in an xterm window, which is what I wanted. Works perfectly now. Thanks for the help.
|
|
|
|
| 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 10:32 PM.
|
|
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
|
|