Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 302643 - app-emulation/wine makes notepad the default text editor
Summary: app-emulation/wine makes notepad the default text editor
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Wine Maintainers
URL:
Whiteboard:
Keywords:
: 348787 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-01-28 15:12 UTC by Ken Rushia
Modified: 2010-12-15 17:49 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ken Rushia 2010-01-28 15:12:34 UTC
Upon first installing app-emulation/wine, notepad.exe is made the default text editor. Nobody wants this.

Reproducible: Always

Steps to Reproduce:
1.emerge wine
2.Click a text file in your favorite desktop file manager

Actual Results:  
NOTEPAD?!? WTF GENTOO DIAF

Expected Results:  
Sanity
Comment 1 SpanKY gentoo-dev 2010-02-09 20:56:36 UTC
cant see anything in wine that would do this explicitly, and no real info in original report

obvious things missing:
 - emerge --info
 - emerge wine -pv
 - what is the mime type for a file opened in notepad `file -i`
 - who has registered with that mime type in the .desktop database:
   grep -r mime/type /usr/share/app*
Comment 2 Christian Kaps 2010-07-22 18:51:37 UTC
I have the same problem.

shlomo ~ # emerge --info

Portage 2.1.8.3 (default/linux/amd64/10.0/desktop, gcc-4.4.3, glibc-2.11.2-r0, 2.6.33-gentoo-r2 x86_64)
=================================================================
System uname: Linux-2.6.33-gentoo-r2-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q6600_@_2.40GHz-with-gentoo-1.12.13
Timestamp of tree: Thu, 22 Jul 2010 18:30:01 +0000
app-shells/bash:     4.0_p37
dev-java/java-config: 2.1.11
dev-lang/python:     2.6.5-r2, 3.1.2-r3
dev-util/cmake:      2.6.4-r3
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.65
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.3-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo"
CXXFLAGS="-march=nocona -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch usersandbox"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="de_DE.UTF-8"
LC_ALL="de_DE.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="de"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/desktop-effects /var/lib/layman/sunrise /usr/local/portage/akkie"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac aalib acl acpi alsa amd64 avi bash-completion berkdb bluetooth branding bzip2 cairo cdparanoia cdr cleartype cli consolekit cracklib crypt cups cxx dbus divx dri dts dv dvd dvdnav dvdr dvdread eds emboss encode evo exif fam ffmpeg firefox flac fortran gdbm gif gimp gkt glitz gnome gpm gstreamer gtk hal hvm iconv ipod ipv6 java jpeg lame lcms ldap libnotify live lm_sensors mad mikmod mjpeg mmx mmxext mng modules mono mp3 mp4 mpeg mudflap multilib nautilus ncurses nls nptl nptlonly nsplugin nvidia ogg opengl openmp pam pango pcre pdf perl png podcast ppds pppd python qt3support quicktime readline reflection samba sdl session smp spell spl sse sse2 ssl ssse3 startup-notification svg sysfs tcpd theora tiff truetype unicode usb vcd vorbis x264 xcb xcomposite xinerama xml xorg xulrunner xv xvid xvmc zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" CAMERAS="canon ptp2 ricoh ricoh_g3" ELIBC="glibc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" RUBY_TARGETS="ruby18" SANE_BACKENDS="plustek" USERLAND="GNU" VIDEO_CARDS="vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

shlomo ~ # emerge wine -pv
[ebuild     U ] app-emulation/wine-1.2 [1.2_rc5] USE="X alsa cups dbus gecko jpeg lcms ldap mp3 ncurses opengl oss perl png samba ssl threads truetype xcomposite xinerama xml (-capi) -custom-cflags (-esd) -fontconfig -gnutls (-gphoto2) -gsm (-hal) -jack -nas -openal -pulseaudio (-scanner) -test -win64" 0 kB

shlomo Desktop # file -i file
file: text/plain; charset=us-ascii

shlomo Desktop # grep -r text/plain /usr/share/app*
/usr/share/application-registry/gnome-vfs.applications:	mime_types=text/*,text/html,text/plain,text/x-c,text/x-objc,text/x-c++,text/x-c-header,text/x-perl
/usr/share/application-registry/gnome-vfs.applications:	mime_types=text/*,text/html,text/plain
/usr/share/application-registry/gnome-vfs.applications:	mime_types=text/*,text/plain,text/x-c,text/x-objc,text/x-c++,text/x-c-header,text/x-perl
/usr/share/application-registry/gnome-vfs.applications:	mime_types=text/*,text/html,text/plain,text/x-c,text/x-objc,text/x-c++,text/x-c-header
/usr/share/application-registry/gnome-vfs.applications:	mime_types=text/*,text/html,text/plain
/usr/share/application-registry/gnome-vfs.applications:	mime_types=text/*,text/html,text/plain,text/x-c,text/x-objc,text/x-c++,text/x-c-header,text/x-perl
/usr/share/application-registry/gnome-vfs.applications:	mime_types=text/*,text/plain,text/x-c,text/x-c-header,text/x-c++,text/x-perl
/usr/share/application-registry/gnome-vfs.applications:	mime_types=text/*,text/plain,text/x-c,text/x-c-header,text/x-objc,text/x-c++,text/x-perl
/usr/share/application-registry/gnome-vfs.applications:	mime_types=text/*,text/html,text/plain,text/x-c,text/x-objc,text/x-c++,text/x-c-header,text/x-perl
/usr/share/application-registry/gnome-vfs.applications:	mime_types=text/*,text/plain,text/x-c,text/x-c-header,text/x-objc,text/x-c++,text/x-perl
/usr/share/applications/gedit.desktop:MimeType=text/plain;
/usr/share/applications/monodevelop.desktop:MimeType=text/x-csharp;application/x-mds;application/x-mdp;application/x-cmbx;application/x-prjx;application/x-csproj;application/x-vbproj;application/x-sln;application/x-aspx;text/xml;application/xhtml+xml;text/html;text/plain
/usr/share/applications/mimeinfo.cache:text/plain=monodevelop.desktop;gedit.desktop;
Comment 3 SpanKY gentoo-dev 2010-07-24 04:44:39 UTC
and what DE are you using ?  GNOME/KDE/... ?
Comment 4 Christian Kaps 2010-07-24 10:08:18 UTC
I use gnome-base/gnome-light-2.28.2
Comment 5 SpanKY gentoo-dev 2010-07-25 14:38:23 UTC
no idea where gnome keeps it per-user mime database for you to check text/plain bindings ... maybe gnome team does
Comment 6 Christian Kaps 2010-08-01 10:39:30 UTC
When I remove the file /home/user/.local/share/applications/wine-extension-txt.desktop the notepad entry disappears and it works as expected.
Comment 7 Nirbheek Chauhan (RETIRED) gentoo-dev 2010-08-03 07:21:18 UTC
(In reply to comment #5)
> no idea where gnome keeps it per-user mime database for you to check text/plain
> bindings ... maybe gnome team does
> 

The per-user mime information is stored (according to freedesktop standards) in ~/.local/share/mime . I believe wine adds itself for various mime types (txt, jpg, png, html, etc) at runtime when the first wine application is run.

Due to various silliness, the last application to register itself for a mimetype becomes the default application. Hence, wine takes over all the mimetypes...

OTOH, IMO wine shouldn't even *try* to register itself. It has no business interfering with the rest of the desktop. Certainly not automatically by default.
Comment 8 Mart Raudsepp gentoo-dev 2010-08-03 11:13:07 UTC
For wine-1.2 stable release (and an earlier 1.1 development release), I think that's one of their major features. I may find it nice for extensions handled by Windows programs I specifically install myself (though WinRAR doing it is annoying), but I don't think anyone would want those wannabe notepad/wordpad and so on that come with wine itself to register themselves..
The real solution is fixing the spec in this regard, but...
Comment 9 SpanKY gentoo-dev 2010-08-04 02:57:41 UTC
thanks, that leads back to `winemenubuilder`.  unfortunately, this program takes care not only of file associations, but for creating desktop items for installed Windows programs (i.e. the Start Menu).  i dont see a way of untangling the two operations, and people certainly want Start Menu integration.

feel free to open a bug report upstream since this is pure upstream behavior, and i dont intend to deviate in this regard.
Comment 10 SpanKY gentoo-dev 2010-12-15 17:49:45 UTC
*** Bug 348787 has been marked as a duplicate of this bug. ***