在其他 tty 上打开一个空会话

在其他 tty 上打开一个空会话

我@pop-os:~$xinit -- :2 vt3

X.Org X Server 1.21.1.4
X Protocol Version 11, Revision 0
Current Operating System: Linux pop-os 6.6.6-76060606-generic #202312111032~1702306143~22.04~d28ffec SMP PREEMPT_DYNAMIC Mon D x86_64
Kernel command line: initrd=\EFI\Pop_OS-ebdf8099-3515-474a-86ae-0b54f95c95b2\initrd.img root=UUID=ebdf8099-3515-474a-86ae-0b54f95c95b2 ro loglevel=0 systemd.show_status=false quiet splash
xorg-server 2:21.1.4-2ubuntu1.7~22.04.5 (For technical support please see http://www.ubuntu.com/support) 
Current version of pixman: 0.40.0
    Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/home/alex/.local/share/xorg/Xorg.2.log", Time: Sat Jan 13 14:24:31 2024
(==) Using config file: "/etc/X11/xorg.conf"
(==) Using config directory: "/etc/X11/xorg.conf.d"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(EE) 
Fatal server error:
(EE) xf86OpenConsole: Cannot open virtual console 3 (Permission denied)
(EE) 
(EE) 
Please consult the The X.Org Foundation support 
     at http://wiki.x.org
 for help. 
(EE) Please also check the log file at "/home/alex/.local/share/xorg/Xorg.2.log" for additional information.
(EE) 
(EE) Server terminated with error (1). Closing log file.
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error

我也从 tty3 本身尝试过这个。它启动 xserver 时出现黑屏,然后立即关闭。

这里是日志

如何在新的 tty 中启动新的空会话?

我正在使用最新的 Pop_OS! (22.04 LTS)

答案1

我认为这是与权限相关的问题尝试运行:

sudo xinit -- :2 vt3

确保您的用户具有访问虚拟控制台所需的权限。您可以将您的用户添加到 tty 组:

sudo usermod -aG tty your_username

尝试不同的 TTY:您可以尝试在不同的虚拟终端上启动 X,而不是使用 vt3。例如:

sudo xinit -- :2 vt4

希望这可以帮助!

相关内容