Results 1 to 8 of 8

Thread: creating desktop launcher?

  1. #1
    Join Date
    May 2009
    Location
    Oxfordshire, UK
    Beans
    Hidden!
    Distro
    Lubuntu 13.04 Raring Ringtail

    creating desktop launcher?

    How do I create a new desktop launcher shortcut in 12.04 / Gnome?
    Case in point: Adobe reader. if I just drag it on to the desktop it not the proper icon but the basic file with the arrow in it. How do I create the proper nice looking Adobe logo shortcut?

    Thanks...

  2. #2
    Join Date
    Nov 2012
    Location
    Halloween Town
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: creating desktop launcher?

    First you need to install gnome-panel package using the following command from your terminal:
    Code:
    sudo apt-get install --no-install-recommends gnome-panel
    Then create the new launcher:
    Code:
    gnome-desktop-item-edit ~/Desktop/ --create-new
    This will open the create laucher dialog box here you can give a suitable name for the launcher. In the Command field, type in the command to launch the application Then, click OK to create the desktop launcher.

  3. #3
    Join Date
    Jun 2007
    Beans
    13,078

    Re: creating desktop launcher?

    Quote Originally Posted by oxf View Post
    How do I create a new desktop launcher shortcut in 12.04 / Gnome?
    Case in point: Adobe reader. if I just drag it on to the desktop it not the proper icon but the basic file with the arrow in it. How do I create the proper nice looking Adobe logo shortcut?

    Thanks...
    If you're referring to acroread (Adobe Reader) -

    Delete what you now have, then open a terminal
    Code:
    cp /opt/Adobe/Reader9/Resource/Support/AdobeReader.desktop ~/Desktop/
    Code:
    chmod u+x Desktop/AdobeReader.desktop

  4. #4
    Join Date
    May 2009
    Location
    Oxfordshire, UK
    Beans
    Hidden!
    Distro
    Lubuntu 13.04 Raring Ringtail

    Re: creating desktop launcher?

    Quote Originally Posted by mc4man View Post
    If you're referring to acroread (Adobe Reader) -

    Delete what you now have, then open a terminal
    Code:
    cp /opt/Adobe/Reader9/Resource/Support/AdobeReader.desktop ~/Desktop/
    Code:
    chmod u+x Desktop/AdobeReader.desktop

    OK thanks that was remarkably simple!
    What about Libraoffice Writer then? How do I substitute that in the above code? I wonder if this is covered in a tutorial anywhere?

    Caitlin

  5. #5
    Join Date
    May 2009
    Location
    Oxfordshire, UK
    Beans
    Hidden!
    Distro
    Lubuntu 13.04 Raring Ringtail

    Re: creating desktop launcher?

    No I guess I cant' LibraOffice is in /etc but I don't see how to do this

  6. #6
    Join Date
    Jun 2007
    Beans
    13,078

    Re: creating desktop launcher?

    Quote Originally Posted by oxf View Post
    No I guess I cant' LibraOffice is in /etc but I don't see how to do this
    Basically the same thing for .desktops stored in non-standard places. So in this case -
    Code:
    cp /usr/lib/libreoffice/share/xdg/writer.desktop ~/Desktop/
    Code:
    chmod u+x Desktop/writer.desktop
    To show a bit more -
    In /usr/share/applications you'd find the "LibreOffice Writer" symlink.
    So if you right click on it > properties you'd see "Link Target" which will show you where the actual .desktop is (launchers are .desktop files that are executable

    In this case, screen 1, the path is truncated but easy to figure.
    ../../ mean 2 directories up (back), so that would be -
    /usr/share/applications, so /usr
    Then then rest of the path is shown -
    /lib/libreoffice/share/xdg/writer.desktop
    So then you'd know -
    /usr/lib/libreoffice/share/xdg/writer.desktop

    If desired another way other then cli command would be to browse there in nautilus, (/usr/lib/libreoffice/share/xdg/), > right click on "writer.desktop" > copy to > Desktop

    Then just right click on the writer.desktop on your Desktop > properties > permissions > click once in the Execute box - screen 2
    Attached Images Attached Images

  7. #7
    Join Date
    Jun 2007
    Beans
    13,078

    Re: creating desktop launcher?

    To possibly also answer thread question generically -

    You could just create your own or as mentioned use alacarte - easy to create own.

    A very basic min .desktop for an app launcher would be - blue needs to be filled in, Mimetype= is optional
    (you can use any name you wish on the Name= line, same for icon though for some icons better to full path on the Icon= line
    Code:
    [Desktop Entry]
    Version=1.0
    Name=
    Icon=
    Type=Application
    Categories=
    Exec=
    MimeType=
    So for libreoffice writer -

    Code:
    gedit ~/Desktop/writer1.desktop
    Code:
    [Desktop Entry]
    Version=1.0
    Name=LibreOffice Writer
    Icon=libreoffice-writer
    Type=Application
    Categories=Office;
    Exec=libreoffice --writer %U
    MimeType=
    If you wanted to be able to drag & drop supported files on to the launcher then add those mimes to the MimeType line, no spaces, it's one Long line though won't look quite that way in your text editor - screen

    So using the full set -
    Code:
    [Desktop Entry]
    Version=1.0
    Name=LibreOffice Writer
    Icon=libreoffice-writer
    Type=Application
    Categories=Office;
    Exec=libreoffice --writer %U
    MimeType=application/vnd.oasis.opendocument.text;application/vnd.oasis.opendocument.text-flat-xml;application/vnd.oasis.opendocument.text-template;application/vnd.oasis.opendocument.text-web;application/vnd.oasis.opendocument.text-master;application/vnd.sun.xml.writer;application/vnd.sun.xml.writer.template;application/vnd.sun.xml.writer.global;application/msword;application/vnd.ms-word;application/x-doc;application/x-hwp;application/rtf;text/rtf;application/vnd.wordperfect;application/wordperfect;application/vnd.lotus-wordpro;application/vnd.openxmlformats-officedocument.wordprocessingml.document;application/vnd.ms-word.document.macroenabled.12;application/vnd.openxmlformats-officedocument.wordprocessingml.template;application/vnd.ms-word.template.macroenabled.12;
    Then make your launcher, (.desktop) executable
    Attached Images Attached Images
    Last edited by mc4man; January 20th, 2013 at 05:45 PM. Reason: ~

  8. #8
    Join Date
    May 2009
    Location
    Oxfordshire, UK
    Beans
    Hidden!
    Distro
    Lubuntu 13.04 Raring Ringtail

    Re: creating desktop launcher?

    Quote Originally Posted by mc4man View Post
    To possibly also answer thread question generically -

    You could just create your own or as mentioned use alacarte - easy to create own.
    Hi,

    Thanks so much for the very detailed explanations above! Written in a way that I can digest and understand. I learnt something today

    Thanks again
    Caitlin

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •