LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   creating desktop icon (https://www.linuxquestions.org/questions/linux-software-2/creating-desktop-icon-261668/)

oingram 12-02-2004 05:12 AM

creating desktop icon
 
I have installed a program on SuSE9.2 using configure;make;make install from a bash script.(executing rpm's etc) Now I want to go a step further and also create a desktop icon which will execute the binary file for the program. How do I do that from the bash script which installed the program?

IBall 12-02-2004 06:45 AM

What Desktop are you using?

As far as I know, you can't create a desktop icon from the command shell. Although in gnome, they are files of the format name.desktop I think.

The best way would be to right click on the desktop and select "new launcher" The executable is the command you enter in the terminal to run the program.

I hope this helps
--Ian

abisko00 12-02-2004 08:11 AM

I guess you are using KDE, since this is the default desktop on SuSE.

I am not very good at programming, but I can show you how a desktop icon looks like:

Code:

[Desktop Entry]
Comment=
Comment[de]=
Encoding=UTF-8
Exec=/usr/local/bin/yourcommand
GenericName=
GenericName[de]=
Icon=exec
MimeType=
Name=whatever
Name[de]=wasauchimmer
Path=
StartupNotify=true
Terminal=false
TerminalOptions=
Type=Application
X-DCOP-ServiceType=
X-KDE-SubstituteUID=false
X-KDE-Username=

This is located in /home/<user>/Desktop and called <name>.desktop

kadhan 12-02-2004 10:18 AM

if u r usin kde rightclick->new->link 2 application and write ur command in execute prompt

oingram 12-02-2004 10:58 AM

Thanks I will try it out and see if it works. I am using kde and I want to be able to run the install script (from bash) and have the script create the desktop icon. Basically it would be like installing a windows program ; they automatically put a desktop icon (shortcut ) for you with all the correct permissions so all the user has to do is click the icon to run the program.
by the way what command could I use at the end of the execution of the script that will close/kill the shell? I tried exit but it didn't work

abisko00 12-02-2004 11:17 AM

Why don't you use rpm? You can run pre- and postinstall scripts on rpm. Have a look on the rpm manpages.

NewToLinux2005 12-31-2004 03:39 AM

Ok to do this with KDE, just rigth clik pick file/Link To Locaction then browse to the location of the program, hit ok. ok again. it will creat a icon that you can change by right clicking on the icon and going to properties. hope that helps.


All times are GMT -5. The time now is 07:57 AM.