Solving (Getting Rid of) - Cannot open display
"default display" after user login on Debian Squeeze
After my upgrade from
Debian testing/unstable to Debian
GNU/Linux wheezy/sid I started experiencing an annoying message
after each user login saying:
Cannot open display "default display"
After a bit of investigation online I've figured out that the
possible causes for the message
Cannot open display "default
display" are definitions in either
/etc/profile,
/home/myuserdir/.profile or /home/myuserdir/.bashrc .
According to some people suggestions online in some of the above
mentioned files I was about to look for some commands which are
related to deal with the X server.
After checking up the suggested files, I've found in my .bashrc
some old xsetkbmap commands set in order to enable my
CTRL+ALT+BACKSPACE to work in X.
I remember some long time ago I've played with the
xsetkbmap
tool in order to enable my X kill with the magic buttons to work as
expected with the well known button combination ctrl + alt +
backspace.
The exact code which was causing me the error/warning message
Cannot open display "default display" was:
setxkbmap -option terminate:ctrl_alt_bksp
Using the commands:
noah:/home/hipo# which setxkbmap
/usr/bin/setxkbmap
noah:/home/hipo# dpkg -S /usr/bin/setxkbmap
x11-xkb-utils: /usr/bin/setxkbmap
noah:/home/hipo#
I've found out the setxkbmap is part of the
x11-xkb-utils
debian package. As I suspected something might be wrong with this
package I gave a try to reinstall the package using the command as
shown below:
noah:/home/hipo# apt-get install --reinstall
x11-xkb-utils
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reinstallation of x11-xkb-utils is not possible, it cannot be
downloaded.
0 upgraded, 0 newly installed, 0 to remove and 0 not
upgraded.
noah:/home/hipo#
However as it could be seen in the above output it is impossible to
reinstall the x11-xkb-utils package probably either because the
package name is changed in Debian wheezy/sid or because the package
is missing from my debian sources repository.
Next I loged in my gnome in X and tried the magic buttons
CTRL+ALT+BACKSPACE and they seem to work even without the setxkbmap
below definitions which means I no longer needed the
setxkbmap
-option terminate:ctrl_alt_bksp definitions in my
~/.bashrc thus I completely scraped out the command from my
.bashrc and the annoying message is now finally! gone, thanks
God.
I've found