[Pkg-xfce-devel] Bug#648553: xfce4-utils: runs xrdb -merge with the -nocpp option
Russ Allbery
rra at debian.org
Sat Nov 12 21:01:38 UTC 2011
Package: xfce4-utils
Version: 4.8.3-1
Severity: normal
I just switched from GNOME to Xfce and discovered that all of my xterms
were using a microfont. It took a bit of tracking down, but this was
because .Xresources wasn't being run through the preprocessor, so the
xterm font was being set to the literal value of the preprocessor define
I was using instead of the actual font, and then falling back on fixed.
The standard Debian /etc/X11/Xsession.d/30x11-common_xresources file
runs xrdb normally, but /etc/xdg/xfce4/xinitrc explicitly passes in
-nocpp. Is there some reason for this? Would it be possible to remove
that flag? It's somewhat surprising, since Xresources has always been
run through the preprocessor for as long as I've been using X (nearly
twenty years now).
Attached to the bug report is my modified xinitrc, since reportbug wanted
to include it, but the change is trivial and obvious.
Google seems to indicate that Gentoo is also patching for this.
-- System Information:
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 3.0.0-2-686-pae (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages xfce4-utils depends on:
ii exo-utils 0.6.2-3
ii libc6 2.13-21
ii libdbus-1-3 1.4.16-1
ii libdbus-glib-1-2 0.98-1
ii libglib2.0-0 2.28.8-1
ii libgtk2.0-0 2.24.7-1
ii libxfce4ui-1-0 4.8.0-3
ii libxfce4util4 4.8.2-1
ii procps 1:3.2.8-11
ii x11-xserver-utils 7.6+3
ii xinit 1.3.1-1
ii xterm [x-terminal-emulator] 276-1
Versions of packages xfce4-utils recommends:
ii dbus-x11 1.4.16-1
ii thunar 1.2.3-2
ii xdg-user-dirs 0.14-1
ii xfce4-panel 4.8.6-1
ii xfwm4 4.8.2-1
ii xinput 1.5.3-1
ii xscreensaver 5.15-2
Versions of packages xfce4-utils suggests:
ii xfce4-session 4.8.2-1
-- Configuration Files:
/etc/xdg/xfce4/xinitrc changed:
if test "x$UID" = "x"; then
if test -x /usr/xpg4/bin/id; then
UID=`/usr/xpg4/bin/id -u`;
else
UID=`id -u`;
fi
fi
if test "x$XDG_MENU_PREFIX" = "x"; then
XDG_MENU_PREFIX="xfce-"
export XDG_MENU_PREFIX
fi
if test "x$DESKTOP_SESSION" = "x"; then
DESKTOP_SESSION="xfce"
export DESKTOP_SESSION
fi
if test "x$XDG_CONFIG_HOME" = "x" ; then
XDG_CONFIG_HOME=$HOME/.config
fi
[ -d "$XDG_CONFIG_HOME" ] || mkdir "$XDG_CONFIG_HOME"
if test "x$XDG_CACHE_HOME" = "x" ; then
XDG_CACHE_HOME=$HOME/.cache
fi
[ -d "$XDG_CACHE_HOME" ] || mkdir "$XDG_CACHE_HOME"
if which xdg-user-dirs-update >/dev/null 2>&1; then
xdg-user-dirs-update
fi
if test -f "$XDG_CONFIG_HOME/user-dirs.dirs"; then
. "$XDG_CONFIG_HOME/user-dirs.dirs"
# i'm deliberately not 'export'-ing the XDG_ vars, because you shouldn't
# rely on the env vars inside apps, since the file could be changed at
# any time by the user. this is solely here for migration purposes.
# a bit of user dir migration...
if test -d "$HOME/Desktop" -a ! -L "$HOME/Desktop" \
-a "$XDG_DESKTOP_DIR" \
-a "$HOME/Desktop" != "$XDG_DESKTOP_DIR"
then
echo "Migrating $HOME/Desktop to $XDG_DESKTOP_DIR..."
test -d "$XDG_DESKTOP_DIR" && rmdir "$XDG_DESKTOP_DIR"
mv "$HOME/Desktop" "$XDG_DESKTOP_DIR" || echo "Desktop migration failed" >&2
fi
if test -d "$HOME/Templates" -a ! -L "$HOME/Templates" \
-a "$XDG_TEMPLATES_DIR" \
-a "$HOME/Templates" != "$XDG_TEMPLATES_DIR"
then
echo "Migrating $HOME/Templates to $XDG_TEMPLATES_DIR..."
test -d "$XDG_TEMPLATES_DIR" && rmdir "$XDG_TEMPLATES_DIR"
mv "$HOME/Templates" "$XDG_TEMPLATES_DIR" || echo "Templates migration failed" >&2
fi
fi
LIBGLADE_MODULE_PATH="$LIBGLADE_MODULE_PATH:"
GLADE_CATALOG_PATH="$GLADE_CATALOG_PATH:"
GLADE_PIXMAP_PATH="$GLADE_PIXMAP_PATH:"
GLADE_MODULE_PATH="$GLADE_MODULE_PATH:"
export LIBGLADE_MODULE_PATH
export GLADE_CATALOG_PATH
export GLADE_PIXMAP_PATH
export GLADE_MODULE_PATH
XRESOURCES=""
test -r "/etc/xdg/xfce4/Xft.xrdb" && XRESOURCES="$XRESOURCES /etc/xdg/xfce4/Xft.xrdb"
test -r $HOME/.Xdefaults && XRESOURCES="$XRESOURCES $HOME/.Xdefaults"
BASEDIR=$XDG_CONFIG_HOME/xfce4
if test -r "$BASEDIR/Xft.xrdb"; then
XRESOURCES="$XRESOURCES $BASEDIR/Xft.xrdb"
elif test -r "$XFCE4HOME/Xft.xrdb"; then
mkdir -p "$BASEDIR"
cp "$XFCE4HOME/Xft.xrdb" "$BASEDIR"/
XRESOURCES="$XRESOURCES $BASEDIR/Xft.xrdb"
fi
test -r "$BASEDIR/Xcursor.xrdb" && XRESOURCES="$XRESOURCES $BASEDIR/Xcursor.xrdb"
test -r "$HOME/.Xresources" && XRESOURCES="$XRESOURCES $HOME/.Xresources"
cat /dev/null $XRESOURCES | xrdb -merge -
test -r $HOME/.Xmodmap && xmodmap $HOME/.Xmodmap
if test x"$DBUS_SESSION_BUS_ADDRESS" = x""; then
if which dbus-launch >/dev/null 2>&1; then
eval `dbus-launch --sh-syntax --exit-with-session`
# some older versions of dbus don't export the var properly
export DBUS_SESSION_BUS_ADDRESS
else
echo "Could not find dbus-launch; Xfce will not work properly" >&2
fi
fi
ssh_agent_enabled=`xfconf-query -c xfce4-session -p /startup/ssh-agent/enabled 2> /dev/null`
if test "$ssh_agent_enabled" != "false"; then
# if the user has pam_ssh installed, it will start ssh-agent for us, but
# of course won't start gpg-agent. so, if ssh-agent is already running,
# but we want gpg-agent (and that's not running yet) start gpg-agent
# without ssh support
ssh_agent_type=`xfconf-query -c xfce4-session -p /startup/ssh-agent/type 2> /dev/null`
if test -z "$ssh_agent_type"; then
if which gpg-agent >/dev/null 2>&1; then
ssh_agent_type=gpg-agent
else
ssh_agent_type=ssh-agent
fi
fi
# ignore stale ssh-agents
if test "$SSH_AGENT_PID"; then
if ! kill -0 $SSH_AGENT_PID; then
unset SSH_AGENT_PID
unset SSH_AUTH_SOCK
fi
fi
case "$ssh_agent_type" in
gpg-agent)
if test -z "$SSH_AGENT_PID"; then
eval `gpg-agent --daemon --enable-ssh-support --write-env-file $XDG_CACHE_HOME/gpg-agent-info`
ssh_agent_kill_cmd="kill -INT $SSH_AGENT_PID; rm -f $XDG_CACHE_HOME/gpg-agent-info"
elif test -z "$GPG_AGENT_INFO"; then
echo "ssh-agent is already running; starting gpg-agent without ssh support"
eval `gpg-agent --daemon --write-env-file $XDG_CACHE_HOME/gpg-agent-info`
ssh_agent_kill_cmd="pkill -INT ^gpg-agent\$; rm -f $XDG_CACHE_HOME/gpg-agent-info"
else
echo "gpg-agent is already running"
fi
;;
ssh-agent)
if test -z "$SSH_AGENT_PID"; then
eval `ssh-agent -s`
ssh_agent_kill_cmd="ssh-agent -s -k"
else
echo "ssh-agent is already running"
fi
;;
*)
echo "Unrecognized agent type '$ssh_agent_type'" >&2
;;
esac
fi
screensaver_enabled=`xfconf-query -c xfce4-session -p /startup/screensaver/enabled 2> /dev/null`
if test $UID -gt 0 -a -z "$VNCSESSION" -a "$screensaver_enabled" != "false"; then
screensaver_type=`xfconf-query -c xfce4-session -p /startup/screensaver/type 2> /dev/null`
case "$screensaver_type" in
xscreensaver)
xscreensaver -no-splash &
;;
gnome-screensaver)
gnome-screensaver &
;;
*)
if test x"`which xscreensaver 2>/dev/null`" != x""; then
xscreensaver -no-splash &
elif test x"`which gnome-screensaver 2>/dev/null`" != x""; then
gnome-screensaver &
fi
;;
esac
fi
if which xfce4-session >/dev/null 2>&1; then
xfce4-session
if test "$ssh_agent_kill_cmd"; then
echo "running '$ssh_agent_kill_cmd'"
eval "$ssh_agent_kill_cmd"
fi
exit 0
fi
xsetroot -solid black -cursor_name watch
xfsettingsd &
xfwm4 --daemon
if test -d "$XDG_CONFIG_HOME/autostart"; then
for i in ${XDG_CONFIG_HOME}/autostart/*.desktop; do
grep -q -E "^Hidden=true" "$i" && continue
if grep -q -E "^OnlyShowIn=" "$i"; then
# need to test twice, as lack of the line entirely means we still run it
grep -E "^OnlyShowIn=" "$i" | grep -q 'XFCE;' || continue
fi
grep -E "^NotShowIn=" "$i" | grep -q 'XFCE;' && continue
# check for TryExec
trycmd=`grep -E "^TryExec=" "$i" | cut -d'=' -f2`
if test "$trycmd"; then
which "$trycmd" >/dev/null 2>&1 || continue
fi
cmd=`grep -E "^Exec=" "$i" | cut -d'=' -f2`
if test "$cmd" && which "$cmd" >/dev/null 2>&1; then
$cmd &
fi
done
elif test -d "$HOME/Desktop/Autostart"; then
for i in `ls -1 -L ${HOME}/Desktop/Autostart/ 2>/dev/null`; do
if test -x $HOME/Desktop/Autostart/$i; then
$HOME/Desktop/Autostart/$i &
fi
done
fi
xfdesktop&
orage &
panel=`which xfce4-panel`
case "x$panel" in
x|xno*)
;;
*)
$panel
ret=$?
while test $ret -ne 0; do
xmessage -center -file - -timeout 20 -title Error <<EOF
A crash occured in the panel
Please report this to the xfce4-dev at xfce.org list
or on http://bugs.xfce.org
Meanwhile the panel will be restarted
EOF
cat >&2 <<EOF
A crash occured in the panel
Please report this to the xfce4-dev at xfce.org list
or on http://bugs.xfce.org
Meanwhile the panel will be restarted
EOF
$panel
ret=$?
done
;;
esac
if test "$ssh_agent_kill_cmd"; then
eval "$ssh_agent_kill_cmd"
fi
xsetroot -bg white -fg red -solid black -cursor_name watch
-- no debconf information
More information about the Pkg-xfce-devel
mailing list