Hi all.
I've found this problem solved everywhere and I tried a lot of suggestions. But none of them worked.
This is the situacion.
- There is a server running a Debian. It has a user, let's say myuser.
- This myuser needs to execute a python library that makes use of libqt4 and it requires an active X server to perform almost any graphic operation. This python program does not need to pop up any window or so, it just creates a svg file, but the X server is a dependence that can't be avoided.
- But when I try to run this python I get the same as when I run, for instance, xclock:
$ xclock
No protocol specified
Error: Can't open display: :0.0
These are the things I tried to solve it unsuccesfully:
- login as myuser with ssh -X:
$ xhost +localhost
xhost: unable to open display "000.000.00.000:0.0"
Also tried login as root.
- xauth merge ~/.Xauthority
-In /etc/ssh/ssh_config set ForwardX11 yes
- xhost root logged as root. Also logged as myuser -I'm not sure who is the server and the client in this situation-.
- xhost + from both user and root
# xhost root
No protocol specified
xhost: unable to open display ":0"
- Installed network manager and added nm-system-settings.conf:
[keyfile]
hostname = <your hostname>
- In /etc/X11/Xwrapper.config allowed_users=anybody
After the changes sudo /etc/init.d/gdm restart
This may help:
$ startx
Fatal server error:
Server is already active for display 0
If this server is no longer running, remove /tmp/.X0-lock
and start again.
Please consult the The X.Org Foundation support
at
http://wiki.x.org
for help.
^CInvalid MIT-MAGIC-COOKIE-1 keygiving up.
xinit: Resource temporarily unavailable (errno 11): unable to connect to X server
xinit: No such process (errno 3): unexpected signal 2.
Any idea? Thanks in advance.