I’ve used multiple operating systems; Fedora, Debian and Ubuntu and with them all I have installed and worked with SSH. I recently started to look into openSuSE just to get a flavour of using it day to day. My problem is the following with SSH:
I have a computer and a server (in my tests there is someone logged onto the Server). I SSH into the server (as the user that is logged into the Server) and try to get Zenity to display a dialog on the server. In the other flavours I have used I just use:
export DISPLAY :0
Then called Zenity, but I get Gtk-WARNING **: cannot open display: :0.
Running ‘who’ shows that the user logged onto the server is running under display :0 so I am not too sure what the problem is. Any tips or hints would be greatly appreciated.
To use X requires that the X authentication works.
If you are using gdm as display manager, then it does not use $HOME/.Xauthority. Instead, it has a file elsewhere and sets XAUTHORITY to be the path to that file. Your SSH session probably does not have that definition for XAUTHORITY. You either need to export the xauth information to your “$HOME/.Xauthority” file, or define the needed value of XAUTHORITY in the environment.
I have found that in some circumstances, I also need to define XAUTHLOCALHOSTNAME in the environment.
@ab - sorry in my haste to type (rather than copy and paste which I should have done) I did indeed mean export DISPLAY=:0.0
@nrickert - thanks. do you have any links that I could read to increase my knowledge of ssh and xauthority so that I can understand what I need to do and then how?
If you switch display manager from “gdm” (which you are probably using) to “kdm”, that might already solve your problem. However, that might interfere with opening the default gnome keyring when you login (mostly a problem for WiFi, I think).
Anyway thanks for the help its working now. I had to modify my script to find the xauthority file of the user logged in and then as you said: export XAUTHORITY=<path to xauthority file>/database and voila the dialog appears on the other machine.