Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

The system in question is Solaris, using the Gnome type interface (Java Desktop Environment). We have occasional issues with users managing to mess up their file assocations (most notably .tif). Trying to find out what files to edit from a command line to change those file associations. (as logging in graphically as them to use the desktop utilities can be a bit of a problem remotely).

share|improve this question
1  
Is Nautilus the file manager? This might help askubuntu.com/questions/16580/… (Ignore my answer below, I can't read) –  Mike Sep 4 '11 at 20:08
add comment

2 Answers

Xdg-utils is used for configuring (sort of) desktop environments in terms of things like which app opens which type of file. I once had (darn, can't find it now, I'll try to track it down and post it) a script that works like Mac OS X's open command. It mainly used xdg-open.

Note that this is not specific to Gnome; Xdg-utils works with e.g. KDE, Xfce, fluxbox etc.

Good luck!

share|improve this answer
    
Couldn't find it on Solaris. Where does it usually live? –  Brian Knoblauch Sep 21 '11 at 12:00
    
I'm completely unfamiliar with managing software packages on Solaris. However, you can get the latest Xdg-utils src here: portland.freedesktop.org/download/xdg-utils-1.1.0-rc1.tar.gz - you'll have to build and install it. I'm happy to help you with that if you want to hook up on IRC, Skype, Jabber, etc. –  rjp Sep 22 '11 at 5:10
add comment

You need to edit /usr/share/applications/default.list. The format should be obvious, have fun ;)

p.s. there may be a command line tool I'm not aware of which does this for you ... I like sed though ;)

Update: This particular location is often correct for Ubuntu installations and some other operating systems where gnome is the default window manager (although sometimes it is in /usr/share/gnome/applications/ .

If you're in luck, it will use the XDG_* environment variables, explained here: http://developer.gnome.org/menu-spec/

If it is not there and you don't have those envrionment variables set, you can try using find:

find / -name default.list 2> /dev/null

Sometimes, a slightly different system is used; On my laptop I use LXDE (which I recommend, btw), /usr/share/applications contains .desktop files, creating a new one in this directory adds items to the menu, the contents of the file dictates where, what it is called, and what it runs (and icon etc.). This system is also in widespread use, try the find command to see if your system has .desktop files. Copy one to a new file and modify it (easiest way).

find / -name "*.desktop" 2> /dev/null

If you still can't sort it out, I think you'll need to give more information about why your linux version, window manager version and so on.

share|improve this answer
    
Hmmm, no default.list in that directory. Couldn't find one nearby in the directory structure either. Nothing else in that general area appears to be a list of any kind either. I don't think this is it. What OS/interface do you have where it works this way? –  Brian Knoblauch Sep 19 '11 at 17:32
    
@Brian Knoblauch I updated the answer with more details, if you're still stuck, please give more information :) –  sillyMunky Sep 20 '11 at 19:55
    
No "default.list" on the filesystem. The ".desktop" files DO live in "/usr/share/applications". It's not Linux, it's Solaris (a Unix). Major version 5.10, unsure of the exact update level (but it shouldn't matter, that's mostly bug fixes, etc). Running the 141445-09 kernel in 32-bit mode. –  Brian Knoblauch Sep 21 '11 at 12:59
    
I saw that its solaris, but thats less important than the fact that its essentially running the same window manager. Did you try my suggestions above? For example, copy a .desktop file, modify information such as the title, and you should see the new entry in your menu. –  sillyMunky Sep 21 '11 at 17:22
    
Ubuntu 10.04 / Linux 2.6.32-42-generic (system is old, updates are current) calls it defaults.list (with an s) –  Robbie Morrison Aug 15 '12 at 18:20
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.