How to run a X-program with sudo using putty and xming?
Posted on 2009-05-14
I do want to run a X-program, lets say xclock, on a linux server. The program should be displayed on a windows pc running xming as X-server.
Or in detail:
1. I logon using putty with X-forwaring as user THEUSER to the server from my pc
2. I start xming as X-server on my pc
3. I run sudo -u THEOTHERUSER /usr/bin/X11/xclock
4. xclock is displayed on my pc ...
The problem is, that there is an error message regarding to the X-settings (DISPLAY)
Xlib: connection to "localhost:10.0" refused by server
Xlib: PuTTY X11 proxy: wrong authentication protocol attempted
Error: Can't open display: localhost:10.0
I tried to copy the xauth stuff from one user to the other, but the DISPLAY and the cookie change every logon... if the user THEOTHERUSER is offline, there is no xauth information to be copied....
Can give any suggestions?
Thank you very much