Default applications [SOLVED]

Questions about applications and software
Forum rules
Before you post please read how to get help

Default applications [SOLVED]

Postby alakin on Sun Feb 19, 2012 12:54 pm

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 :shock: Is there a simple way to change the behaviour (other than removing WINE)?

Thanks.
Last edited by alakin on Mon Feb 20, 2012 6:24 pm, edited 1 time in total.
Alan
LMDE
alakin
Level 1
Level 1
 
Posts: 33
Joined: Sun Nov 22, 2009 5:35 pm

Linux Mint is funded by ads and donations.
 

Re: Default applications

Postby xenopeek on Sun Feb 19, 2012 1:19 pm

I tried Wine once, this happened... Purged it immediately :twisted: Anyway, you can easily fix this :wink:

Open a terminal and type (or replace gedit with your editor of choice):
Code: Select all
gedit ~/.local/share/applications/defaults.list

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:
Code: Select all
locate defaults.list | xargs ls -l
locate defaults.list | xargs ls -lc
User avatar
xenopeek
Level 21
Level 21
 
Posts: 15482
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Default applications

Postby alakin on Sun Feb 19, 2012 1:33 pm

Thanks Vincent. I have found the file easily enough but there are no signs of any Windows apps?
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

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 :!:
Alan
LMDE
alakin
Level 1
Level 1
 
Posts: 33
Joined: Sun Nov 22, 2009 5:35 pm

Re: Default applications

Postby xenopeek on Sun Feb 19, 2012 1:51 pm

Eh, you missed the last part of my post :D Please share the output of the following two commands:
Code: Select all
locate defaults.list | xargs ls -l
locate defaults.list | xargs ls -lc

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.
User avatar
xenopeek
Level 21
Level 21
 
Posts: 15482
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Default applications

Postby alakin on Sun Feb 19, 2012 2:04 pm

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?
Alan
LMDE
alakin
Level 1
Level 1
 
Posts: 33
Joined: Sun Nov 22, 2009 5:35 pm

Re: Default applications

Postby xenopeek on Sun Feb 19, 2012 2:23 pm

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:
Code: Select all
locate defaults.list | xargs ls -l

This should output similar to:
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
User avatar
xenopeek
Level 21
Level 21
 
Posts: 15482
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Default applications

Postby craigevil on Sun Feb 19, 2012 3:08 pm

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.
Debian Sid KDE4.8.4 Kernel 3.4 Thinkpad R40 CPU Pentium M 1.3MHz RAM 2GB ATI Mobility 7500
Debian - "If you can't apt-get something, it isn't useful or doesn't exist"
Giant Debian sources.list | Debian upgrade script smxi | sysinfo script inxi
craigevil
Level 5
Level 5
 
Posts: 559
Joined: Wed Sep 15, 2010 6:10 am
Location: down the rabbit hole

Re: Default applications

Postby alakin on Sun Feb 19, 2012 4:20 pm

You are absolutely right - a typo on my part :shock:
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
Alan
LMDE
alakin
Level 1
Level 1
 
Posts: 33
Joined: Sun Nov 22, 2009 5:35 pm

Re: Default applications

Postby xenopeek on Sun Feb 19, 2012 5:06 pm

Well, that output is from something else than the command I gave... Try this command instead (it is one command):
Code: Select all
find / -name defaults.list -ls 2>/dev/null

This will give you a list of files that are called defaults.list. Please share that list.
User avatar
xenopeek
Level 21
Level 21
 
Posts: 15482
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Default applications

Postby alakin on Sun Feb 19, 2012 6:38 pm

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
Alan
LMDE
alakin
Level 1
Level 1
 
Posts: 33
Joined: Sun Nov 22, 2009 5:35 pm

Re: Default applications

Postby xenopeek on Sun Feb 19, 2012 6:48 pm

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:
Code: Select all
ls ~/.local/share/applications

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
User avatar
xenopeek
Level 21
Level 21
 
Posts: 15482
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Default applications

Postby alakin on Mon Feb 20, 2012 8:34 am

Thanks Vincent. I'll take a look at this tonight.
Alan
LMDE
alakin
Level 1
Level 1
 
Posts: 33
Joined: Sun Nov 22, 2009 5:35 pm

Re: Default applications

Postby asermax on Mon Feb 20, 2012 1:07 pm

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
Code: Select all
cat ~/.local/share/applications/mimeapps.list | grep wine

or open the file with your preferred text editor an check for odd records that could be causing the problem.

Cheers.-
asermax
Level 1
Level 1
 
Posts: 14
Joined: Mon Jun 27, 2011 9:31 pm
Location: Córdoba, Argentina

Re: Default applications

Postby alakin on Mon Feb 20, 2012 4:04 pm

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

If I edit this file
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

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?
Alan
LMDE
alakin
Level 1
Level 1
 
Posts: 33
Joined: Sun Nov 22, 2009 5:35 pm

Re: Default applications

Postby xenopeek on Mon Feb 20, 2012 4:11 pm

Alan, let's make this easy :wink: 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:
Code: Select all
diff -qr /home/alan/.local/share/applications /home/amanda/.local/share/applications

This will tell you when files differ, or when you have a file that she doesn't have and vice versa.
User avatar
xenopeek
Level 21
Level 21
 
Posts: 15482
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Default applications

Postby alakin on Mon Feb 20, 2012 6:21 pm

Excellent, that's done the job :D

Thanks for you help Vincent.
Alan
LMDE
alakin
Level 1
Level 1
 
Posts: 33
Joined: Sun Nov 22, 2009 5:35 pm

Linux Mint is funded by ads and donations.
 

Return to Software & Applications

Who is online

Users browsing this forum: No registered users and 6 guests