默认情况下/etc/pam.d/common-auth看起来像这样
$ cat /etc/pam.d/common-auth
#
# /etc/pam.d/common-auth - authentication settings common to all services
#
# This file is included from other service-specific PAM config files,
# and should contain a list of the authentication modules that define
# the central authentication scheme for use on the system
# (e.g., /etc/shadow, LDAP, Kerberos, etc.). The default is to use the
# traditional Unix authentication mechanisms.
#
# As of pam 1.0.1-6, this file is managed by pam-auth-update by …Run Code Online (Sandbox Code Playgroud) 我通过 SSH 连接到 Ubuntu 14.04 机器,我想启动 lightdm 会话以进行测试。
我不想将 X 服务器转发到我的本地机器。我只想远程启动 lightdm 会话,因此我可以通过 SSH 进行一些测试。换句话说,我希望 lightdm 会话开始时就像用户自己登录一样。
我尝试了各种组合,但都没有奏效:
# attempt 1
export DISPLAY=:0
sudo xhost +SI:localuser:lightdm
sudo su lightdm -s /bin/bash
/usr/sbin/lightdm-session /usr/share/xsessions/ubuntu.desktop
exit
# attempt 2
export DISPLAY=:0
/usr/sbin/lightdm-session /usr/share/xsessions/ubuntu.desktop
# attempt 3
export DISPLAY=:0
/usr/bin/dbus-launch --exit-with-session /usr/share/xsessions/ubuntu.desktop
Run Code Online (Sandbox Code Playgroud)
如何通过 SSH 启动 ubuntu.desktop 会话?