cayfo001 at umn.edu
Tue Aug 28 21:07:14 CEST 2007
Sorry, I got sidetracked with other things for a while. See responses below.
Erik Harrison wrote:
> On 8/24/07, Steve Cayford <cayfo001 at umn.edu> wrote:
>> Erik Harrison wrote:
>>> On 8/24/07, Steve Cayford <cayfo001 at umn.edu> wrote:
>>>> Hello, I'm running a Xubuntu 7.04 (Feisty) system.
>>>> When a user right-clicks or double-clicks on a file icon, what controls the
>>>> preferred application that gets listed in the context menu? (eg. Open with...)
>>>> I know I can change it under the file "properties" and the setting will then
>>>> show up in ~/.local/share/applications/defaults.list. However, I would like to
>>>> set the initial default so users don't need to mess with this when they first
>>>> login. Specifically, double-clicking a text file opens it with emacs by
>>>> default, which is a bit technical for my new users.
>>>> It seems that this should be controlled by
>>>> /etc/xdg/xubuntu/applications/defaults.list, but there is no entry in there
>>>> specifying emacs. In fact the entry for text/plain is mousepad.desktop.
>>> Not sure exactly what you are seeing, as it works for me here, same
>>> distro and all.
>>> Did you check the local defaults.list file, to make sure that it
>>> wasn't altered to open Emacs? Is this a completely fresh user on the
>> Yes, I start out with a new user, verify that the
>> ~/.local/share/applications/defaults.list file only contains "[Default
>> Applications]" with no entries. But I get emacs when double-clicking a text file.
> Exactly the same setup, and nada.
>> I've done a fair bit of system modification since I'm using it for an LTSP
>> server so I may have tweaked something by accident, but I can't figure out what.
> Alrighty. Let's dig a little. What is the value of $XDG_DATA_DIRS in
> your environment?
This is not set. I don't see any XDG environment variables at all.
> If you strace Thunar starting up, grepping for opens, do you see it
> open any defaults.list file in any new locations?
Ah. First it looks in ~/.local/share/applications/defaults.list, then
/usr/share/applications/defaults.list (which indicates gedit.desktop), then
/usr/local/share/applications/defaults.list (which does not exist).
gedit.desktop points to gedit, but gedit is not installed on here. So I
suppose I should edit /usr/share/applications/defaults.list? Can I just
symlink that to /etc/xdg/xubuntu/applications/defaults.list?
> After running thunar, and opening a text file with Emacs, what is the
> contents of the user's defaults.list?
Just opening the file with either editor doesn't seem to have any effect. If I
then look under the file's properties and select the open with emacs option,
the defaults.list becomes "text/plain=emacs21.desktop"
> Xubuntu shouldn't have emacs anywhere in the system defaults.list. Does yours?
I find three system files named "defaults.list":
/usr/share/applications/defaults.list and /etc/gnome/defaults.list both
indicate gedit.desktop for text/plain while
/etc/xdg/xubuntu/applications/defaults.list indicates mousepad.desktop. None
of the files have any references to emacs.
> Does Mousepad run on this machine?
> If you run Thunar from a terminal, does it bitch when trying to open the file?
No output at all. Just opens it with emacs.
> And, what is the exact mime type of the file as reported in the
> properties dialog?
The properties dialog says "plain text document", but the local defaults list
then shows the entry under "text/plain".
> Not saying that I have any idea what the culprit is, but I'll try to
> help you hunt it down.
Thanks for any suggestions. For now I'm just putting the mousepad entry in the
More information about the Xfce