Results 1 to 8 of 8

Thread: Open files with custom commands in 12.04

  1. #1
    Join Date
    Feb 2012
    Beans
    5

    Open files with custom commands in 12.04

    Hi

    As an astronomer, I frequently use ds9 to open .fits files. Ds9 comes in a bin file and I but it in the home/username/bin folder, which is added to my .profile file. I can open .fits files with ds9 via terminal commands, and the program runs fine.

    However, when I double click on a .fits file, I can't open it with ds9 because it doesn't appear in the 'open with' applications list.

    How do I add custom bin apps to this list?

    Thanks!
    D.

  2. #2
    Join Date
    Jun 2006
    Location
    Nux Jam
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Open files with custom commands in 12.04

    .bin is a special piece of the system, and it is not a good idea to set an app to be the default, it will disturb and confuse the system.

    so either you continue using the terminal or you might rename that .bin differently, then you will be able to set a "open with" app for it.

  3. #3
    Join Date
    Oct 2009
    Location
    Elgin, IL USA
    Beans
    3,363
    Distro
    Ubuntu 16.10 Yakkety Yak

    Re: Open files with custom commands in 12.04

    dino99 didn't quite read carefully enough that you are not trying to open a .bin file, but a .fits file.

    From Help in the file manager:


    • Select a file of the type whose default application you want to change. For example, to change which application is used to open MP3 files, select a .mp3 file.
    • Right-click the file and select Properties.
    • Select the Open With tab.
    • Select the application you want and click Set as default. By default, the file manager only shows applications it knows can handle the file. To look through all the applications on your computer, click Show other applications.
      If Other Applications contains an application you sometimes want to use, but don't want to make the default, select that application and click Add. This will add it to Recommended Applications. You will then be able to use this application by right-clicking the file and selecting it from the list.


    This changes the default application not just for the selected file, but for all files with the same type.
    i5 650 3.2 GHz upgraded to i7 870, 16 GB 1333 RAM, nvidia GTX 1060, 32" 1080p & assorted older computers

  4. #4
    Join Date
    Feb 2012
    Beans
    5

    Re: Open files with custom commands in 12.04

    Hi guys, thanks for the replies.

    I indeed need to open a .fits file using a program located in my local bin folder, which is added to my .profile.

    I can open .fits files using the command $ ds9 <filename>, but I want to be able to open .fits files by double clicking on them.

    Attached is a screenshot of the 'open with' tab of a .fits file.
    As you can see, Ds9 is not in the 'other applications' list and I have no idea how to get it in that list (as it once did on Ubuntu 10.04)
    Attached Images Attached Images

  5. #5
    Join Date
    Mar 2009
    Beans
    11
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Open files with custom commands in 12.04

    Hi Duveltje,

    Fellow astronomer here, and I hit the same problem trying to set up TOPCAT to be the default app for opening .fits catalogue files. I don't think either of the previous posters entirely grasped the problem.

    I also can't believe it me took this long to figure out how to do such a simple thing in 12.04(!!), but the simple way is this:

    1) Install Ubuntu Tweak:

    sudo add-apt-repository ppa:tualatrix/ppa
    sudo apt-get update
    sudo apt-get install ubuntu-tweak

    2) Open it up on the command line, $ ubuntu-tweak

    3) Navigate to Admins > File Type Manager and click 'All'. This may take a moment whilst it scans all your mimetypes.

    4) Uncheck 'Only show filetypes with associated applications' at the bottom (again, may take some time).

    5) Click anywhere in the right-hand panel and start typing 'fits' to begin searching for the 'FITS document' mimetype. Hopefully you should find it.

    6) Double click it, and click 'Add' and then your custom command (for me, topcat, for you, ds9).

    [N.B.: If you don't find the FITS mimetype listed, I would recommend installing GIMP as GIMP seems to have the FITS mimetype listed as a format it can open. You can also check the current mimetype of your .fits file by right-clicking it and selecting 'Properties' and then looking at 'Type'.]

    Enjoy! I can't believe such simple functionality has been removed from Ubuntu, it really has gone downhill over the last two or so years. Sad to see.

    Hopefully that helps,

    Cheers!
    Last edited by IraGainesUK; September 16th, 2012 at 04:12 PM.

  6. #6
    Join Date
    Mar 2008
    Beans
    12

    Re: Open files with custom commands in 12.04

    Hi,

    install the file manager thunar. It has the old good Gui to choose the commands.

    I would open a bug. Such a simple and useful function removed..........

    Bug already opened. Please log in and submit the affection.

    https://bugs.launchpad.net/ubuntu/+s...us/+bug/984930

    Cheers
    Last edited by aleandrodasilva; September 30th, 2012 at 01:39 PM.

  7. #7
    Join Date
    Feb 2012
    Beans
    5

    Re: Open files with custom commands in 12.04

    Quote Originally Posted by IraGainesUK View Post
    Hi Duveltje,

    Fellow astronomer here, and I hit the same problem trying to set up TOPCAT to be the default app for opening .fits catalogue files. I don't think either of the previous posters entirely grasped the problem.

    I also can't believe it me took this long to figure out how to do such a simple thing in 12.04(!!), but the simple way is this:

    1) Install Ubuntu Tweak:

    sudo add-apt-repository ppa:tualatrix/ppa
    sudo apt-get update
    sudo apt-get install ubuntu-tweak

    2) Open it up on the command line, $ ubuntu-tweak

    3) Navigate to Admins > File Type Manager and click 'All'. This may take a moment whilst it scans all your mimetypes.

    4) Uncheck 'Only show filetypes with associated applications' at the bottom (again, may take some time).

    5) Click anywhere in the right-hand panel and start typing 'fits' to begin searching for the 'FITS document' mimetype. Hopefully you should find it.

    6) Double click it, and click 'Add' and then your custom command (for me, topcat, for you, ds9).

    [N.B.: If you don't find the FITS mimetype listed, I would recommend installing GIMP as GIMP seems to have the FITS mimetype listed as a format it can open. You can also check the current mimetype of your .fits file by right-clicking it and selecting 'Properties' and then looking at 'Type'.]

    Enjoy! I can't believe such simple functionality has been removed from Ubuntu, it really has gone downhill over the last two or so years. Sad to see.

    Hopefully that helps,

    Cheers!
    This solved my problem. Many thanks IraGainesUK! Good luck with your research

  8. #8
    Join Date
    Apr 2013
    Beans
    1

    Re: Open files with custom commands in 12.04

    IraGainesUK :: Thanks Also solved my problem for the PHP file open with zend studio in ubuntu 12.04

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
  •