在我开始写小说之前,关于我的设置的一些信息:Ubuntu 16.04 gnome gdm3(lightdm
我第一次遇到问题时正在使用,但切换过来尝试看看是否能解决问题)。
当我登录会话时,我可以选择会话并输入密码,但之后只有后台加载,没有其他内容。如果我++Ctrl并通过 startX 手动启动 serverX,我的会话可以正常加载。 在相关问题上,我也无法锁定会话(通过++ 、+或GUI )AltF1
CtrlAltLSuperL
现在,这个问题不是随机发生的。我最近把与包管理相关的一切都搞乱了。我记不清我做了什么。
以下是我所做工作的大致概述,希望这可能会有所帮助。
我尝试安装 Python 3.6,但它不允许我使用 Python 3.5。因此,为了聪明起见,我编辑
/etc/apt/sources.list
并添加了一些调试存储库。(此后我将更改恢复为sources.list
)。#deb cdrom:[Ubuntu 16.04.2 LTS _Xenial Xerus_ - Release amd64 (20170215.2)]/ xenial main restricted # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to # newer versions of the distribution. deb http://us.archive.ubuntu.com/ubuntu/ xenial main restricted # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main restricted ## Major bug fix updates produced after the final release of the ## distribution. deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team. Also, please note that software in universe WILL NOT receive any ## review or updates from the Ubuntu security team. deb http://us.archive.ubuntu.com/ubuntu/ xenial universe # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial universe deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team, and may not be under a free licence. Please satisfy yourself as to ## your rights to use the software. Also, please note that software in ## multiverse WILL NOT receive any review or updates from the Ubuntu ## security team. deb http://us.archive.ubuntu.com/ubuntu/ xenial multiverse # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial multiverse deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse ## N.B. software from this repository may not have been tested as ## extensively as that contained in the main release, although it includes ## newer versions of some applications which may provide useful features. ## Also, please note that software in backports WILL NOT receive any review ## or updates from the Ubuntu security team. deb http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse ## Uncomment the following two lines to add software from Canonical's ## 'partner' repository. ## This software is not part of Ubuntu, but is offered by Canonical and the ## respective vendors as a service to Ubuntu users. # deb http://archive.canonical.com/ubuntu xenial partner # deb-src http://archive.canonical.com/ubuntu xenial partner deb http://security.ubuntu.com/ubuntu xenial-security main restricted # deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted deb http://security.ubuntu.com/ubuntu xenial-security universe # deb-src http://security.ubuntu.com/ubuntu xenial-security universe deb http://security.ubuntu.com/ubuntu xenial-security multiverse # deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse
然后尝试强制安装 Python 3.6(我失败了),结果把一切都搞砸了。从我的角度来看,
git
突然间我的机器上不再安装了,每次我想运行时apt-get
都会有一些未解决的依赖项(主要是git
、python3
、libperl
)。然后我尝试解决这个
apt
问题。在某个时候,我意外地卸载了其他软件包apt-get
(并且aptitude
也没有安装)...此时,机器的行为通常情况下我可以锁定我的会话,我可以使用
vim
,gcc
并且gdb
一切都很好(对我来说一切都很好,但是git
)。- 然后我锁定会话,进入周末。今天早上我回来时看到黑屏,屏幕上什么都没有显示。
- 我硬重启了我的机器,但什么都没启动(此时我甚至无法尝试登录我的会话)。所以我Ctrl+ Alt+ F1,并尝试手动启动 startX(失败了)。
然后我继续通过以下方式修复(我猜测)我的包裹问题:
sudo rm -rf /etc/apt/apt.conf.d/20snapd.conf
重新安装
ubuntu-desktop
并最终成功启动 serverX 和我的会话sudo apt --fix-broken install sudo dpkg --configure -a sudo apt-get update sudo apt-get upgrade sudo dpkg --configure -a sudo apt-get -f install sudo apt-get full-upgrade sudo apt-get install --reinstall ubuntu-desktop sudo apt-get install --reinstall ubuntu-release-upgrader-gtk sudo apt-get install --reinstall update-manager startx
一切都很好,我很高兴(我注意到环境与以前不完全相同(终端中的字体不一样)但无论如何,我都可以正常工作。(甚至
git
回来了)然后我尝试锁定我的会话——> 不可能
当我重新启动并尝试修复锁定问题时,我注意到,一旦我输入密码登录到我的会话,它就会加载后台而没有其他任何内容(再次通过 startX
tty1
解决了登录到我的会话的问题)。为了解决这个问题,我尝试了一些方法:
sudo apt install --reinstall gnome-shell ubuntu-gnome-desktop
我尝试使用 gdm3 和 lightdm:两次都出现同样的问题
sudo apt-get install ubuntu-session sudo apt-get install x11-common sudo apt-get install xserver-common sudo apt-get install xserver-xorg sudo apt-get install gnome sudo apt-get install unity
当然,如果您疯狂到想要帮助我解决困境,我很乐意提供任何日志文件或任何东西。
答案1
将桌面环境更改为 kubuntu-desktop 和 sddm 解决了我的问题。会话启动正常,我可以锁定屏幕 !!!!!!!!!
我猜测问题出在 ubuntu-desktop(配置文件肯定在某个地方被弄乱了),因为我在使用 ubuntu-desktop 时遇到了 lightdm 和 gdm 的问题。