You are not logged in.

#1 2018-01-12 18:49:49

salinia0511
Member
Registered: 2018-01-09
Posts: 7

Running GUI based apps in commandline.

How should I run GUI apps on commandline(Not terminal) like firefox while desktop enviroment is running?

Offline

#2 2018-01-12 18:54:36

ayekat
Member
Registered: 2011-01-17
Posts: 1,634

Re: Running GUI based apps in commandline.

Run

firefox

--edit or whatever other program you want to run.

Last edited by ayekat (2018-01-12 18:55:40)


pkgs │ hacks │ cfg │ blag

Offline

#3 2018-01-12 19:06:44

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

Re: Running GUI based apps in commandline.

If you mean from a different tty, then you just need to specify the DISPLAY variable.  You can check in your X session what DISPLAY is set to, but under most common setups it will just be ":0", so:

DISPLAY=:0 firefox

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

Offline

#4 2018-01-12 19:29:09

salinia0511
Member
Registered: 2018-01-09
Posts: 7

Re: Running GUI based apps in commandline.

How should I change DISPLAY var? tty 7 is Desktop environment and tty1 is X Server's log. I have created a user named windows and when I log in, (on every tty except 1 and 7) qemu start with Windows. but when I log in and script runs( qemu-system-x86_64 ... ) I get this message:
Unable to init server: Could not connect: Connection refused
gtk initialization failed

Offline

#5 2018-01-12 19:31:00

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

Re: Running GUI based apps in commandline.

Why are you trying to do all that?  Just run qemu from within your X session.

Or do you want to start another X session for the vm?


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

Offline

#6 2018-01-12 19:47:54

salinia0511
Member
Registered: 2018-01-09
Posts: 7

Re: Running GUI based apps in commandline.

Yes, exactly. Simply change tty and login to a user. Your Windows is ready separate from your Desktop environment and you can kill it by pid as root if you want to exit.

Offline

#7 2018-01-12 19:49:16

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

Re: Running GUI based apps in commandline.


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

Offline

Board footer

Powered by FluxBB