It feels like it should be possible to allocate the tty dynamically as well (using openvt -s, and a script using the tty command). Sh -c 'chvt 8 & exec startx /usr/bin/xterm' logind gives you permission to do stuff on the VT you logged in on. In that case you need permission from logind. You appear to have been trying to run X without forcing it to run as full root. I think X will probably remain compatible with this. If you went back to running X as root, you would not need permission from logind. This works by using logind instead, a smaller background service (which is started with root privileges). The design is you do not need to start any program as root (in order to improve security). Some tools such as startx have changed their behaviour, to use the new design. X has now been changed so that it can use the current VT instead. In other words, I'm not sure whether this would do what you want anyway. a non-root user might not be able to start X from inside another X session. Note, even then, X might only have worked if you started it from a text VT. X used to rely on being set-uid root, and switch to a new VT. I do not know why this situation is tolerated, or how it happened in the first place. xinit appears to be written to accept X connections from any user ID, without warning or documentation. Xinit: unable to connect to X server: Connection refusedĭo not use xinit, because it is vulnerable. Session terminated, terminating shell.xinit: giving up (EE) Please also check the log file at "/home/mahr/.local/share/xorg/Xorg.4.log" for additional information. Please consult the The X.Org Foundation support (EE) parse_vt_settings: Cannot open /dev/tty0 (Permission denied) (=) Using system config directory "/usr/share/X11/" (WW) warning, (EE) error, (NI) not implemented, (?) unknown. (++) from command line, (!!) notice, (II) informational, Markers: (-) probed, (**) from config file, (=) default setting, To make sure that you have the latest version. Xorg-server 2:1.19.6-1ubuntu4.3 (For technical support please see ) Kernel command line: BOOT_IMAGE=/vmlinuz-4.15.0-70-generic root=/dev/mapper/ubuntu-vg-root ro On the new shell on the switched to tty I (created via openvt) I hence issues this command: $> su -c 'xinit xterm -display :4 - :4' - mahr &>/tmp/outputĪnd I receive this output $> cat /tmp/outputīuild Operating System: Linux 4.4.0-148-generic x86_64 UbuntuĬurrent Operating System: Linux scitech 4.15.0-70-generic #79-Ubuntu SMP Tue Nov 12 10:36: x86_64 On that new tty I wanted to manually start a Xorg server which according to man xinit should start with a minimal xterm application. The -s of causes the direct switch to that new tty/vt Looking at man openvt I was able to run a shell on a newly created tty (or vt, cannot tell precisly the different vt tty) like this: $> sudo openvt -s /bin/bash This is the backgroud and what I have tried already: Here the Longer background story to the question at hand: How to manually run/init/start a Xorg server on a different VT/TTY? I have thought this to be as simple as issuing a xinit or maybe a startx however both have failed me. I am going to show you how to switch between Xorg and Wayland display servers on Ubuntu.I want to start an Xorg server (which should only feature a minimal xterm terminal emulator from a newly created "pristine" tty). Whichever display server may be the default, the other one also remains accessible to you, and you may switch to it. For example, there is not a single Linux screen recorder that works flawlessly with Wayland. But since Wayland is newer, many applications may not work properly with it. On the surface, you won’t notice any change in the display. Now, Wayland becomes default again in version 21.04. The experiment didn’t go well and they reverted to Xorg with Ubuntu 18.04. In 2017, Ubuntu made it the default with version 17.10. Xorg (or X display server) is the legacy display server whereas Wayland is relatively newer. It is the underlying technology thanks to which, you can use your computer graphically. I hope you know what a display server is. Brief: This quick tutorial shows you how to switch between xorg and Wayland display servers on Ubuntu and hopefully other Linux distributions.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |