set Display from java

R

rdeman

Hello,

Is there a way, from a same JVM, to connect to several X11 displays.
I'd like to develop a kind of deamon in java that is executed once on a
Unix server (from an admin account). This daemon would provide services
at socket level to other programs, written in a different language
(Perl, C++, ...) running on the same server but from different users
(remotely logged in through an X emulation session with different
accounts). Some of those services need to open a UI (writtent in awt or
swing). So this daemon would have to open windows on several displays
(provided by the client program when connecting to the daemon).
So my question is :
1/ is this possible ?
2/ how can I do that ?

Thank you in advance
Rodolphe

I've found an open bug openned on SND
(http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4670851) but it is
still in progress ...
 
K

Knute Johnson

Hello,

Is there a way, from a same JVM, to connect to several X11 displays.
I'd like to develop a kind of deamon in java that is executed once on a
Unix server (from an admin account). This daemon would provide services
at socket level to other programs, written in a different language
(Perl, C++, ...) running on the same server but from different users
(remotely logged in through an X emulation session with different
accounts). Some of those services need to open a UI (writtent in awt or
swing). So this daemon would have to open windows on several displays
(provided by the client program when connecting to the daemon).
So my question is :
1/ is this possible ?
2/ how can I do that ?

Thank you in advance
Rodolphe

I've found an open bug openned on SND
(http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4670851) but it is
still in progress ...

Have you tried using GraphicsConfiguration? I've not done multiple
screens in Linux but it works fine in Windows.
 
R

rdeman

I haven't found a way to set the do this in any of the following
classes: GraphicConfiguration, GraphicDevice nor GraphicEnvironnement.
I would expect a function like XOpenDisplay.

Rodolphe
 
T

Thomas Weidenfeller

Hello,

Is there a way, from a same JVM, to connect to several X11 displays.

It is only three years ago that someone has asked this :)

http://groups.google.de/group/comp.lang.java.gui/msg/dc3e57c221ae1a50

I don't think the situation has changed. You can't do it in a simple
way. I think it is possible with a lot of senseless hacking. E.g. there
are X11 toolkits implemented in pure Java (e.g.
http://escher.sourceforge.net/). But this is raw X11. There is a lot to
do to implement a GUI with raw X11. You would have to implement some
kind of toolkit on top of it. Otherwise you will get mad.

/Thomas
 
R

rdeman

Hello Thomas,

I have tested escher and it solves my problem (just to switch from one
display to another within the same JVM) !!
I am just a bit afraid because of the release number : 0.2.2 (Jun
2004).

Anyway, thank you very much for the information

Rodolphe
 
T

Thomas Weidenfeller

I am just a bit afraid because of the release number : 0.2.2 (Jun
2004).

Well, you have the source code, you can fix it if it is broken :)

Seriously, FOS software like to come with that kind of understatement.
Until it is not close to perfection in the eye of the original author,
FOS software often doesn't get a 1.x or greater version number.

/Thomas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,710
Latest member
bernietqt

Latest Threads

Top