Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
612 views
in Technique[技术] by (71.8m points)

user interface - Run Java AWT/Swing GUI app in headless server

I have a gateway application that comes up with a login dialog and then a GUI window. I will be running this app on a co-located server without a display. I need to interact with the dialog only when logging in and perhaps to check out the main GUI occasionally. The server is Debian 5.0.

The only ideas I have so far are:

  1. Tunnel an X session to my desktop for logging in but I'm not sure what will happen if the X session disconnected (ie, I reboot my desktop, etc..)

  2. Try to instantiate/launch the app from a wrapper Java application that can hopefully fill out the login dialog or login directly however I would most likely lose the ability to see the main GUI this way and other side effects might occur.

It's too bad this particular app was written in Swing and doesn't provide a command-line only mode or daemon mode.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You can run a VNC server on the machine where the application runs. Then you can connect to the virtual X-server at any time to interact with the user interface.

I don't have a Debian system nearby, but on Ubuntu there is a package vnc4server that provides the features you need.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...