LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums HCL Reviews Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-15-2015, 09:30 AM   #1
kikinovak
MLED Founder
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: Slackware, CentOS, FreeBSD
Posts: 3,362

Rep: Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907
Wine hijacked my file associations


Hi,

Some time ago I installed Wine on my desktop to test some things. Eventually, the tests were conclusive and I removed Wine, since I didn't have any more use for it.

Unfortunately my file associations are messed up since. I'm running Xfce, and the desktop tries to open simple text files with "notepad", PNG and JPG files with "Wine Internet Explorer", etc.

Wine seems to do a good job of emulating Windows' intrusiveness, but how can I get rid of that nonsense?

Cheers,

Niki
 
Old 01-15-2015, 09:33 AM   #2
schmatzler
Member
 
Registered: Jan 2011
Location: Germany
Distribution: Slackware64 -current + Multilib
Posts: 402

Rep: Reputation: 171Reputation: 171
You can remove all wine file associations with these commands:

Code:
rm -f ~/.local/share/mime/packages/x-wine*
rm -f ~/.local/share/applications/wine-extension*
rm -f ~/.local/share/icons/hicolor/*/*/application-x-wine-extension*
rm -f ~/.local/share/mime/application/x-wine-extension*
Or just skim through the directories and remove what you want to.
 
3 members found this post helpful.
Old 01-15-2015, 09:44 AM   #3
ponce
Senior Member
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 3,902

Rep: Reputation: 1932Reputation: 1932Reputation: 1932Reputation: 1932Reputation: 1932Reputation: 1932Reputation: 1932Reputation: 1932Reputation: 1932Reputation: 1932Reputation: 1932
here (latest 1.7.x wine) to fix image/jpeg association I removed
Code:
~/.local/share/mime/image/jpeg.xml
~/.local/share/mime/packages/x-wine-extension-jfif.xml
~/.local/share/applications/wine-extension-jfif.desktop
~/.local/share/applications/wine-extension-jpe.desktop
after, I noticed that all the content of
Code:
~/.local/share/applications
~/.local/share/mime
was created by wine, so I decided to just empty the above folders.

don't forget to run after
Code:
update-desktop-database ~/.local/share/applications
update-mime-database ~/.local/share/mime
as a reference see
https://wiki.archlinux.org/index.php...t_applications

Last edited by ponce; 01-15-2015 at 09:49 AM.
 
3 members found this post helpful.
Old 01-15-2015, 10:54 AM   #4
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: Slackware
Posts: 7,773

Rep: Reputation: 3033Reputation: 3033Reputation: 3033Reputation: 3033Reputation: 3033Reputation: 3033Reputation: 3033Reputation: 3033Reputation: 3033Reputation: 3033Reputation: 3033
And for next time:

How can I prevent Wine from changing the filetype associations on my system or adding unwanted menu entries/desktop links when I install a Windows program?
 
3 members found this post helpful.
Old 01-16-2015, 01:46 AM   #5
elcore
Member
 
Registered: Sep 2014
Distribution: Slackware
Posts: 368

Rep: Reputation: Disabled
Thanks for posting your solutions, these things bother me as well.
I had it solved by removing these folders :

Code:
~/.local/share/applications
~/.local/share/desktop-directories
~/.local/share/mime
And creating empty files there :

Code:
~/.local/share/applications
~/.local/share/desktop-directories
~/.local/share/mime
May be an ugly solution, but it's a permanent one.
It will persist even if I upgrade wine/wineprefix.
 
1 members found this post helpful.
Old 01-16-2015, 07:35 AM   #6
kikinovak
MLED Founder
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: Slackware, CentOS, FreeBSD
Posts: 3,362

Original Poster
Rep: Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907
Quote:
Originally Posted by elcore View Post
Thanks for posting your solutions, these things bother me as well.
I had it solved by removing these folders :

Code:
~/.local/share/applications
~/.local/share/desktop-directories
~/.local/share/mime
And creating empty files there :

Code:
~/.local/share/applications
~/.local/share/desktop-directories
~/.local/share/mime
May be an ugly solution, but it's a permanent one.
It will persist even if I upgrade wine/wineprefix.
Worked like a charm. Thanks very much for all your suggestions!

Edit: the "solution" above is a VERY BAD IDEA. While Wine doesn't hijack your file associations anymore, it clears ALL your predefined file associations (MPLayer for MKV files, etc.). Firefox keeps asking for being default browser at every startup, etc.

DON'T DO THIS. THIS IS WRONG.

Last edited by kikinovak; 01-18-2015 at 04:31 AM.
 
Old 01-19-2015, 12:36 AM   #7
elcore
Member
 
Registered: Sep 2014
Distribution: Slackware
Posts: 368

Rep: Reputation: Disabled
Quote:
Originally Posted by kikinovak View Post
Worked like a charm. Thanks very much for all your suggestions!

Edit: the "solution" above is a VERY BAD IDEA. While Wine doesn't hijack your file associations anymore, it clears ALL your predefined file associations (MPLayer for MKV files, etc.). Firefox keeps asking for being default browser at every startup, etc.

DON'T DO THIS. THIS IS WRONG.
This doesn't happen here, I'm using that ugly workaround for 2 years.
My setup is KDE 4.10.5 with smplayer, and mkv opens perfectly fine.

And because it's quite possibly my fault that your system broke...
I have made you a file to revert these changes on demand:

Code:
#!/bin/bash

# cut wine files

mv ~/.local/share/applications ~/.local/share/applications.bac
mv ~/.local/share/desktop-directories ~/.local/share/desktop-directories.bac
mv ~/.local/share/mime ~/.local/share/mime.bac

touch ~/.local/share/applications
touch ~/.local/share/desktop-directories
touch ~/.local/share/mime
Code:
#!/bin/bash

# uncut wine files

rm ~/.local/share/applications
rm ~/.local/share/desktop-directories
rm ~/.local/share/mime

mv ~/.local/share/applications.bac ~/.local/share/applications
mv ~/.local/share/desktop-directories.bac ~/.local/share/desktop-directories
mv ~/.local/share/mime.bac ~/.local/share/mime
It was not intentional, from my point of view, it works fine.

Last edited by elcore; 01-19-2015 at 01:38 AM.
 
  


Reply

Tags
wine



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
File associations in Gnome Commander vs. associations in Nautilus taylorkh Linux - Software 0 01-01-2010 06:18 PM
How to set file associations in wine? nadavvin Linux - Software 1 11-27-2006 05:05 AM
File Associations Altec_ Linux - Software 3 02-08-2005 02:43 PM
File associations HH42 Linux - Newbie 4 01-28-2005 10:48 AM
file associations cadj Linux - Distributions 0 04-25-2004 04:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration