You are not logged in.

#1 2023-03-18 12:17:30

mavericus
Member
Registered: 2022-10-20
Posts: 13

[Solved] Run consucutive X application without desktop/window manager.

The subject is really bad as i dont know how to explain the problem within the given space so where is the full problem:

What I want:
I want to run a gui application from tty without loading up a window manager or desktop environment. I all able to do this through startx application. However the application written in the command is a launcher to open another application which is what i want. (Basically minecraft).

The Problem:
The launcher shows up perfectly but when it launches the other program i don't see it. It terminate the x session. I would be grateful if someone could help me with this. i have searched the internet but have not found the specific scenario i am facing.

Last edited by mavericus (2023-05-12 16:43:05)

Offline

#2 2023-03-18 12:31:51

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

Re: [Solved] Run consucutive X application without desktop/window manager.

I'd guess the "launcher" forks the actual minecraft process so there is nothing left keeping the session open.  The best solution would be to prevent this forking or just launch the minecraft process directly.  If not possible, then you could just add a bit to the bottom of your xinitrc or other script that you run from startx to wait for the minecraft process to exit.

For more details in an answer, though, we need more details from your question.  What exactly are you running?  What is the launcher and what exactly does it to?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2023-03-18 13:04:27

seth
Member
Registered: 2012-09-03
Posts: 49,998

Re: [Solved] Run consucutive X application without desktop/window manager.

There's also https://man.archlinux.org/man/core/man-pages/wait.1p.en - if you know or can query (pidof virtuallego) the PID of the forked process.

Online

#4 2023-03-19 15:01:11

mavericus
Member
Registered: 2022-10-20
Posts: 13

Re: [Solved] Run consucutive X application without desktop/window manager.

So I use the vortex launcher to launch minecraft: https://github.com/Kron4ek/minecraft-vortex-launcher

When i open this launcher i am greeted with the launcher screen. Then I have to press play for it to run minecraft. It the runs java which the gives me the minecraft screen.

When i try to do this with startx i get the following results: https://ibb.co/z5mjsWR

for any more details please ask.

Offline

#5 2023-03-19 15:06:41

seth
Member
Registered: 2012-09-03
Posts: 49,998

Re: [Solved] Run consucutive X application without desktop/window manager.

Don#t post images of text, post the text.
That being said: it shows nothing more than the X11 server terminating because the session keeping process died.
Run something that keeps the session open after the vortex launcher.

Online

#6 2023-03-19 17:35:14

mavericus
Member
Registered: 2022-10-20
Posts: 13

Re: [Solved] Run consucutive X application without desktop/window manager.

Sorry to ask, but how would i do that? i tried putting sleep 999999 at the end of xinitrc after the exec "application" line but that did not work. I tried using the wait command you suggested but i don't know to use it, I replaced the sleep 999999 with wait $(pidof java) which still did not work. Any tip would be great. Thanks

Offline

#7 2023-03-19 20:13:41

seth
Member
Registered: 2012-09-03
Posts: 49,998

Re: [Solved] Run consucutive X application without desktop/window manager.

Ftr. if you run "startx something" your xinitrc is ignored.
You'll have to make the waiting process part of "something" in that case, https://wiki.archlinux.org/title/Xinit#Override_xinitrc

If you want to use "wait" you'll have to figure what specific process to wait for (eg. by starting it in a regular session and inspecting the process tree for the name) and you might have to briefly sleep (sleep 1; wait $(pidof stuff) in case there's more than one fork going on.

Online

#8 2023-03-21 18:37:42

mavericus
Member
Registered: 2022-10-20
Posts: 13

Re: [Solved] Run consucutive X application without desktop/window manager.

I was initially confused as how to implement the wait command into the startx command which was what i was trying to convey but was unsuccessfull in doing so. However, i realised you can make a script and use that in startx. It turns out i cannot use the wait command with reliability even with pidof because it seems to change. However i realised that just adding sleep 99999 to the end of the scripts seems to work. Even better though is that i run xterm with startx and then run my application and it works perfectly. Thanks all for your help.

Offline

#9 2023-03-21 20:16:52

seth
Member
Registered: 2012-09-03
Posts: 49,998

Re: [Solved] Run consucutive X application without desktop/window manager.

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Online

Board footer

Powered by FluxBB