一个用户无法登录 MATE,而另一个用户无法登录

一个用户无法登录 MATE,而另一个用户无法登录

重要免责声明:在此之前,我意外删除了一个重要的库 (libreadline7),而这个库在我不知情的情况下删除了几个重要的系统库(NetworkManager 之类的东西也被删除了),导致 Ubuntu 无法正常启动。我能够通过从引导加载程序进入恢复模式,重新安装 ubuntu-minimal、ubuntu-standard 和 ubuntu-mate-desktop 来为我的用户恢复此问题。这样我就可以登录到我自己的个人用户,一切似乎都恢复正常了,但我确信其他一些东西坏了,这就是我提到这一点的原因。

我有一个 Ubuntu MATE 18.04 桌面安装,有多个用户。出于某种原因,我可以登录一个用户,该用户是使用 Ubuntu MATE 安装配置的主用户。但另一个用户无法登录他的 MATE 会话。

在检查了 /var/log/lightdm 中的某些日志后,我没有发现 lightdm 有任何错误,并且我被引导到用户的 .xsession-errors 文件。

我注意到,在该用户的 .xsession-errors 中,有一些错误没有出现在我的用户中

mate-session[18804]: WARNING: Unable to find provider 'mate-panel' of required component 'panel'
mate-session[18804]: WARNING: Unable to find provider 'caja' of required component 'filemanager'
mate-session[18804]: WARNING: Unable to find provider '' of required component 'dock'
mate-session[18804]: WARNING: Could not launch application 'update-notifier.desktop': Unable to start application: Failed to execute child process “update-notifier” (No such file or directory)
mate-session[18804]: WARNING: Could not launch application 'snap-userd-autostart.desktop': Unable to start application: Failed to execute child process “/usr/bin/snap” (No such file or directory)
mate-session[18804]: WARNING: Could not launch application 'print-applet.desktop': Unable to start application: Failed to execute child process “system-config-printer-applet” (No such file or directory)
mate-session[18804]: WARNING: Could not launch application 'nm-applet.desktop': Unable to start application: Failed to execute child process “nm-applet” (No such file or directory)
sh: 1: /usr/bin/nvidia-settings: not found
mate-session[18804]: WARNING: Could not launch application 'blueman.desktop': Unable to start application: Failed to execute child process “blueman-applet” (No such file or directory)
mate-session[18804]: WARNING: Could not launch application 'org.gnome.DejaDup.Monitor.desktop': Unable to start application: Failed to execute child process “/usr/lib/deja-dup/deja-dup-monitor” (No such file or directory)
mate-session[18804]: WARNING: Could not launch application 'ubuntu-mate-welcome-autostart.desktop': Unable to start application: Failed to execute child process “/snap/bin/ubuntu-mate-welcome” (No such file or directory)
mate-session[18804]: WARNING: Could not launch application 'caja-dropbox.desktop': Unable to start application: Failed to execute child process “caja-dropbox” (No such file or directory)

(process:19290): indicator-sound-WARNING **: 14:39:55.272: volume-control-pulse.vala:735: unable to get pulse unix socket: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.PulseAudio1 was not provided by any .service files
Window manager warning: Log level 128: Name com.canonical.AppMenu.Registrar does not exist on the session bus

Window manager warning: Log level 16: XPresent is not compatible with your current system configuration.
Gtk-Message: 14:41:55.124: GtkDialog mapped without a transient parent. This is discouraged.
Gtk-Message: 14:42:12.848: GtkDialog mapped without a transient parent. This is discouraged.
Xsession: X session started for root at Sun Sep 26 12:24:13 +04 2021
dbus-update-activation-environment: systemd --user not found, ignoring --systemd argument
dbus-update-activation-environment: setting DISPLAY=:0
dbus-update-activation-environment: setting XAUTHORITY=/home/santhosh/.Xauthority
localuser:root being added to access control list
localuser:boinc being added to access control list
/etc/X11/xinit/xinitrc: 2: [: x: unexpected operator
/etc/X11/xinit/xinitrc: 2: [: x: unexpected operator
dbus-update-activation-environment: systemd --user not found, ignoring --systemd argument
dbus-update-activation-environment: setting GTK_MODULES=gail:atk-bridge
/etc/X11/xinit/xinitrc: 16: /etc/X11/Xsession.d/90gpg-agent: gpgconf: not found
/etc/X11/xinit/xinitrc: 18: /etc/X11/Xsession.d/90gpg-agent: gpgconf: not found
dbus-update-activation-environment: systemd --user not found, ignoring --systemd argument
dbus-update-activation-environment: setting QT_ACCESSIBILITY=1
dbus-update-activation-environment: systemd --user not found, ignoring --systemd argument
dbus-update-activation-environment: setting SUDO_GID=1002
dbus-update-activation-environment: setting MAIL=/var/mail/root
dbus-update-activation-environment: setting LC_TIME=en_US.UTF-8
dbus-update-activation-environment: setting USER=root

我猜想用户的 dconf 数据库可能存在问题,但我搞不清楚。目前我不确定下一步该检查什么。有没有办法将用户的 X 会话设置重新配置为默认值?

答案1

您必须完全重新安装 Ubuntu MATE 桌面任务包

sudo apt-get install ubuntu-mate-desktop^ --reinstall

注意^ubuntu-mate-desktop^表示任务,因此ubuntu-mate-desktop将强制重新安装包及其所有依赖项。

然后小心地重新安装 xsession-errors 日志中提到的内容:

sudo apt-get install --reinstall mate-panel caja update-notifier snapd \
mate-dock-applet system-config-printer network-manager-gnome blueman deja-dup \
caja-dropbox gpgconf

sudo snap install software-boutique --classic
sudo snap install ubuntu-mate-welcome --classic

然后重新启动并尝试使用普通方式登录(不是) 用户。

成功登录后,你必须debsums使用以下命令重新安装来自 deb-packages 的损坏/删除的文件

sudo apt-get install debsums

其次是

xargs -rd '\n' -a <(sudo debsums -c 2>&1 | cut -d " " -f 4 | sort -u | xargs -rd '\n' -- dpkg -S | cut -d : -f 1 | sort -u) -- sudo apt-get install -f --reinstall --

(格式化为内联代码以便于阅读,请不要编辑)


登录问题其他用户可能是权限问题导致的。使用以下方法恢复默认设置sudo chown -R otheruser:otheruser /home/otheruser(替换otheruser正确的username),然后重新启动。

答案2

对于遇到此问题的其他任何人。我已修复此问题,原因是我之前的主题存在问题,我已对其进行了自定义,但最新版本已不再支持该主题。

如果我运行 mate-panel,它就会出现段错误。如果我移动 .config 目录,我会得到 CAIRO_REFERENCE_COUNT_HAS_REFERENCE 我尝试了所有更新或重新安装 mate 的方法,但没有成功。使用 mate-panel --replace 或 reset 也没有成功。

我意外地以 sudo 身份运行了 mate-panel,它成功了。这让我开始关注其他事情。mate-session-properties 有一些重复的启动项,比如两个卷,所以我取消勾选了重复项。mate-panel 仍然无法工作。

我运行了 mate-appearance-properties 并从自定义中选择了一个默认主题。mate-panel 现在运行了,但我必须重新设置所有的快捷方式。

相关内容