On a system without KDE GNOME XFCE xdg-open respawns itself recursively which makes the system unresponsive and eventually kills. The reason: if detectDE (function in xdg-open) cannot find a desktop environment it checks the BROWSER environment variable. But this has been set to 'xdg-open' in /etc/profile.env So it spawns itself. Since xdg-open might be called at unexpected place (like during emerge) it's a serious problem! Reproducible: Always Steps to Reproduce: 1. on a system without running KDE/GNOME/XFCE start 2. and printenv | grep BROWSER shows xdg-open invoke 2. xdg-open <some URL> 3. be ready to killall -9 xdg-open otherwise your system will crash emerge --info Portage 2.2_rc14 (default/linux/x86/2008.0, gcc-4.3.2, glibc-2.8_p20080602-r0, 2.6.27-gentoo-r2 i686) ================================================================= System uname: Linux-2.6.27-gentoo-r2-i686-Pentium_III_-Coppermine-with-glibc2.0 Timestamp of tree: Thu, 20 Nov 2008 06:15:01 +0000 ccache version 2.4 [disabled] app-shells/bash: 3.2_p39 dev-java/java-config: 1.3.7, 2.1.6-r1 dev-lang/python: 2.5.2-r8 dev-python/pycrypto: 2.0.1-r6 dev-util/ccache: 2.4-r8 dev-util/cmake: 2.6.2 sys-apps/baselayout: 2.0.0 sys-apps/openrc: 0.3.0-r1 sys-apps/sandbox: 1.3.0 sys-devel/autoconf: 2.13, 2.63 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.1-r1 sys-devel/binutils: 2.18-r4 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 2.2.6a virtual/os-headers: 2.6.27 ACCEPT_KEYWORDS="x86 ~x86" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=i686 -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/NX/etc /usr/NX/home /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /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/terminfo /etc/texmf/web2c /etc/udev/rules.d" CXXFLAGS="-O2 -march=i686 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="distlocks parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo " LDFLAGS="-Wl,-O1" LINGUAS="en de" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" 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="/usr/local/portage /usr/local/portage/layman/java-overlay" SYNC="rsync://rsync.informatik.RWTH-Aachen.de/gentoo-portage" USE="X acl alsa atm berkdb bzip2 cairo cdr cli cracklib crypt cups doc dri dvd fortran gdbm gif gimp gnome gpm gtk iconv ipv6 isdnlog jpeg kde lcms midi mmx mudflap ncurses nls nptl nptlonly opengl openmp pam pcre pdf perl png pppd python qt qt4 readline reflection session spl sqlite sqlite3 sse ssl svg sysfs tcl tcpd tetex tiff tk unicode x86 xorg xulrunner zlib" ALSA_CARDS="ens1371" 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 authn_alias authn_anon 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 deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse wacom evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en de" USERLAND="GNU" VIDEO_CARDS="nv" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Created attachment 172459 [details, diff] respawn patch
Created attachment 172461 [details] xdg-utils-1.0.2-r3.ebuild including respawn patch
Hum actually I have no BROWSER in my env. Could you grep through your /etc/env.d/ to see what's adding it ?
Same here, i don't have a $BROWSER variable set anywhere. But i do have some GNOME stuff installed on my system, to satisfy some dependencies. And some XFCE stuff too. Mine is =x11-misc/xdg-utils-1.0.2-r3. I read in xdg-open(1): "xdg-open is for use inside a desktop session only. It is not recommended to use xdg-open as root." So i suppose that xdg-open should not be mentioned in the system-wide profile /etc/profile*
Comment on attachment 172459 [details, diff] respawn patch xdg-open is invoking #!/bin/sh and this patch is using bash syntax -> can't apply in portage please try xdg-utils-1.0.2_p20100618 and report the bug to upstream bugtracking system at freedesktop