Can a gtk application use a display other than :0 defaultly?

206 Views Asked by At

I am trying to execute a gtk app using vncviewer..

When i connect using :0 display i can execute the gtk app fine, but with any other display i.e :1 etc, the app exits with the following error..

CRITICAL **: Could not initialize GTK

Is there a way by which a gtk app can use display other than the :0 display so that i can use it through vncviewer?

An actual user on the machine already uses the machine so display :0 cant be used in my case.

I think this is possible as all other GUIs on the system run fine on any display.

Any clues?

1

There are 1 best solutions below

0
On

I found the issue that I was experiencing.. While using vncviewer the user should execute a gtk application(this could be true for other gui apps aswell..) from the terminal while logged in from the same user that is specified in the

~/.vnc/xstartup

config file.

The issue was that i was executing the gtk app after switching to some other user from terminal,different from the user specified in the ~/.vnc/xstartup file. Once i swithched the ueser.. the app came up!.