You are not logged in.

#1 2013-07-23 14:50:00

yvesdaeschle
Member
Registered: 2013-07-23
Posts: 4

Start javaws application just with X server

Hello!

I hope someone can help me to get my javaws application started without any window manager just by using a x server.

It works by starting xterm (xinit /usr/bin/xterm) and then stating my application in xterm by "javaws http://url".
Is it possible to get my application started directly? (Without xterm...)

Do I understand it right? Before I can start the application, X server has to be running? After that start the javaws command?
How can I get this managed?

Thanks a lot!

Yves

Offline

#2 2013-07-23 15:19:01

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Start javaws application just with X server

Have you tried https://wiki.archlinux.org/index.php/Ga … e_X_server ?
Maybe you can start xterm and execute 'javaws http://url' in it this way.

Offline

#3 2013-07-23 15:23:03

yvesdaeschle
Member
Registered: 2013-07-23
Posts: 4

Re: Start javaws application just with X server

What I also could do is to insert the call statement in my .xinitrc. But the call just stats a "thread". The call statement itself is just terminated. So my X session also closes.
I think this is my problem ... it's running in the background and X server just closes ...

(Also in xterm the statement is just a moment. The javaws must run in background.)

Offline

#4 2013-07-23 15:27:28

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,550
Website

Re: Start javaws application just with X server

There must be *some* foreground process to keep the connection with the xserver - in common setups a window manager will serve this purpose, but it could be anything else.

If the javaws call is backgrounded (is this mandatory / can you override this) then you need some other process.

One way would be to launch it from your xinitrc, then get the PID and wait for that PID to close.  The simplest implementation of this would be with the following in your xinitrc:

javaws httpp://...
wait $?

EDIT2: The second line should be something like:

wait $(pidof javaws)

Actually, after rereading `man wait` the $? which speicfies the PID may not even be necessary.

EDIT: completely OT, Karol is our "Archivist" now?

Last edited by Trilby (2013-07-23 15:47:30)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2013-07-23 15:27:34

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Start javaws application just with X server

How exactly to you run it in xterm? 'xterm -hold -e /path/to/app' might work.

Offline

#6 2013-07-23 15:39:37

yvesdaeschle
Member
Registered: 2013-07-23
Posts: 4

Re: Start javaws application just with X server

I will try it with wait - does it work without the PID?

@karol: I'd like to run the javaws without xterm. The xterm solution was just to see if it runs with my setup of X server ... ;-)

Offline

#7 2013-07-23 15:46:35

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,550
Website

Re: Start javaws application just with X server

I added an edit.  According to the man page, wait *should* work without specifying a PID, but I've never used it like that - but my other recommendation is wrong `$?` is the return code of the last command, not the PID (sorry). But you can use something like `wait $(pidof javaws)`.

Last edited by Trilby (2013-07-23 16:52:55)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#8 2013-07-23 15:47:46

yvesdaeschle
Member
Registered: 2013-07-23
Posts: 4

Re: Start javaws application just with X server

Thanks, I will try that and post the result here...

Offline

Board footer

Powered by FluxBB