Problem running GTK applications remotely

This entry was originally posted in my old 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:

  1. 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
  2. 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!

You may also like...

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.