Click to See Complete Forum and Search --> : Adding a Launcher to my Gnome Panel for Pingus Binary


Nyckelharpa
05-17-2003, 05:55 PM
As I wrote to somebody somewhere, the Pingus binary is located in my home directory in the directory Pingus. To start the game I open a terminal CD over to Pingus and then type games/pingus and all works well.

I was wondering though if there is a way to set up a launcher in the Gnome panel for the game. I've tried setting up a launcher there, but can't seem to figure out what to put in the 'command' box. I've tried all sorts of things so far, but nothing seems to work. Perhaps this is actually an easy question that I am just missing the answer to.

Thanks in advance

RG

Icarus
05-17-2003, 06:08 PM
Sounds like you almost have it.
Right click, add to panal, Launcher...

you should only have to put someting in the Name part (even that isn't needed) but for the command, enter the full path to the executable

/home/mahdi/games/pingus

Add an icon and it should work.

The command should work for the command line, so if it doesn't work there it won't work in the launcher..

Nyckelharpa
05-17-2003, 07:09 PM
Thanks for the suggestion, but that didn't work. Seems like it should, though. Hmmm. When I click the launcher button (after setting it up), it acts like it is going to start up and then does nothing. No error messages. Nothing.

RG

Icarus
05-17-2003, 07:14 PM
Did you try copying the command from the launcher and entering it exactly on the command line?

The launcher never shows the errors, which I never liked...


try the same line from the command line as your user and you'll see the errors there.

Nyckelharpa
05-17-2003, 09:41 PM
OK, I tried doing that and this is what came up in the terminal:

[rg@localhost rg]$ /home/rg/pingus/games/pingus
Error: Couldn't find 'data/core.scr', please set the enviroment variable
PINGUS_DATADIR to the path of the file `data/core.scr' or use the
-d option.
[rg@localhost rg]$


As I said before, if I start it from the terminal by typing 'games/pingus' from the Pingus directory, it works, but if I do the complete path approach, it doesn't.

[rg@localhost pingus]$ games/pingus
Welcome to Pingus 0.6.0!

It works when I type in as above.. and it is able to find data/core.scr

Hmmmm.....

bwkaz
05-18-2003, 01:12 PM
Make the command cd /home/rg/pingus && ./games/pingus instead.

It's looking for the data file relative to the current directory, which is (from the launcher) either your home directory or /usr/bin or something like that. The cd puts it in the right directory before running the game.

Nyckelharpa
05-18-2003, 07:57 PM
Well I tried that too, but I got an error message which said: Failed to execute child process "cd" (No such file or directory). Cutting out the "cd" provided the following error: Failed to excecute child process "/home/rg/pingus (Permission denied).

:p Anyway, after getting a bit frustrated I thought about doing:

[root@localhost rg]# cd /usr/local/bin
[root@localhost bin]# ln -s /home/rg/pingus/games/pingus

and then just typing "pingus" in the command box. That worked. Hmmmm..... No idea what I was thinking but it worked.

I still wonder why the other ways didn't work though.

Thanks a lot.

RG