LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   Create a desktop launcher? (https://www.linuxquestions.org/questions/fedora-35/create-a-desktop-launcher-4175538594/)

bg3075 04-02-2015 06:24 PM

Create a desktop launcher?
 
In the past...previous Fedora Core, I was able to create a desktop launcher (shortcut) via shell script below, but can no longer. Now I am running Fedora 21 Desktop (Classic mode) and wonder if there is a way to revive this shell script to work again from my desktop?
Code:

gnome-desktop-item-edit ~/Desktop/launcher.desktop --create-new

sag47 04-02-2015 10:10 PM

You could make use of a desktop file from /usr/share/applications/. If you wanted to turn it into a script then you could take one of those desktop files and create a template out of it.

Alternatively, install the mlocate package and as root run the following commands.

Code:

updatedb
locate *.desktop

That would reveal the location of desktop launchers on your system.

bg3075 04-03-2015 11:06 AM

Thank you. I will look into it.

John VV 04-03-2015 03:54 PM

Quote:

n the past...previous Fedora Core,
there has not been a "core" in many a year
the LAST "core" was Fedora core 6
the "core" was dropped in Fedora 7

as to a *.desktop file
just wright one

they are very simple text files
for example one i wrote for a game ( kiki the nanobot)
Code:

[Desktop Entry]
Categories=Game;ActionGame;
Type=Application
Name=Kiki the nano bot
Exec=/usr/bin/kiki-wrapper
Icon=/usr/share/pixmaps/kiki.png

or this one
Code:

[Desktop Entry]
Encoding=UTF-8
Categories=Application;Game;ArcadeGame;
Name=Virus Killer
Icon=/usr/share/pixmaps/viruskiller.png
Exec=/usr/bin/viruskiller
Terminal=0
Type=Application

or this complex one for Gimp2.8.6
Code:

#!/usr/bin/env xdg-open
[Desktop Entry]
Categories=Graphics;2DGraphics;RasterGraphics;GTK;
Comment=Create images and edit photographs
Exec=gimp-2.8 %U
GenericName=Gimp-2.8.14
Icon=/DATA/SUSE/share/pixmaps/gimp.png
MimeType=image/x-xwindowdump;image/x-xpixmap;image/x-xcursor;image/x-xcf;image/x-xbitmap;image/x-wmf;image/x-tga;image/x-sgi;image/x-portable-pixmap;image/x-portable-graymap;image/x-portable-bitmap;image/x-portable-anymap;image/x-compressed-xcf;image/vnd.microsoft.icon;image/vnd.adobe.photoshop;image/tiff;image/svg+xml;image/png;image/jpeg;image/jp2;image/jp2;image/jp2;image/gif;image/g3fax;image/fits;image/bmp;application/postscript;application/pdf;application/pdf;
Name=Gimp-2.8.14
Path=
StartupNotify=true
Terminal=false
TerminalOptions=
TryExec=gimp-2.8
Type=Application
Version=1.0
X-DBUS-ServiceName=
X-DBUS-StartupType=
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Component=General
X-GNOME-Bugzilla-OtherBinaries=gimp-2.8
X-GNOME-Bugzilla-Product=GIMP
X-GNOME-Bugzilla-Version=2.8.14
X-KDE-SubstituteUID=false
X-KDE-Username=
X-SuSE-translate=true


bg3075 04-04-2015 08:53 AM

Thanks John. In the two files you wrote, it appears you put the path to the application following the Exec= parameter. In the file for Gimp, do you happen to know what the Path= parameter might be used for? It seems to me it would be similar, or the same, as the Exec= parameter.

John VV 04-04-2015 01:45 PM

i install all software that i build in a second tree
not in /usr
but on a different disk and partition
/DATA/SUSE ( i have 4 operating systems )

IF the install location is in the system $PATH
there is no need to include the FULL path to it
/DATA/SUSE/bin
/DATA/SUSE/lib64
/DATA/SUSE/share

are in my system $PATH

i also tend to be very lazy and repurpose old files


the "/usr/bin/ " is just a edit in posting

fanfoot 02-03-2016 07:25 PM

Just FYI
 
In case there were others who had some issues with the stuff from this thread...

I'm using Fedora 23, and at least in this distro you can place the .desktop files discussed in this thread ON YOUR DESKTOP, meaning in ~/Desktop.

Also the .desktop files have to start with a first line like this:

#!/usr/bin/env xdg-open
[Desktop Entry]

which makes sense when you think about it. Don't know if the people here just glossed over this issue, or the older versions didn't require it or what...


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