LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 04-12-2010, 08:23 PM   #1
Darkestfilth
LQ Newbie
 
Registered: Sep 2006
Distribution: Arch Linux
Posts: 13

Rep: Reputation: 0
Adding a launcher for an application


I was wondering if there was any way that I could add a launcher for an application that has to be launched from a specific directory. Not particularly a Desktop launcher, but perhaps under the Applications/Games tab in Gnome at the top. I want to be able to drag that launcher down to my AWN dock.
 
Old 04-12-2010, 10:15 PM   #2
burnsb
LQ Newbie
 
Registered: Apr 2010
Posts: 7

Rep: Reputation: 1
1. Right click applications tab.
2. Edit Menus.
3. Select the tab you want to add under.
4. New Item.
5. Enter the bash command used to launch program, give it a name and other comments.
5. Drag it where you want it.

Last edited by burnsb; 04-12-2010 at 10:22 PM. Reason: Initially gave directions for panel launcher not applications tab.
 
Old 04-12-2010, 11:11 PM   #3
Darkestfilth
LQ Newbie
 
Registered: Sep 2006
Distribution: Arch Linux
Posts: 13

Original Poster
Rep: Reputation: 0
Thanks for the reply. That got me to where I want the program, but the problem is it still won't open the game I'm trying to run. The only way it will run is if I physically go to the directory it's installed, and open it from there. I need to figure out how I can make the command able to run no matter what directory I'm in.
 
Old 04-13-2010, 06:34 AM   #4
burnsb
LQ Newbie
 
Registered: Apr 2010
Posts: 7

Rep: Reputation: 1
What is the path to the file? Can you run it from the shell?
 
Old 04-13-2010, 12:47 PM   #5
Darkestfilth
LQ Newbie
 
Registered: Sep 2006
Distribution: Arch Linux
Posts: 13

Original Poster
Rep: Reputation: 0
The path to the file is /home/matt/Tibia/StartTibia.sh

And if you're asking if I can execute that from the terminal, I can't. I have to first go to the Tibia directory, and then execute it.
 
Old 04-13-2010, 05:42 PM   #6
burnsb
LQ Newbie
 
Registered: Apr 2010
Posts: 7

Rep: Reputation: 1
You'll have to make the script executable:
Navigate to here in bash:

matt@somecomputername:~/matt/Tibia$

enter this command:

chmod u+x StartTibia.sh

then, make launcher command this:

/home/matt/Tibia/StartTibia.sh

or try

bash /home/matt/Tibia/StartTibia.sh

For a more in depth look see this thread:

http://www.linuxforums.org/forum/lin...xecutable.html

Last edited by burnsb; 04-13-2010 at 05:52 PM. Reason: easier to understand method
 
Old 04-13-2010, 11:00 PM   #7
Darkestfilth
LQ Newbie
 
Registered: Sep 2006
Distribution: Arch Linux
Posts: 13

Original Poster
Rep: Reputation: 0
Hmm, well I've tried what you suggested. The actual launcher didn't work, and when I did it from the terminal I got this:

bash /home/matt/Tibia/StartTibia.sh
/home/matt/Tibia/StartTibia.sh: line 11: ./libc6/ld-linux.so.2: No such file or directory

But after I tried that, I went to the directory again, and started it from there.. and it worked fine.
 
Old 04-13-2010, 11:41 PM   #8
burnsb
LQ Newbie
 
Registered: Apr 2010
Posts: 7

Rep: Reputation: 1
Did you look at that thread, if so, did you put into your $PATH?

Does the script have #!/bin/bash on the first line?

Post the script, and let's see what it is doing.
 
Old 04-14-2010, 02:10 AM   #9
Darkestfilth
LQ Newbie
 
Registered: Sep 2006
Distribution: Arch Linux
Posts: 13

Original Poster
Rep: Reputation: 0
I looked at the thread, but didn't get much out of what I should be doing from it, well rather I'm confused by it. I checked the file itself and it has the #!/bin/bash at the begining. Now it says to put it in a $PATH directory? I echo'd $PATH, and have some places I could put it in, but if I do just put that script in one of those areas, wouldn't it not work because it needs to pull files from the Tibia directory to work? Anyways, here's what it looks like.

#!/bin/bash

# This script starts Tibia with a set of provided libraries.
# (the file libc6/README explains where those libraries came from)

# Please try calling this script instead of calling ./Tibia
# in case of problems while starting Tibia.
# (a typical error this script might help with is the dreaded
# "Floating point exception" right after starting Tibia)

./libc6/ld-linux.so.2 --library-path ./libc6 ./Tibia

The curious thing is, I've gotten this game to work exactly how I wanted it to before, with the launcher and everything. The only difference was that it was on another install, in 32 bit Ubuntu. The script looked different then, and all I had to do was something along the lines of adding a Path= somewhere I forgot at the bottom, and it worked fine. But this script looks entirely different then it did before. I'm wondering if it had to do with me being on 64 bit now, and that to install the game originally I had to install 32 bit libs.
 
Old 04-14-2010, 04:44 PM   #10
burnsb
LQ Newbie
 
Registered: Apr 2010
Posts: 7

Rep: Reputation: 1
Open /home/matt/.bashrc in gedit. You'll have to set nautilus to view hidden files, to be able to see the file.

At the end of the file add the line:

$ export PATH=$PATH:/home/matt/Tibia

Save file and reboot.
 
Old 04-15-2010, 01:42 AM   #11
Darkestfilth
LQ Newbie
 
Registered: Sep 2006
Distribution: Arch Linux
Posts: 13

Original Poster
Rep: Reputation: 0
Hmm, tried what you said to do. Still no luck.

-Edit: I'd also like to add that I now have to keep the directory open when playing the game if I start it through the gui and not the terminal. Which didn't happen before.

Last edited by Darkestfilth; 04-16-2010 at 12:43 AM.
 
  


Reply


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
Application launcher MTK358 Linux - Software 4 01-21-2010 01:45 PM
[SOLVED] how to move the KDE application launcher james2b Fedora 2 08-30-2009 03:11 AM
how can I create dual application launcher ameyjah Linux - Software 4 04-23-2008 05:12 AM
Application launcher box General Linux - Desktop 0 03-23-2007 03:07 AM
Application Launcher jamoraqui Linux - Newbie 9 08-23-2004 06:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 09:44 AM.

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