Find the answer to your Linux question:
Results 1 to 2 of 2
I know this is possible in GUI gnome. But is it possible to do it too in shell command?? Let say if i type this in shell: #file.txt then it ...
  1. #1
    Just Joined!
    Join Date
    Oct 2010
    Posts
    8

    how to make a default application open a certain extension file

    I know this is possible in GUI gnome.

    But is it possible to do it too in shell command??
    Let say if i type this in shell:
    #file.txt

    then it will open gnome-editor in nautilus which open file.txt.


    note for other newbie:
    gnome is the desktop manager.
    nautilus is the explorer windows in gnome.
    gnome-editor is one like notepad in MS windows.

    thanks

  2. #2
    Linux Newbie theKbStockpiler's Avatar
    Join Date
    Sep 2010
    Location
    Upstate NY
    Posts
    195

    What would the purpose serve?

    Any sort of sophistication is going to be in a shell script anyways is it not? If there is an answer I would guess it would lie in environmental variables. I'm not an expert in this area but I don't think that your question has a market sort of thing. I don't know if bash will do a conditional statement at all but you could only give it one alternative. Your command would have to be an argument would it not?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...