Default applications [SOLVED]
Forum rules
LMDE 2 has reached end of support as of 1-1-2019
LMDE 2 has reached end of support as of 1-1-2019
Default applications [SOLVED]
I installed WINE a short while ago bacause there was a specialst app that I wanted to take a look at. Since then, if I double click on a file in thunar it automatically tries to use a Windows app to load the file e.g. text files default to Notepad rather than Gedit. I can right click and select the appropriate app but needless to say I usually remember to do that a split second after double clicking on a jpeg only to find Internet Explorer loading Is there a simple way to change the behaviour (other than removing WINE)?
Thanks.
Thanks.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: Default applications
I tried Wine once, this happened... Purged it immediately Anyway, you can easily fix this
Open a terminal and type (or replace gedit with your editor of choice):
Very likely you will see here some file types being associated with Wine. You can delete those lines and save this file. If you have any doubts about it, please post your file contents on http://pastebin.com and share the link here.
If you can't find it in that file, please share the output of the following two command:
Open a terminal and type (or replace gedit with your editor of choice):
Code: Select all
gedit ~/.local/share/applications/defaults.list
If you can't find it in that file, please share the output of the following two command:
Code: Select all
locate defaults.list | xargs ls -l
locate defaults.list | xargs ls -lc
Re: Default applications
Thanks Vincent. I have found the file easily enough but there are no signs of any Windows apps?
The most common files that I am likely to click on are jpgs and text files and they are not covered. I am not really sure why the desktop is behaving this way
My wife's login works fine, but she hasn't used WINE
Code: Select all
[Default Applications]
audio/mpeg=totem.desktop
video/x-theora+ogg=totem.desktop
application/pdf=evince.desktop
x-content/audio-player=rhythmbox.desktop
My wife's login works fine, but she hasn't used WINE
Re: Default applications
Eh, you missed the last part of my post Please share the output of the following two commands:
This will let me confirm which file to fix. As your wife also has an account, it will probably be fixed by copying the .config/applications/defaults.list file from her home folder to your .config/applications folder.
Code: Select all
locate defaults.list | xargs ls -l
locate defaults.list | xargs ls -lc
Re: Default applications
OK. I have just had a poke around and running the commands that you gave simply lists all of the files that I have in my home folder. The locate command does not return anything by itself. I have also checked the .config/applications/default.list from my wife's login and it is identical to the output that I have provided for my file.
Ah - I have just realised that I have posted this in the XFCE section - I am running XFCE BUT on LMDE if that makes a difference?
Ah - I have just realised that I have posted this in the XFCE section - I am running XFCE BUT on LMDE if that makes a difference?
Re: Default applications
Moved here by moderator
I'm on LMDE XFCE as well. Are you sure you ran the correct command and checked the right file? Please do share the output of this command. Don't try typing it, please click select all, then copy it and paste it to the terminal to run:
This should output similar to:
I'm on LMDE XFCE as well. Are you sure you ran the correct command and checked the right file? Please do share the output of this command. Don't try typing it, please click select all, then copy it and paste it to the terminal to run:
Code: Select all
locate defaults.list | xargs ls -l
Code: Select all
mint@mint ~ $ locate defaults.list | xargs ls -l
-rw-r--r-- 1 root root 12966 Sep 18 2010 /etc/gnome/defaults.list
-rw-r--r-- 1 root root 8786 Sep 9 12:14 /etc/skel/.config/applications/defaults.list
-rw-r--r-- 1 root root 154 Mar 13 2011 /etc/skel/.local/share/applications/defaults.list
-rw-r--r-- 1 mint mint 8786 Sep 9 13:59 /home/mint/.config/applications/defaults.list
-rw-r--r-- 1 mint mint 154 Sep 9 13:59 /home/mint/.local/share/applications/defaults.list
lrwxrwxrwx 1 root root 24 Nov 23 2010 /usr/share/gnome/applications/defaults.list -> /etc/gnome/defaults.list
Re: Default applications
Using the Debian alternatives system : http://www.debian-administration.org/articles/91
Default browser - MozillaZine Knowledge Base : http://kb.mozillazine.org/Default_browser#Debian
galternatives - graphical setup tool for the alternatives system
You can install the package galternatives, makes it a bit easier than issuing commands in a terminal.
Default browser - MozillaZine Knowledge Base : http://kb.mozillazine.org/Default_browser#Debian
galternatives - graphical setup tool for the alternatives system
You can install the package galternatives, makes it a bit easier than issuing commands in a terminal.
Re: Default applications
You are absolutely right - a typo on my part
Code: Select all
alan@avocet ~ $ audio/mpeg=totem.desktop
bash: audio/mpeg=totem.desktop: No such file or directory
alan@avocet ~ $ video/x-theora+ogg=totem.desktop
bash: video/x-theora+ogg=totem.desktop: No such file or directory
alan@avocet ~ $ application/pdf=evince.desktop
bash: application/pdf=evince.desktop: No such file or directory
alan@avocet ~ $ x-content/audio-player=rhythmbox.desktop
bash: x-content/audio-player=rhythmbox.desktop: No such file or directory
Re: Default applications
Well, that output is from something else than the command I gave... Try this command instead (it is one command):
This will give you a list of files that are called defaults.list. Please share that list.
Code: Select all
find / -name defaults.list -ls 2>/dev/null
Re: Default applications
Here we are then:
Code: Select all
alan@avocet ~ $ find / -name defaults.list -ls 2>/dev/null
422113 4 -rw-r--r-- 1 root root 221 Dec 18 12:17 /usr/share/applications/defaults.list
2840 0 lrwxrwxrwx 1 root root 24 Dec 17 14:29 /usr/share/gnome/applications/defaults.list -> /etc/gnome/defaults.list
521310 4 -rw-r--r-- 1 amanda amanda 154 Dec 18 12:25 /home/amanda/.local/share/applications/defaults.list
521229 12 -rw-r--r-- 1 amanda amanda 8786 Dec 18 12:25 /home/amanda/.config/applications/defaults.list
130563 4 -rw-r--r-- 1 alan alan 154 Mar 13 2011 /home/alan/.local/share/applications/defaults.list
130317 12 -rw-r--r-- 1 alan alan 8786 Sep 9 13:14 /home/alan/.config/applications/defaults.list
132295 12 -rw-r--r-- 1 root root 8786 Sep 9 13:14 /etc/skel/.config/applications/defaults.list
132359 4 -rw-r--r-- 1 root root 154 Mar 13 2011 /etc/skel/.local/share/applications/defaults.list
131567 16 -rw-r--r-- 1 root root 12925 Sep 8 11:06 /etc/gnome/defaults.list
Re: Default applications
Drats, that shows that none of the files have been modified since December 2011. Assuming you installed Wine more recently, these are not the droids, erm, files you are looking for
After some more looking, check the following:
Probably there are some files there that have "notepad" as part of their name. Remove those. Probably there are also some files there "wine-extension" in their name. Remove those as well.
And I'll leave this here, something perhaps to do before installing any future applications on Wine so as to prevent this from happening anew (though you couldn't have prevented this as Wine installation does the Notepad file association): http://wiki.winehq.org/FAQ#head-c847a3d ... d4c7ae042a
After some more looking, check the following:
Code: Select all
ls ~/.local/share/applications
And I'll leave this here, something perhaps to do before installing any future applications on Wine so as to prevent this from happening anew (though you couldn't have prevented this as Wine installation does the Notepad file association): http://wiki.winehq.org/FAQ#head-c847a3d ... d4c7ae042a
Re: Default applications
Something like this happened to me too, eveything would open with nautilus instead of using the file's default application.
The problem was that someway some mimeype bindings got messed up and pointed to nautilus; i think this is probably what's happening to you.
Given that your wife account is working just fine, it probably is your personal mimetype conf file which is behaving badly. You should check the conf file in ~/.local/share/applications/mimeapps.list. You could try with
or open the file with your preferred text editor an check for odd records that could be causing the problem.
Cheers.-
The problem was that someway some mimeype bindings got messed up and pointed to nautilus; i think this is probably what's happening to you.
Given that your wife account is working just fine, it probably is your personal mimetype conf file which is behaving badly. You should check the conf file in ~/.local/share/applications/mimeapps.list. You could try with
Code: Select all
cat ~/.local/share/applications/mimeapps.list | grep wine
Cheers.-
Re: Default applications
I have made some progress with this, though I do find it a bit strange. I have found the offending files in .local/share/applications
If I edit this file
by removing the Exec line and then double click on a jpeg file I get an error telling me that the Exec line is missing.
The file looks like it is only supposed to apply to applications in the .wine file structure but for some reason it has spread up the file tree to infect all files in my home directory? I now know how to disable the windows apps from launching but haven't worked out how to insert a linux default?
Code: Select all
-rw-r--r-- 1 alan alan 154 Mar 13 2011 defaults.list
-rw-r--r-- 1 alan alan 123 Feb 4 16:29 mimeapps.list
-rw-r--r-- 1 alan alan 627 Jan 7 23:17 mimeinfo.cache
drwxr-xr-x 3 alan alan 4096 Jan 7 23:17 wine
-rw-r--r-- 1 alan alan 192 Jan 7 23:17 wine-extension-chm.desktop
-rw-r--r-- 1 alan alan 209 Jan 7 23:17 wine-extension-gif.desktop
-rw-r--r-- 1 alan alan 218 Jan 7 23:17 wine-extension-hlp.desktop
-rw-r--r-- 1 alan alan 202 Jan 7 23:17 wine-extension-htm.desktop
-rw-r--r-- 1 alan alan 216 Jan 7 23:17 wine-extension-ini.desktop
-rw-r--r-- 1 alan alan 212 Jan 7 23:17 wine-extension-jfif.desktop
-rw-r--r-- 1 alan alan 211 Feb 20 19:43 wine-extension-jpe.desktop
-rw-r--r-- 1 alan alan 209 Jan 7 23:17 wine-extension-msp.desktop
-rw-r--r-- 1 alan alan 209 Jan 7 23:17 wine-extension-png.desktop
-rw-r--r-- 1 alan alan 199 Jan 7 23:17 wine-extension-rtf.desktop
-rw-r--r-- 1 alan alan 194 Jan 7 23:17 wine-extension-txt.desktop
-rw-r--r-- 1 alan alan 205 Jan 7 23:17 wine-extension-url.desktop
-rw-r--r-- 1 alan alan 205 Jan 7 23:17 wine-extension-wri.desktop
-rw-r--r-- 1 alan alan 207 Jan 7 23:17 wine-extension-xml.desktop
Code: Select all
[Desktop Entry]
Type=Application
Name=Wine Internet Explorer
MimeType=image/jpeg;
Exec=env WINEPREFIX="/home/alan/.wine" wine start /ProgIDOpen jpegfile %f
NoDisplay=true
StartupNotify=true
Icon=FB4C_iexplore.0
The file looks like it is only supposed to apply to applications in the .wine file structure but for some reason it has spread up the file tree to infect all files in my home directory? I now know how to disable the windows apps from launching but haven't worked out how to insert a linux default?
Re: Default applications
Alan, let's make this easy Compare your .local/share/applications folder with your wife's .local/share/applications folder. As she doesn't have the problem. Probably if you overwrite your mimeapps.list with hers, and you delete the wine-extension*.desktop files, this issue will go away.
If you want to compare easily, you can run this command:
This will tell you when files differ, or when you have a file that she doesn't have and vice versa.
If you want to compare easily, you can run this command:
Code: Select all
diff -qr /home/alan/.local/share/applications /home/amanda/.local/share/applications