Ninja Nichols

The discipline of programming

Multiple copies of program in “Open With” dialog

Why are there 20 copies of Photoshop?!

Sometimes duplicate copies of the same program seem to mysteriously show up in the “Open With” dialog. The problem seems to be worse for Windows programs installed with Wine.

The reason there are so many duplicate entries in the “Open With” dialog is due to the way file associates are handled in Wine. Every time a new program is installed in Windows, it has the opportunity to register itself as the handler program for a particular file type. This behavior is also present in Wine.

Each file handler is stored as a .desktop file in ~/.local/share/applications.

Sometimes though, Wine will create a new entry for each and every file type associated with a program. Take MS Excel for example, I have a distinct entry for .xls, .xlsx, .xlsm, .xltm, and .xlsb. These are just for Microsoft’s own variants of their Excel spreadsheet format and each one creates a new entry in the Open With dialog!

At this point, there are two options.

  1. Try to combine several entries together by allowing each one to handle several file types. This is accomplished by editing the “MimeType=” line in the .desktop file. The general format is “MimeType=catagory1/type1; catagory2/type2;” where “catagory1/type1” is something like “text/csv”.
  2. The above method seemed like too much work, so I opted for the second choice. Copy all the file type entries that you don’t need to another directory. I moved all but the essential entires to ~/.local/share/applications-old.

After a little cleaning up my “Open With” dialog looks much better.

My New OpenBox Desktop

OpenBox is a minimalistic desktop window manager which can be run with or instead of Gnome or KDE. The whole environment is very customizable with nearly everything being controlled by a few scripts and XML documents.

Wallpaper: Arch gray
Icons: Elegant-AwOken (part of Elegant Gnome Pack)
OpenBox window decoration: 1977 OpenBox
GTK theme: Elegant GTK
Vim theme: wombat
Conky: .conkyrc plus power consumption script
Tint2: .tint2rc