Vidalia fails to show up on some hardware
Originally created by @alant on #6389 (Redmine)
An user reported that Vidalia fails to show up when they boot Tails
0.21 on USB.
I was able to reproduce this issue while booting 0.21 from an USB
stick
created by the Tails Installer on some hardware. I have a combination
of {USB stick, computer} that allows me to reproduce the bug every time.
This is the output of restart-vidalia run with `set -x` when the
issue
appears:
+ ARGS=
+ grep -qw bridge /proc/cmdline
+ . /etc/live/config.d/username.conf
+ LIVE_USERNAME=amnesia
+ . /etc/default/locale
+ LANG=fr_FR.UTF-8
+ killall vidalia
+ pgrep -u amnesia nm-applet
+ export LANG
+ export DISPLAY=:0.0
+ echo /var/run/gdm3/auth-for-amnesia-G9HRGm/database
+ export XAUTHORITY=/var/run/gdm3/auth-for-amnesia-G9HRGm/database
+ sudo -u amnesia xhost +SI:localuser:vidalia
+ pgrep -u vidalia vidalia
+ sudo -u vidalia lckdo /var/lock/vidalia vidalia -DISPLAY=:0.0 -loglevel debug
+ sleep 5
+ pgrep -u vidalia vidalia
+ sudo -u amnesia xhost -SI:localuser:vidalia
No protocol specified
vidalia: cannot connect to X server :0.0
My conclusion: there is a race condition between vidalia trying to
connect to X and the removal of xhost access to X. In some cases,
xhost
is denied access to the vidalia user before vidalia actually tried to
connect to X.
The following quick and dirty patch on restart-vidalia fixes the issue
for me:
sudo -u ${LIVE_USERNAME} xhost +SI:localuser:vidalia
sudo -u vidalia lckdo /var/lock/vidalia vidalia -DISPLAY=${DISPLAY}
${ARGS} & until pgrep -u vidalia vidalia >/dev/null ; do
sleep 5
done
+sleep 5
sudo -u ${LIVE_USERNAME} xhost -SI:localuser:vidalia
Feature Branch: bugfix/vidalia_fails_to_start