Hi All, This is kinda strange. I can open a terminal, cd to the directory I installed neverball to then type ./neverball and it works. I try to click on the file in Konq and nothing happens. I set up a link on my desktop to the file and nothing happens. What kind of settings do I need to put in my 'link to application'? Thanks Russ
On Monday 19 January 2004 06:05, Russ wrote:
I try to click on the file in Konq and nothing happens. I set up a link on my desktop to the file and nothing happens. What kind of settings do I need to put in my 'link to application'?
Problem: Neverball won't load up when clicked, but runs in a shell Solution: 1. Open up a console/konsole/shell 2. cd to your neverball directory 3. Create a new script to call neverball. I use pico: pico start.sh 4. In this file, you want to type: cd /path/to/neverballDirectory ./neverball [obviously replace the first line as appropriate!] Then save the file [use ctrl+x in pico] and exit. 5. do a "chmod u+x start.sh" 6. link to the start.sh script and all should be well :) The problem is that it can't find its data directory [it uses the shells current directory it would seem. Hope this helps :)
Thanks for the help. I have some questions though. The Purple Tiger wrote:
On Monday 19 January 2004 06:05, Russ wrote:
I try to click on the file in Konq and nothing happens. I set up a link on my desktop to the file and nothing happens. What kind of settings do I need to put in my 'link to application'?
Problem: Neverball won't load up when clicked, but runs in a shell Solution: 1. Open up a console/konsole/shell 2. cd to your neverball directory 3. Create a new script to call neverball. I use pico: pico start.sh
4. In this file, you want to type: cd /path/to/neverballDirectory ./neverball
'/usr/games/neverball-1.0.0' ./neverball OK, did all that but I am unshure about the part below
[obviously replace the first line as appropriate!] Then save the file [use ctrl+x in pico] and exit. 5. do a "chmod u+x start.sh"
What does this do?
6. link to the start.sh script and all should be well :)
Even though I didn't do the chmod thing, I pointed the link to start.sh and still nothing. Game still plays though when I go through the console ... yada yada yada
The problem is that it can't find its data directory [it uses the shells current directory it would seem.
Hope this helps :)
Thanks Russ
On Monday 19 January 2004 7:09 pm, Russ wrote:
Thanks for the help. I have some questions though. The Purple Tiger wrote: [...]
3. Create a new script to call neverball. [...] 5. do a "chmod u+x start.sh"
What does this do?
makes the script "executable", hence the reason why it "still didn't do anything" below...
6. link to the start.sh script and all should be well :)
Even though I didn't do the chmod thing, I pointed the link to start.sh and still nothing.
the "chmod thing" was the one vital and oh-so-truly-necessary thing for you to have done to make this work, and you skipped it [don't worry -- happens to everyone, even me...] To explain this in "dos/windows" terms, "chmod +x" is the logical equivalent of saving a file in DOS with a ".bat" or ".cmd" extension -- it is the "magic bit" that the OS uses to determine "should I try to parse and execute the contents of this file?"
The problem is that it can't find its data directory [it uses the shells current directory it would seem.
Another alternative would be to set the "work path" in the menu item to be the same as the program's directory -- I believe this effectively does a "cd" into that directory before trying to execute a command -- Yet another Blog: http://osnut.homelinux.net
On Tuesday 20 January 2004 03:09, Russ wrote:
5. do a "chmod u+x start.sh" What does this do? chmod: Change the "mode" or "permissions" of a file u+x : This means that for the [U]ser that owns the file, make it e[X]ecutable [runnable] start.sh: The file to do the actions to.
In dos it is like calling something .bat - it is a script that is now runnable :)
6. link to the start.sh script and all should be well :) Even though I didn't do the chmod thing, I pointed the link to start.sh and still nothing. Game still plays though when I go through the console ... yada yada yada Yes, this is because you didn't tell the system that the script is runnable [the chmod line]. Try the chmod line above, which should make it work.
Thanks No problem :)
In order to do this in the folder I put it in (/usr/games/neverball-1.0.0), I had to be root. It would not run as a normal user. I put this in my home directory (did the whole chmod thing too), pointed the link to this file, and it works slick. Even though I have it working, how can I get the start.sh in the game directory to work for everyone (so I do not have to put this file in everyone's home directory)? Thanks for all the help Russ The Purple Tiger wrote:
On Tuesday 20 January 2004 03:09, Russ wrote:
5. do a "chmod u+x start.sh"
What does this do?
chmod: Change the "mode" or "permissions" of a file u+x : This means that for the [U]ser that owns the file, make it e[X]ecutable [runnable] start.sh: The file to do the actions to.
In dos it is like calling something .bat - it is a script that is now runnable :)
6. link to the start.sh script and all should be well :)
Even though I didn't do the chmod thing, I pointed the link to start.sh and still nothing. Game still plays though when I go through the console ... yada yada yada
Yes, this is because you didn't tell the system that the script is runnable [the chmod line]. Try the chmod line above, which should make it work.
Thanks
No problem :)
On Thursday 22 January 2004 01:38, Russ wrote: > In order to do this in the folder I put it in > (/usr/games/neverball-1.0.0), I had to be root. It would not run as a > normal user. I put this in my home directory (did the whole chmod > thing too), pointed the link to this file, and it works slick. Even > though I have it working, how can I get the start.sh in the game > directory to work for everyone (so I do not have to put this file in > everyone's home directory)? These are the steps I used. You may need to adapt for your setup [as root] 1. Create directory to hold the game. I use a directory below /usr/local/games as it is a self-compiled program and not a distribution supplied program, although it could be anywhere: mkdir /usr/local/games/neverball 2. Copy the game executable across: cp /tmp/neverball-1.0.0/neverball /usr/local/games/neverball/ 3. Copy the data directory across: cp -R /tmp/neverball-1.0.0/data /usr/local/games/neverball/ 4. Create a file called start-nball.sh in /usr/local/games/neverball: It contains the following text: #!/bin/sh # cd /usr/local/games/neverball ./neverball 5. Allow everyone Read and Execute access to the files, except the owner (root) who gets full access: chmod 755 -R /usr/local/games/neverball You could even create your desktop icon for it and save the .desktop file [if you are using kde] file in /usr/local/games/neverball before step 5, so that people can just copy the icon to their desktop instead of having to set it up themselves. Hope this helps :)
The Purple Tiger wrote:
On Thursday 22 January 2004 01:38, Russ wrote:
In order to do this in the folder I put it in (/usr/games/neverball-1.0.0), I had to be root. It would not run as a normal user. I put this in my home directory (did the whole chmod thing too), pointed the link to this file, and it works slick. Even though I have it working, how can I get the start.sh in the game directory to work for everyone (so I do not have to put this file in everyone's home directory)?
These are the steps I used. You may need to adapt for your setup [as root] 1. Create directory to hold the game. I use a directory below /usr/local/games as it is a self-compiled program and not a distribution supplied program, although it could be anywhere: mkdir /usr/local/games/neverball
2. Copy the game executable across: cp /tmp/neverball-1.0.0/neverball /usr/local/games/neverball/
3. Copy the data directory across: cp -R /tmp/neverball-1.0.0/data /usr/local/games/neverball/
4. Create a file called start-nball.sh in /usr/local/games/neverball: It contains the following text: #!/bin/sh # cd /usr/local/games/neverball ./neverball
Did the above (except for '#!/bin/sh' '#' What is that?) and even looked at the file Properties/permissions in Konq. All usrs and grps had the proper permissions but it still didn't work. So I did the what you said below:
5. Allow everyone Read and Execute access to the files, except the owner (root) who gets full access: chmod 755 -R /usr/local/games/neverball
And it works :-)
You could even create your desktop icon for it and save the .desktop file [if you are using kde] file in /usr/local/games/neverball before step 5, so that people can just copy the icon to their desktop instead of having to set it up themselves.
What did you mean by the above (yes I am using KDE)?
Hope this helps :)
Yes it did, thanks Russ
The Purple Tiger wrote:
#!/bin/sh # cd /usr/local/games/neverball ./neverball
Did the above (except for '#!/bin/sh' '#' What is that?) A "#" is a comment is a bash [bash is the shell you use] The #!/bin/sh line is actually made up of 2 parts: #! - This tells the shell that you can find the program that interprets
On Thursday 22 January 2004 04:43, Russ wrote: this script next /bin/sh - this is the "bash" shell on a SuSE system. So, it is saying "Right, run me using...." "/bin/sh"
and even looked at the file Properties/permissions in Konq. All usrs and grps had the proper permissions but it still didn't work. Even execute?
So I did the what you said below:
5. Allow everyone Read and Execute access to the files, except the owner (root) who gets full access: chmod 755 -R /usr/local/games/neverball And it works :-) Yay :) BTW the "-R" switch for chmod and cp means "recurse into subdirectories" so it applies to everything at that point and below :)
You could even create your desktop icon for it and save the .desktop file [if you are using kde] file in /usr/local/games/neverball before step 5, so that people can just copy the icon to their desktop instead of having to set it up themselves. What did you mean by the above (yes I am using KDE)? To demonstrate: Create a link to an application on your desktop [e.g. neverball :)] I will assume you have just called it "neverball" If you open up a konsole, you will be in your home directory. Type: cd Desktop [keep the D of Desktop capitalised] cat neverball.desktop [cat is like "type" in msdos - it reads the file and copies it to the terminal :)] You should see a few settings etc. What I was saying was that you could copy this neverball.desktop file into your neverball directory, make sure you chmod 755 it, then anyone who wanted to could open up the neverball directory and just copy the neverball.desktop file to their desktop and they don't then have to worry about setting up the shortcut :) Not essential though, so... :)
Hope this has been a positive learning experience for you :)
** Reply to message from Russ
I can open a terminal, cd to the directory I installed neverball to then type ./neverball and it works.
I try to click on the file in Konq and nothing happens. I set up a link on my desktop to the file and nothing happens. What kind of settings do I need to put in my 'link to application'?
My binary is /usr/games/neverball, but the menu entry is "CheckHardware --3D neverball". It will start from a click in File Manager. Do you have 3D acceleration enabled for the video card? Ed Harrison SuSE 9.0, Kernel 2.4.21-99 PolarBar Mailer 1.25a
Ed Harrison wrote:
** Reply to message from Russ
on Sun, 18 Jan 2004 22:05:31 -0800 I can open a terminal, cd to the directory I installed neverball to then type ./neverball and it works.
I try to click on the file in Konq and nothing happens. I set up a link on my desktop to the file and nothing happens. What kind of settings do I need to put in my 'link to application'?
My binary is /usr/games/neverball, but the menu entry is "CheckHardware --3D neverball".
It will start from a click in File Manager.
Do you have 3D acceleration enabled for the video card?
Ed Harrison SuSE 9.0, Kernel 2.4.21-99 PolarBar Mailer 1.25a
Yes I do have 3D enabled and the preinstalled version works perfectly from it's start menu (KDE). The new version works perfectly as well but I can only start it from a console cd /usr/games/neverball-1.0.0 ./neverball Russ
participants (4)
-
Ed Harrison
-
Russ
-
The Purple Tiger
-
Tom Emerson