LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How can i change the icon of a shell script? (https://www.linuxquestions.org/questions/linux-software-2/how-can-i-change-the-icon-of-a-shell-script-134596/)

BajaNick 01-13-2004 11:57 PM

How can i change the icon of a shell script?
 
I installed opera (again) and it only starts when i click on a shell script. Is there a way to change the icon from the shell icon?

megaspaz 01-14-2004 12:05 AM

why are you using a shell script to start opera?

right click on your desktop and create a link to application. there you can set the icon to use, the name that will be displayed on your desktop, and the command to execute which is just "opera" without the quotes.

if you want to include an icon in your kmenu or gnome menu, just basically add an item to the menu and choose all those things. then (if you didn't already have a desktop shortcut), you could can then open you kmenu or gnome menu like you would if you were going to start opera and drag it to your desktop to get a desktop shortcut.

edit: just had a thought. if you're using multiple versions of opera, then just make a link described above, but in the command to execute, put in the filepath to the shellscript.

BajaNick 01-14-2004 12:14 AM

I dont know why I am using a shell script to start opera. When i click on the Executable nothing happens. It was the only icon that starts opera and I could not find any other way. I just figured out how to change the icon of shell scripts. Thanks

megaspaz 01-14-2004 12:16 AM

well if you open a shell, the command to start opera is just "opera" (no quotes). the only time i remember ever using a shellscript to start opera is when i downloaded the tarball instead of the rpm so i could use 2 different versions on the same computer. anyway, whether you're starting opera through the shellscript or through the command, you can make a link to either and choose the icon you want to use.


creating a link just entails either adding a menu item in your menu editor and dragging it to your desktop or right clicking on your desktop and Create New > Link to application. this brings up a virgin properties windows. you can see by the location that it's a link from dragging the menu item from my kmenu.

Opera Link Properties - General Tab

Opera Link Properties - Execute Tab (Command Text Box)

the command could be the /file_path/shellscript_name.sh if the opera command doesn't work.

BajaNick 01-14-2004 12:34 AM

I try to only use Tar`s now cuz ive had many problems with rpms. Any idea why the Executable dosnt do anything when i click on it but the shell script works?:confused:

megaspaz 01-14-2004 12:36 AM

Quote:

Originally posted by BajaNick
I try to only use Tar`s now cuz ive had many problems with rpms. Any idea why the Executable dosnt do anything when i click on it but the shell script works?:confused:
no. clicking the "executable" never worked for me either when dealing with the tarball. that's the way linux seems to be. to execute a binary, you need to execute it through the shell. in this case you need to go through the shellscript. but you don't have to change the icon of your shellscript as this affects the filetype of shellscript. every filetype registered as a shellscript will have the icon you changed it to. just create a link like how i described above and you'll be able to use whatever icon you want without affecting your filetypes.

BajaNick 01-14-2004 12:56 AM

Cool, I only changed the icon for the link to the shell script and that seems to be ok and working good. Thanks


All times are GMT -5. The time now is 03:37 PM.