Results 1 to 6 of 6

Thread: How to edit "Open with" Menu

  1. #1
    Join Date
    Jan 2007
    Beans
    46

    Exclamation How to edit "Open with" Menu

    Hi,
    I would like help in editing the "Open with" Menu in Gnome.

    For example, I have a licensed version of PDF Studio and I would like to use this program to view/edit PDF Files instead of Acrobat Reader. So I select the file and right click and choose "Open with">"Open with other applicaton", since PDF Studio is not present in the list of programs, we select the "Use Custom Command" textbox and type in " /bin/sh "/opt/PDFStudio/PDFStudio" ". With this PDF file opens in PDF Studio.

    Now my questions are

    1. How do I get PDF Studio into the list of Programs that the "Open with" dialoge box presents??

    2. Going back to the example, after I opened the PDF file with PDF Studio for the first time the entry in the "Open with" menu states "Open with sh" instead of "Open with PDF Studio". How do I change the name from sh to PDF studio with correct icon??

    Any help is appreciated.

    Thanks!!!
    Last edited by cyanide; October 5th, 2009 at 05:45 AM.

  2. #2
    Join Date
    Feb 2006
    Location
    St. Louis, Missouri, USA
    Beans
    87
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: How to edit "Open with" Menu

    You'll need to create appropriate mime-info entries for PDF Studio. Take a look at http://http://developer.gnome.org/do...mime-info.html and http://http://www.freedesktop.org/wi...mime-info-spec for starters.

    What you created via nautilus is probably stored under ~/.local/share/mime-info

    HTH
    Any technology distinguishable from magic is insufficiently advanced.
    - Cleon, Foundation's Fear
    Linux user #143407 - Ubuntu user #14010

  3. #3
    Join Date
    Feb 2009
    Beans
    147
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: How to edit "Open with" Menu

    You'll need to create an item for the program in the Applications menu. Right-click on Applications, Edit Menus, choose a submenu to put it in (e.g. Office or Other), and then click "New Item" to add the program to the list. In order for the new item to show up on the Open With menu, however, you have to add "%f" after the command. So your command would be '/bin/sh "/opt/PDFStudio/PDFStudio" %f'.

    On a side note, if you created the command through "use custom command," then there's probably a menu entry already defined whose name is the same as your command. In that case you can just edit the name and icon of the existing one.

  4. #4
    Join Date
    Jan 2007
    Beans
    46

    Talking Re: How to edit "Open with" Menu

    Wow it worked!! Thanks a million man!! U rock!!
    Attached Images Attached Images
    Last edited by cyanide; October 5th, 2009 at 04:16 PM.

  5. #5
    Join Date
    Mar 2008
    Location
    Canada
    Beans
    250
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: How to edit "Open with" Menu

    How about doing this for folders?

    I have too many entries in the "Open With" menu for folders.

    I know how to add entries, but not how to remove/edit them.

    Going to properties, there is no "Open with" tab.

    is there a file somewhere that I can manually edit?

  6. #6
    Join Date
    Aug 2009
    Location
    Australia
    Beans
    80
    Distro
    Lubuntu 12.10 Quantal Quetzal

    Re: How to edit "Open with" Menu

    Quote Originally Posted by alecz20 View Post
    How about doing this for folders?

    I have too many entries in the "Open With" menu for folders.

    I know how to add entries, but not how to remove/edit them.

    Going to properties, there is no "Open with" tab.

    is there a file somewhere that I can manually edit?

    Solution (Karmic): Open HOME folder and show hidden files, open .local/share/applications and edit mimeapps.list under [Added Associations].
    Delete inode entries from end ";" to previous ";" leaving no double ;;
    Save and exit.
    Note: This will create a backup file "mimeapps.list~" you can delete that if you wish.

    Should look similar to this:
    Code:
    [Added Associations]
    text/x-uri=gedit.desktop;openoffice.org-writer.desktop;
    inode/directory=nautilus-folder-handler.desktop;

    Last edited by pj_kare; March 21st, 2010 at 06:22 AM. Reason: Worked Out Solution

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
  •