LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 01-13-2004, 11:57 PM   #1
BajaNick
Senior Member
 
Registered: Jul 2003
Location: So. Cal.
Distribution: Slack 11
Posts: 1,737

Rep: Reputation: 46
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?
 
Old 01-14-2004, 12:05 AM   #2
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 46
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.

Last edited by megaspaz; 01-14-2004 at 12:06 AM.
 
Old 01-14-2004, 12:14 AM   #3
BajaNick
Senior Member
 
Registered: Jul 2003
Location: So. Cal.
Distribution: Slack 11
Posts: 1,737

Original Poster
Rep: Reputation: 46
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

Last edited by BajaNick; 01-14-2004 at 12:17 AM.
 
Old 01-14-2004, 12:16 AM   #4
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 46
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.

Last edited by megaspaz; 01-14-2004 at 12:24 AM.
 
Old 01-14-2004, 12:34 AM   #5
BajaNick
Senior Member
 
Registered: Jul 2003
Location: So. Cal.
Distribution: Slack 11
Posts: 1,737

Original Poster
Rep: Reputation: 46
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?
 
Old 01-14-2004, 12:36 AM   #6
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 46
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?
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.

Last edited by megaspaz; 01-14-2004 at 12:40 AM.
 
Old 01-14-2004, 12:56 AM   #7
BajaNick
Senior Member
 
Registered: Jul 2003
Location: So. Cal.
Distribution: Slack 11
Posts: 1,737

Original Poster
Rep: Reputation: 46
Cool, I only changed the icon for the link to the shell script and that seems to be ok and working good. Thanks
 
  


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
How to change directory in a shell script? jdupre Linux - Newbie 11 01-21-2012 08:01 AM
Shell script to change password kamal_aitin Linux - General 6 07-25-2007 12:09 AM
Change batch script to shell script alan.belizario Programming 5 03-31-2005 12:41 AM
Change batch script to shell script alan.belizario Linux - Software 1 03-30-2005 01:49 AM
Shell script to change IP addresses saintt Linux - General 4 08-20-2001 11:17 AM


All times are GMT -5. The time now is 03:13 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration