Problem running GTK applications remotely
This entry was originally posted in my old 360.yahoo.com blog.
I encountered this problem while testing a gtk application I developed. The application was installed in a remote machine, which could be accessed via ssh. Every time I ran the program, I got this error message "… BadWindow (invalid Window parameter) …".
I initially thought that the problem was related to the X window system. After searching the Internet, I found out that the problem is an ssh issue, or more precisely, X11 and TCP forwarding in ssh. There are two possible solutions to resolve this problem:
- using the -Y option in ssh. The -Y option enables trusted X11 forwarding. Note that the -X option also doesn’t work. You can run ssh as follows:
[user] $ ssh -Y hostname - put "ForwardX11Trusted=yes" option in the ssh configuration file. The personal configuration for ssh can be placed in .ssh/config in your home directory ($HOME/.ssh/config)
With this, the problem was solved!