Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 247694 - x11-misc/xdg-utils-1.0.2-r2 - xdg-open repspawns itself infinitely
Summary: x11-misc/xdg-utils-1.0.2-r2 - xdg-open repspawns itself infinitely
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Freedesktop bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-20 12:08 UTC by Helmut Jarausch
Modified: 2010-11-02 14:22 UTC (History)
0 users

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


Attachments
respawn patch (xdg-utils-1.0.2-respawn.patch,401 bytes, patch)
2008-11-20 12:40 UTC, Helmut Jarausch
Details | Diff
xdg-utils-1.0.2-r3.ebuild including respawn patch (xdg-utils-1.0.2-r3.ebuild,1.12 KB, text/plain)
2008-11-20 12:41 UTC, Helmut Jarausch
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Helmut Jarausch 2008-11-20 12:08:29 UTC
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
Comment 1 Helmut Jarausch 2008-11-20 12:40:59 UTC
Created attachment 172459 [details, diff]
respawn patch
Comment 2 Helmut Jarausch 2008-11-20 12:41:39 UTC
Created attachment 172461 [details]
xdg-utils-1.0.2-r3.ebuild including respawn patch
Comment 3 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-03-08 22:15:11 UTC
Hum actually I have no BROWSER in my env. Could you grep through your /etc/env.d/ to see what's adding it ?
Comment 4 Jerome Potts 2010-02-16 00:13:21 UTC
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 5 Samuli Suominen (RETIRED) gentoo-dev 2010-06-18 09:22:45 UTC
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