6

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).

1

2 Answers 2

1

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!

2
  • Couldn't find it on Solaris. Where does it usually live? Commented Sep 21, 2011 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
    Commented Sep 22, 2011 at 5:10
1

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.

6
  • 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? Commented Sep 19, 2011 at 17:32
  • @Brian Knoblauch I updated the answer with more details, if you're still stuck, please give more information :)
    – sillyMunky
    Commented Sep 20, 2011 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. Commented Sep 21, 2011 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
    Commented Sep 21, 2011 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) Commented Aug 15, 2012 at 18:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .