You are not logged in.
I tried to run hedgewars in a separate X server. As the wiki states, I issued the following command in terminator
xinit /usr/bin/hedgewars -- :1 vt$XDG_VTNR
This yielded
/usr/lib/xorg-server/Xorg.wrap: Only console users are allowed to run the X server
So I added this to /etc/X11/Xwrapper.config
allowed_users = anybody
needs_root_rights = no
Now the error is
(EE) xf86OpenConsole: Cannot open virtual console 7 (Permission denied)
When I do this from tty, everything succeeds, but it takes about ~10 secons to launch the app. What am I doing wrong?
Last edited by marmistrz (2016-04-18 19:19:33)
Offline
I don't think you're doing anything wrong, it works the same for me: start another X from the tty, wait for X and the app to launch, play the game.
Offline
Yes, but I'd like to launch new X session from an existing one, from my DE.
Offline
vt$XDG_VTNR
That paramater is the reason you get an error when using that command from within an X-session.
You can try a fixed number of a TTY that's not in use (like vt6) , but that will break logind session management for that tty..
it is possible the app won't work as intended without a proper logind session.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Offline
Well, the real problem is that it takes sooo long for the app to launch.
I tried doing it this way, but what I get is:
(EE) xf86OpenConsole: Cannot open virtual console 8 (Permission denied)
/edit: it seems launching gedit takes a breeze, so maybe it's hedgewars that takes a long time.
I notice chvt can change the virtual terminal, but what would do the trick would be a script which would:
1. enter ttyX
2. automatically login the existing user
3. open a bash prompt/run a command
is such a thing possible?
Last edited by marmistrz (2016-04-19 17:35:02)
Offline
You can automatically log in as user XYZ and run a script that starts X with certain parameters, launches apps etc. when switching to a tty with Alt-Ctrl-F<number>, but you have to remember which user and which app corresponds to which tty or it won't be automatic ;P
Offline
It's not really what I mean. Let's assume I'm in my Cinnamon session. I'd like to launch a script, which will run an app in a free virtual terminal, say in the following way
run-separate-x hedgewars 8
Would run hedgewars in tty8 and switch me to that vt, without asking me for password.
The script should run only on-demand. Is it possible to achieve such a thing?
Offline
I think you should try 'chvt' because you AFAICT can't start X server from another X server. If you allow automatic login (w/o a password) it might work.
Offline
I am also having this problem. Any resolution?
It seems that chvt must be run as root.
Offline