Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: How do I add a custom launcher to the menu in Ubuntu 12.04?

  1. #1
    Join Date
    Jul 2006
    Beans
    Hidden!

    How do I add a custom launcher to the menu in Ubuntu 12.04?

    Hi,

    I've built The GIMP 2.8 from source. It's in a custom location, and I want to add it to the launcher so that I can run it as any other application without launching it via a terminal.

    How do I do this under Unity on Ubuntu 12.04?

  2. #2
    Join Date
    May 2006
    Beans
    45

    Re: How do I add a custom launcher to the menu in Ubuntu 12.04?

    The easiest way is to install Main Menu in software cetner and then you can add the program by creating a new item. It can then be placed on the sidebar if you like.

  3. #3
    Join Date
    Oct 2005
    Location
    Syracuse, NY
    Beans
    659
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: How do I add a custom launcher to the menu in Ubuntu 12.04?

    Create an entry with Alacarte, it's pre-installed. Just press the super key and type alacarte.

  4. #4
    Join Date
    Jul 2006
    Beans
    Hidden!

    Re: How do I add a custom launcher to the menu in Ubuntu 12.04?

    Thanks for the tips. I don't have alacarte on my Ubuntu 12.04 system, but I guess I could install it. I haven't tried Main Menu either, but I found another recipe online that suggested I create a text file called program.desktop on my Desktop, and edit it as I needed.

    It sort of worked, but not completely. I need to set a custom environment variable (LD_LIBRARY_PATH). On the command line, I run gimp 2.8 like this:

    Code:
    LD_LIBRARY_PATH=$HOME/build/lib $HOME/build/bin/gimp-2.8
    However, just pasting this command on the Exec= line doesn't work, presumably because this string is just exec()-ed later. Is there any way to work around this from the launcher, or do I need a wrapper script for this?

  5. #5
    Join Date
    Jun 2007
    Beans
    11,741

    Re: How do I add a custom launcher to the menu in Ubuntu 12.04?

    You can either use the gimp.desktop in gimp install (likeky opt/..) or create a new one.

    New one, - as far as Icon= line, will work if gimp 2.6 is innstalled or the comm. below will make it work.
    Otherwise copy the gimp.png to like Pictures or Documents & full path the Icon= line
    Code:
    gedit ~/.local/share/applications/gimp2.desktop
    adjust blue if different

    Code:
    [Desktop Entry]
    Version=1.0
    Type=Application
    Name=Gimp 2.8
    Comment=Create images and edit photographs
    Exec=/opt/gimp-2.8/bin/gimp-2.8 %U
    TryExec=/opt/gimp-2.8/bin/gimp-2.8
    Icon=gimp
    Terminal=false
    Categories=Graphics;2DGraphics;RasterGraphics;GTK;
    X-GNOME-Bugzilla-Bugzilla=GNOME
    X-GNOME-Bugzilla-Product=GIMP
    X-GNOME-Bugzilla-Component=General
    X-GNOME-Bugzilla-Version=2.8.0
    X-GNOME-Bugzilla-OtherBinaries=gimp-2.8
    MimeType=application/postscript;application/pdf;image/bmp;image/g3fax;image/gif;image/x-fits;image/pcx;image/x-portable-anymap;image/x-portable-bitmap;image/x-portable-graymap;image/x-portable-pixmap;image/x-psd;image/x-sgi;image/x-tga;image/x-xbitmap;image/x-xwindowdump;image/x-xcf;image/x-compressed-xcf;image/x-gimp-gbr;image/x-gimp-pat;image/x-gimp-gih;image/tiff;image/jpeg;image/x-psp;image/png;image/x-icon;image/x-xpixmap;image/svg+xml;application/pdf;image/x-wmf;image/jp2;image/jpeg2000;image/jpx;image/x-xcursor;
    Run this to allow Icon=gimp to work if gimp-2.6 isn't installed. Adjust blue if different
    The idea is to get a gimp.png into that pixmaps folder
    Code:
    sudo cp /opt/gimp-2.8/share/icons/hicolor/48x48/apps/gimp.png /usr/share/pixmaps/
    Then just browse to ~/.local/share/applications & drag gimp2.desktop on to the launcher

  6. #6
    Join Date
    Dec 2007
    Location
    California
    Beans
    4,871
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How do I add a custom launcher to the menu in Ubuntu 12.04?

    alacarte and "main menu" are the same program, and they do all of this work for you.

    offtopic: Things just keep getting bumped out of the default install that really should be there, I mean taking out the menu editor... really?
    "You can't expect to hold supreme executive power just because some watery tart lobbed a sword at you"

    "Don't let your mind wander -- it's too little to be let out alone."

  7. #7
    Join Date
    Jul 2006
    Beans
    Hidden!

    Re: How do I add a custom launcher to the menu in Ubuntu 12.04?

    jerome1232, I installed alacarte/Main Menu, but can't see that I can add any custom environment variables. Am I missing something?

  8. #8
    Join Date
    Dec 2007
    Location
    California
    Beans
    4,871
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How do I add a custom launcher to the menu in Ubuntu 12.04?

    I'm sorry, I missed that post, is there a reason you don't want to put that into your ~/.pam_environment (for a per user thing) or /etc/environment as a system wide setting.

    Requires re-login to take affect.

    edit: Also I guess alacarte can't do that, if you wanted it loaded only when you start gimp, see here https://help.ubuntu.com/community/En...nment_variable
    "You can't expect to hold supreme executive power just because some watery tart lobbed a sword at you"

    "Don't let your mind wander -- it's too little to be let out alone."

  9. #9
    Join Date
    Jun 2007
    Beans
    11,741

    Re: How do I add a custom launcher to the menu in Ubuntu 12.04?

    Whether it matters here or not would depend on use case but - alacarte won't include a MimeTypes= line which is needed for DnD of files on to the launcher icon

    Also I'd check to see if it ends the Exec= line with a %<letter>, either U or f. If not the app won't show on the r. click context menu

    Sometimes better to do yourself

  10. #10
    Join Date
    Jul 2006
    Beans
    Hidden!

    Re: How do I add a custom launcher to the menu in Ubuntu 12.04?

    Of course, env ought to do the trick! I'll give that a shot, thanks!!

Page 1 of 2 12 LastLast

Tags for this Thread

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
  •