Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 170630 - Gnome can't handle multiple filemanagers installed in same system.
Summary: Gnome can't handle multiple filemanagers installed in same system.
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL: http://bugzilla.gnome.org/show_bug.cg...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-12 19:54 UTC by Pacho Ramos
Modified: 2008-11-09 00:22 UTC (History)
2 users (show)

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


Attachments
ebuilds.diff (ebuilds.diff,340 bytes, text/plain)
2007-03-12 19:56 UTC, Pacho Ramos
Details
fix-gconf.patch (fix-gconf.patch,415 bytes, patch)
2007-03-12 19:56 UTC, Pacho Ramos
Details | Diff
ebuilds.diff (ebuilds.diff,460 bytes, patch)
2007-03-20 12:44 UTC, Pacho Ramos
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pacho Ramos gentoo-dev 2007-03-12 19:54:57 UTC
After installing Thunar, when I open a folder from "places" gnome menu, it is opened using Thunar instead of nautilus.

This problem is because in /usr/share/applications/Thunar-folder-handler.desktop there is an incorrect mime that makes Thunar be used as default instead of nautilus UNDER GNOME.

I attach a patch and a diff of the ebuild for fixing this problem. I have tried it and it works as expected under gnome and, under xfce, there are no changes :-)

Also, thanks a lot to people in #gentoo-desktop IRC channel who help my to find the solution

I attach my emerge --info:
Portage 2.1.2.2 (default-linux/amd64/2006.1, gcc-4.1.1, glibc-2.5-r0, 2.6.20-ck1 x86_64)
=================================================================
System uname: 2.6.20-ck1 x86_64 AMD Athlon(tm) 64 Processor 3200+
Gentoo Base System release 1.12.9
Timestamp of tree: Mon, 12 Mar 2007 09:50:01 +0000
ccache version 2.4 [enabled]
dev-java/java-config: 1.3.7, 2.0.31
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r6
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.19.2-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -pipe -msse3"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/php/apache1-php5/ext-active/ /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-march=k8 -O2 -pipe -msse3"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache collision-protect cvs distlocks metadata-transfer multilib-strict parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/"
LANG="es_ES.UTF-8"
LC_ALL="es_ES.UTF-8"
LINGUAS="es en_US"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/sunrise /usr/portage/local/layman/armagetron /usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac aalib acpi alsa amd64 apache2 arts asf audiofile bash-completion beagle bitmap-fonts bzip2 bzlib cairo caps cdb cdda cddb cdparanoia cdr cli cpdflib cpudetection cracklib cross crypt cscope cups curl dbus dga divx4linux dlloader dri dts dvb dvd dvdr dvdread encode erandom escreen esd evo evolution exif fam fbcon flac foomaticdb fortran ftp galago gb gcj ggi gif gimp gimpprint glitz glut glx gnome gnome-print gphoto2 gpm gstreamer gtk gtk2 gtkhtml hal iconv idn imagemagick imlib isdnlog ithreads jabber jack java jpeg kde kdeenablefinal kdehiddenvisibility latex lcms libg++ libnotify logrotate mad madwifi midi mikmod mime mng mono motif mp3 mpeg mpi mplayer musepack musicbrainz nas nautilus ncurses nethack network nls nocardbus nptl nptlonly nvidia ogg oggvorbis openal opengl oss pam pcre pdf perl pic plotutils png posix ppds pppd python qt3 qt4 quicktime readline reflection rtc ruby scanner sdl seamonkey session slang slp sockets spell spl sse3 ssl startup-notification svg sysvipc tcltk tcpd tetex theora threads tiff timidity tk totem trayicon truetype truetype-fonts type1-fonts unicode usb v4l v4l2 vcd videos vim vorbis wma wmf xcomposite xine xml xml2 xorg xpm xv xvid 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 mulaw multi null plug rate route share shm softvol" DVB_CARDS="usb-dib0700" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="es en_US" USERLAND="GNU" VIDEO_CARDS="nvidia nv vesa fbdev vga"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS



Reproducible: Always
Comment 1 Pacho Ramos gentoo-dev 2007-03-12 19:56:28 UTC
Created attachment 113099 [details]
ebuilds.diff

Differences between ebuilds
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2007-03-12 19:56:39 UTC
That's a feature, Gnome must die! :P
Comment 3 Pacho Ramos gentoo-dev 2007-03-12 19:56:57 UTC
Created attachment 113101 [details, diff]
fix-gconf.patch
Comment 4 Pacho Ramos gentoo-dev 2007-03-12 20:38:23 UTC
(In reply to comment #2)
> That's a feature, Gnome must die! :P
> 

GNOME RULES!! :P

xDDDD

;-)
Comment 5 Samuli Suominen (RETIRED) gentoo-dev 2007-03-12 21:52:04 UTC
the .desktop MimeType field is there to tell what mime types the app handles, it's up to the implementation (i.e., gnome) to decide what to do with it. if nautilus isn't saying it can handle those mime types, and/or gnome isn't providing a method for the user to select the default file manager, IMHO that's a bug with gnome.
Comment 6 Pacho Ramos gentoo-dev 2007-03-12 22:04:02 UTC
The problem is bacause thunar has the mimetype "x-directory/gnome-default-handler", but it shouldn't be the DEFAULT folder handler. If this mime is removed from Thunar-folder-handler.desktop, thunar is not set as DEFAULT folder handler under gnome, but still is available as an option for open the folders (only a right click on a folder and go to "open with.." tab is needed for choose thunar as folder viewer). 

Then, the patch can be applied fully safely.

Before applying the patch:
- Thunar is used as DEFAULT folder handler under GNOME because it has "x-directory/gnome-default-handler" mimetype. I have to, manually, set nautilus for opening folders right-clicking on a folder and changing the behavior in "open with.." tab.

After applying the patch:
- Nautilus is used as default folder handler UNDER GNOME, and thunar is still available (as an alternative option) for opening folders. 

The application of the patch doesn't "damage" xfce.

Thanks a lot :-)
Comment 7 Pacho Ramos gentoo-dev 2007-03-15 21:57:33 UTC
The attached patch seems to not fix the problem :-(
Comment 8 Pacho Ramos gentoo-dev 2007-03-15 22:20:49 UTC
I have sent two bug reports to upstreams:
http://bugzilla.gnome.org/show_bug.cgi?id=418760
http://bugzilla.xfce.org/show_bug.cgi?id=3016
Comment 9 Samuli Suominen (RETIRED) gentoo-dev 2007-03-16 22:01:39 UTC
23:51 <+drac> I still think it's about Thunar-folder.. nautilus-folder.. MimeType line which ends up in 
              mimeinfo.cache
23:51 <+drac> But the real problem is with GNOME if they don't provide decent way to switch default filemanager.
23:52 <+drac> grep default /usr/share/applications/mimeinfo.cache
23:53 < mlangc> i guess it's this one:
23:53 < mlangc> x-directory/gnome-default-handler=Thunar-folder-handler.desktop;nautilus-folder-handler.desktop;
23:54 < mlangc> i can try to change the order of the folder-handlers ...
23:55 <+drac> MimeType line is there to say which types it can handle, if Thunar says it can handle 
              x-directory/gnome-default-handler then it can. If gnome/gnome-panel can't handle the situation 
              where other applications can handle x-directory/gnome-default-handler as well, it's at fault.
23:57 < mlangc> drac: it's the ordering that matters for gnome
23:58 < mlangc> i had these lines:
23:58 < mlangc> inode/directory=Thunar-folder-handler.desktop;nautilus-folder-handler.desktop;
23:58 < mlangc> x-directory/normal=Thunar-folder-handler.desktop;nautilus-folder-handler.desktop;
23:58 < mlangc> x-directory/gnome-default-handler=Thunar-folder-handler.desktop;nautilus-folder-handler.desktop;
23:58 < mlangc> there i've swapped gnome-default-handler=Thunar-folder-handler.desktop and 
                nautilus-folder-handler.desktop;
23:58 < mlangc> and now the panel prefers nautilus again
Comment 10 Daniel Gryniewicz (RETIRED) gentoo-dev 2007-03-19 16:46:31 UTC
Heh.  What a shock, since gnome only ships with one file manager... :)

This is definitely a feature.
Comment 11 Pacho Ramos gentoo-dev 2007-03-20 12:39:28 UTC
I attach a diff with thunar ebuild modifications for fixing this bug

Thanks a lot

__

Should I reopen this bug?
Comment 12 Pacho Ramos gentoo-dev 2007-03-20 12:44:43 UTC
Created attachment 113862 [details, diff]
ebuilds.diff

It only changes Thunar-folder-handler.desktop name for doesn't interfere with nautilus on Gnome. I have tested it under xfce and seems that this name change doesn't affect to thunar under xfce

Thanks a lot for fixing this annoying bug with this workaround until upstream fixes the nautilus bug in a better way
Comment 13 Samuli Suominen (RETIRED) gentoo-dev 2007-03-20 14:01:35 UTC
You shouldn't because we have _no intentions at all_ to rename Thunars .desktop files, or remove MimeTypes from them.
Comment 14 Pacho Ramos gentoo-dev 2007-03-20 14:53:21 UTC
(In reply to comment #13)
> You shouldn't because we have _no intentions at all_ to rename Thunars .desktop
> files, or remove MimeTypes from them.
> 

it is only rename 1 file, that fixes the problem :-/
Comment 15 Pacho Ramos gentoo-dev 2007-03-20 14:54:47 UTC
(In reply to comment #13)
> You shouldn't because we have _no intentions at all_ to rename Thunars .desktop
> files, or remove MimeTypes from them.
> 

May be it could be renamed only when "gnome" USE flag is active...
Comment 16 Josh Nichols (RETIRED) gentoo-dev 2007-03-20 15:15:54 UTC
(In reply to comment #15)
> May be it could be renamed only when "gnome" USE flag is active...

That really isn't much better. 

The problem is that the solution you found is a workaround at best. We need to find a workable solution that is acceptable to upstream xfce/gnome, as we prefer to stay in line with upstream as much possible.

It is good to have the workaround file, at least, so users experiencing can reclaim nautilus as their filemanager.
Comment 17 Pacho Ramos gentoo-dev 2007-03-20 15:21:19 UTC
OK, I understand
Comment 18 Pacho Ramos gentoo-dev 2007-05-20 17:35:47 UTC
The problem still persists with thunar *-r3, I know that is an upstream bug, but the workaround:
http://bugs.gentoo.org/attachment.cgi?id=113862

Still works and fixes the problem

Thanks a lot
Comment 19 Samuli Suominen (RETIRED) gentoo-dev 2007-05-22 03:06:06 UTC
Gnome bug in upstream is getting stale.. I hope Gnome gets support for multiple filemanagers soon.
Comment 20 Daniel Gryniewicz (RETIRED) gentoo-dev 2007-05-22 14:54:46 UTC
I suspect you will get little traction upstream without a patch.  Upstream gnome, by definition, uses gnome, and so is unlikely to care a huge amount about xfce.  I've run into similar issues with using non-metacity WM's: if you don't provide a patch, they probably won't fix it.
Comment 21 Samuli Suominen (RETIRED) gentoo-dev 2007-05-23 08:29:58 UTC
(In reply to comment #18)
> The problem still persists with thunar *-r3, I know that is an upstream bug,
> but the workaround:
> http://bugs.gentoo.org/attachment.cgi?id=113862

Won't ever be included since Thunar can work as File manager for Gnome too.
Comment 22 Matthias Langer 2007-05-23 16:24:23 UTC
well, as i've installed xfce and gnome in parallel, but don't want to use thunar in gnome, i've to run

"
sed -i -e \ 's/\(.\+\)\(Thunar-folder-handler\.desktop;\)\(nautilus-folder-handler\.desktop;\)/\1\3\2/' \ /usr/share/applications/mimeinfo.cache
"

every now and then... summarizing: gnome just picks up the first handler, which in my case, is thunar, at least without any further intervention; so i would like to know what i have to do to change this ordering permanently. if this is possible, and doesn't harm xfce, i would suggest to take this route for now and modify the relevant ebuilds accordingly.
Comment 23 Pacho Ramos gentoo-dev 2007-05-23 18:23:47 UTC
(In reply to comment #21)
> (In reply to comment #18)
> > The problem still persists with thunar *-r3, I know that is an upstream bug,
> > but the workaround:
> > http://bugs.gentoo.org/attachment.cgi?id=113862
> 
> Won't ever be included since Thunar can work as File manager for Gnome too.
> 

With http://bugs.gentoo.org/attachment.cgi?id=113862 you still can use Thunar as default filemanager in Gnome IF YOU WANT
Comment 24 Gergely POLONKAI 2008-11-06 11:22:02 UTC
Well, Gnome's default is nautilus, xfce's default is thunar. I think this issue can somewhat addressed to Gnome, either, although I don't know if this problem persists in other distros. Anyways, until Gnome has some checkbox or whatever to change it's default file manager, I think Gentoo should change the ebuilds instead (nautilus' AND thunar's ebuild)

(In reply to comment #23)
> (In reply to comment #21)
> > (In reply to comment #18)
> > > The problem still persists with thunar *-r3, I know that is an upstream bug,
> > > but the workaround:
> > > http://bugs.gentoo.org/attachment.cgi?id=113862
> > 
> > Won't ever be included since Thunar can work as File manager for Gnome too.
> > 
> 
> With http://bugs.gentoo.org/attachment.cgi?id=113862 you still can use Thunar
> as default filemanager in Gnome IF YOU WANT
> 

Comment 25 Gergely POLONKAI 2008-11-09 00:22:39 UTC
(In reply to comment #22)
> well, as i've installed xfce and gnome in parallel, but don't want to use
> thunar in gnome, i've to run
> 
> "
> sed -i -e \
> 's/\(.\+\)\(Thunar-folder-handler\.desktop;\)\(nautilus-folder-handler\.desktop;\)/\1\3\2/'
> \ /usr/share/applications/mimeinfo.cache
> "
> 
> every now and then... summarizing: gnome just picks up the first handler, which
> in my case, is thunar, at least without any further intervention; so i would
> like to know what i have to do to change this ordering permanently. if this is
> possible, and doesn't harm xfce, i would suggest to take this route for now and
> modify the relevant ebuilds accordingly.
> 

As a temporary resolution, I've put this little snippet in my /etc/conf.d/local, so it sets up itself upon every boot. Also, if for some reason thunar comes back to Gnome, all I have to do it /etc/init.d/local restart (as I don't have anything else in local yet).