Results 1 to 6 of 6

Thread: How to open a file of an unknown type with a specific application?

  1. #1
    Join Date
    Nov 2005
    Location
    Barcelona
    Beans
    254
    Distro
    Ubuntu 12.04 Precise Pangolin

    How to open a file of an unknown type with a specific application?

    I am trying to associate all ".tc" files with a program called truecrypt. The problem is, if I choose open with and try to select is as an application, it neither shows up, nor permits me to choose a terminal command:


    Nor does find applications online find anything useful. Is there another GUI or a command from the terminal which will associate all files of type .tc with truecrypt? I already have it installed.

  2. #2
    Join Date
    Apr 2010
    Location
    Littleton, CO
    Beans
    203
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: How to open a file of an unknown type with a specific application?

    Yes, you can do this through the terminal easily.

    Fire up the terminal and drag the application you want to use into it, then drag the file into the window and hit enter.

    The application should then open the truecrypt file.
    Feel free to add me on Skype for a quicker response, but tell me you're from the forums!
    Read the following if you want, but I'm warning you: it may be complete nonsense!

  3. #3
    Join Date
    Jul 2007
    Location
    Poland
    Beans
    4,499
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: How to open a file of an unknown type with a specific application?

    find truecrypt's .desktop file in /usr/share/applications and see if the 'Exec=...' line has a placeholder for opened file, something like %u. For some reason programs lacking that placeholder don't show up in 'open with' dialogs.
    if your question is answered, mark the thread as [SOLVED]. Thx.
    To post code or command output, use [code] tags.
    Check your bash script here // BashFAQ // BashPitfalls

  4. #4
    Join Date
    Nov 2005
    Location
    Barcelona
    Beans
    254
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How to open a file of an unknown type with a specific application?

    hi dolphin,

    thanks for the answer. couldn't drag the application into the terminal window, either from the launcher or the window itself. It just puts one window on top another. I notice you are using Xubuntu..... which terminal does it use?

    Quote Originally Posted by dolphin194 View Post
    Yes, you can do this through the terminal easily.

    Fire up the terminal and drag the application you want to use into it, then drag the file into the window and hit enter.

    The application should then open the truecrypt file.

  5. #5
    Join Date
    Oct 2008
    Beans
    3,509

    Re: How to open a file of an unknown type with a specific application?

    I did what Vaphell suggested.

    Code:
    gksudo gedit /usr/share/applications/truecrypt.desktop
    and changed the line...
    Code:
    Exec=/usr/bin/truecrypt
    to
    Code:
    Exec=/usr/bin/truecrypt %u
    Truecrypt then appeared in the open with menu.

    Clicking on a .tc file and choosing to open with truecrypt
    then brings up a password window.
    Attached Images Attached Images
    Last edited by stinkeye; January 29th, 2013 at 07:07 PM.

  6. #6
    Join Date
    Nov 2005
    Location
    Barcelona
    Beans
    254
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How to open a file of an unknown type with a specific application?

    Yes! Thanks, Vaphell! Thanks, stinkeye! I didn't get it at first (nautilus didn't show me the .desktop file extension, which was annoying, making me think the applications folder only contained binaries), but figured it out just now! Thanks to both of you!

    Quote Originally Posted by stinkeye View Post
    I did what Vaphell suggested.

    Code:
    gksudo gedit /usr/share/applications/truecrypt.desktop
    and changed the line...
    Code:
    Exec=/usr/bin/truecrypt
    to
    Code:
    Exec=/usr/bin/truecrypt %u
    Truecrypt then appeared in the open with menu.

    Clicking on a .tc file and choosing to open with truecrypt
    then brings up a password window.

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
  •