Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 21

Thread: Cannot add "open with" to a file type

  1. #11
    Join Date
    May 2008
    Location
    United Kingdom
    Beans
    5,342
    Distro
    Ubuntu

    Re: Cannot add "open with" to a file type

    Quote Originally Posted by ingramproductions View Post
    Same problem here with rdp files
    Solution found! I'll post in your thread.

    Quote Originally Posted by Enigmapond View Post
    I wasn't implying any immoral activity...
    Sorry, I didn't intend to sound abrupt. I was trying to say that in my case, secrecy is not important; only protecting the data from unauthorised eyes.

    Quote Originally Posted by Vaphell View Post
    i've seen claims that some apps refuse to show in the other apps dialog if their .desktop file lacks %u in their Exec= line.
    That solved the problem! I added %u to the end of the Exec line in truecrypt.desktop (in folder /usr/share/applications), and rebooted. It was there and it works now. Thank you.

    Quote Originally Posted by mc4man View Post
    ... it's pretty easy to create & register a new mimetype
    That would be a great idea for aesthetic purposes, but I don't know how to do so. Can you give me a pointer, please?
    Always make regular backups of your data (and test them).
    Visit Full Circle Magazine for beginners and seasoned Linux enthusiasts.

  2. #12
    Join Date
    Jun 2007
    Beans
    17,337

    Re: Cannot add "open with" to a file type

    Quote Originally Posted by Paddy Landau View Post
    I added %u to the end of the Exec line in truecrypt.desktop (in folder /usr/share/applications), and rebooted. It was there and it works now. Thank you.


    That would be a great idea for aesthetic purposes, but I don't know how to do so. Can you give me a pointer, please?
    Didn't know that truecrupt installed a .desktop, so adding a %<letter> is all you needed to do, at least as far as r.click menu
    (In gnome3 only .desktops whose Exec= line ends with a %<letter> will be available in the r. click > Properties > open with menu
    (typically %U or %f

    The reason for creating & registering a new mime/filetype would be to be able to set truecrypt as default for that type, .tc & have another app as default for text/plain

    Maybe I'll grab TC & then show you exactly, otherwise post the .desktop. Also this can be done locally per user or system wide, which?

  3. #13
    Join Date
    Nov 2009
    Beans
    11

    Re: Cannot add "open with" to a file type

    Adding the "%u" phrase to the end of the Exec line in the file: "/usr/share/applications/Guitar Pro 6.desktop" solved the issue for me too!

    Thanks! ^^

  4. #14
    Join Date
    May 2008
    Location
    United Kingdom
    Beans
    5,342
    Distro
    Ubuntu

    Re: Cannot add "open with" to a file type

    Quote Originally Posted by mc4man View Post
    Maybe I'll grab TC & then show you exactly, otherwise post the .desktop. Also this can be done locally per user or system wide, which?
    Well, system-wide would make sense, I suppose. But I have no clue as to how to go about registering a mime-type. If you happen to know, that would be great, otherwise I'll use Google.
    Always make regular backups of your data (and test them).
    Visit Full Circle Magazine for beginners and seasoned Linux enthusiasts.

  5. #15
    Join Date
    Jun 2007
    Beans
    17,337

    Re: Cannot add "open with" to a file type

    Didn't grab TC yet but for system-wide something like this (I tend to do stuff locally, if anyone has any corrections please do so

    First create an .xml, I did so in ~/Documents, named it truecrypt.xml

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
        <mime-type type="application/x-true-crypt">
            <comment>TrueCrypt files</comment>
            <glob pattern="*.tc"/>
        </mime-type>
    </mime-info>
    Then add, locally no sudo is used

    Code:
    sudo xdg-mime install --novendor  ~/Documents/truecrypt.xml
    Locally this isn't needed, probably is for system-wide
    Code:
    sudo update-mime-database   /usr/share/mime
    After that if using a custom .desktop I'd use xdg-desktop-menu install --novendor /path to .desktop but no need here. Instead you open the current .desktop & add to the end of the MimeType= line this

    application/x-true-crypt;
    or if there is no such line then create it

    Code:
    MimeType=application/x-true-crypt
    Then do a log out in
    Last edited by mc4man; May 10th, 2012 at 09:26 PM. Reason: spelling

  6. #16
    Join Date
    May 2008
    Location
    United Kingdom
    Beans
    5,342
    Distro
    Ubuntu

    Re: Cannot add "open with" to a file type

    mc4man, that's excellent, thank you!
    Always make regular backups of your data (and test them).
    Visit Full Circle Magazine for beginners and seasoned Linux enthusiasts.

  7. #17
    Join Date
    Sep 2009
    Beans
    92

    Re: Cannot add "open with" to a file type

    I would really like to open Guitar pro 6 with files with the extension .gpx or .gp5 or gp4. (.gp?) However I cannot make Ubuntu 12.04 do that.

    This hint is probably very good I must confgess I dont understand it :

    Adding the "%u" phrase to the end of the Exec line in the file: "/usr/share/applications/Guitar Pro 6.desktop" solved the issue for me too!
    Thanks! ^^

  8. #18
    Join Date
    May 2008
    Location
    United Kingdom
    Beans
    5,342
    Distro
    Ubuntu

    Re: Cannot add "open with" to a file type

    Quote Originally Posted by Finn bjerke View Post
    This hint is probably very good I must confgess I dont understand it :
    • Press Alt-F2 and enter the following command:
      Code:
      gksudo gedit '/usr/share/applications/Guitar Pro 6.desktop'
    • Find the line that starts with Exec=.
    • At the end of the line add a space and then %u
    • Save the file and exit.
    • Log out and log in again (or just reboot).
    Last edited by Paddy Landau; May 13th, 2012 at 10:14 AM. Reason: Corrected keystroke
    Always make regular backups of your data (and test them).
    Visit Full Circle Magazine for beginners and seasoned Linux enthusiasts.

  9. #19
    Join Date
    Sep 2009
    Beans
    92

    Re: Cannot add "open with" to a file type

    thanks for the kind answer .
    F2 dims the light on the laptop, so i use terminal instead is that OK?

    It seems I can only find this file

    in

    ./usr/ Share/applications/ guitar pro 6

    I can not see the extension

    right click / properties i get this

    /opt/GuitarPro6/launcher.sh

    type skrivebordskonfigurationsfil (application/x-desktop)

    I understand that Ill need to add %u after /opt/GuitarPro6/launcher.sh ??
    Last edited by Finn bjerke; May 13th, 2012 at 12:22 AM.

  10. #20
    Join Date
    Sep 2009
    Beans
    92

    Wink Re: Cannot add "open with" to a file type

    Using the text editor from terminal I solved the problem Im very gratefull, now I can open guitar pro with a .gp? file which is wonderfull. I had to open guitar pro 6.desktop directly from the text editor. Learned a lot from that actually

    gksudo gedit '/usr/share/applications/Guitar Pro 6.desktop'
    is almost correct this works in terminal
    gksudo gedit '/usr/share/applications/GuitarPro6.desktop'
    thx again.
    Last edited by Finn bjerke; May 13th, 2012 at 02:08 AM.

Page 2 of 3 FirstFirst 123 LastLast

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
  •