Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can a single Qt application open windows on more then one X display?

Tags:

linux

x11

qt

I have a Qt application (running on Linux) that is supposed to open an extra window on a different X server, running on a remote computer.

Is there a way to do this within Qt?

I hope to avoid more complex setups, such as - DMX (virtual X-server on top of multiple other X servers) http://dmx.sourceforge.net/, or - creating a second application for the extra window, plus some kind of communication between the two applications

like image 811
ygramoel Avatar asked Nov 12 '22 13:11

ygramoel


1 Answers

You could try spawning a new process, and setting its DISPLAY environment variable to the other X server.

Try doing it from bash at first to see if it works, because I'm not entirely sure:

export DISPLAY=:0.0
./my_qt_application

Replace the :0.0 with your other X server.

like image 188
sashoalm Avatar answered Nov 15 '22 13:11

sashoalm