LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 04-02-2015, 06:24 PM   #1
bg3075
Member
 
Registered: Apr 2009
Posts: 37

Rep: Reputation: 15
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
 
Old 04-02-2015, 10:10 PM   #2
sag47
Senior Member
 
Registered: Sep 2009
Location: Raleigh, NC
Distribution: Ubuntu, PopOS, Raspbian
Posts: 1,899
Blog Entries: 36

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
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.
 
Old 04-03-2015, 11:06 AM   #3
bg3075
Member
 
Registered: Apr 2009
Posts: 37

Original Poster
Rep: Reputation: 15
Thank you. I will look into it.
 
Old 04-03-2015, 03:54 PM   #4
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,623

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
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
 
Old 04-04-2015, 08:53 AM   #5
bg3075
Member
 
Registered: Apr 2009
Posts: 37

Original Poster
Rep: Reputation: 15
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.
 
Old 04-04-2015, 01:45 PM   #6
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,623

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
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
 
Old 02-03-2016, 07:25 PM   #7
fanfoot
LQ Newbie
 
Registered: Feb 2016
Location: Bay area
Distribution: Fedora 23 at the moment
Posts: 2

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


Reply



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
LXer: How to create desktop shortcut or launcher on Linux LXer Syndicated Linux News 0 11-14-2013 07:03 PM
How to create a desltop launcher and how to add a "show desktop" icon in 12.04 LTS? unixor Ubuntu 4 04-16-2013 09:48 AM
create app launcher and change icon on xfce desktop cccc Debian 3 02-03-2011 03:40 PM
Create Gnome Desktop Icon, Program Launcher qwerty_tele Linux - Newbie 10 02-09-2008 11:07 PM
create launcher in gnome innersmile Linux - General 3 06-09-2005 08:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration