我使用的是 Debian 9。安装 Gnome 后,我只能在计算机屏幕上看到鼠标光标。我卸载了 Gnome 并启用了 X11,但它不起作用。我需要通过 ssh 连接到我使用的开发板并输入
> startx
为了在屏幕上获得图像。我可能在安装 gnome 时搞砸了一些东西。
更新:
apt install gdm
不管用:
root@linaro-alip:~# apt install gdm
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package gdm is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or is
only available from another source However the following packages replace
it: libgdm1 cinnamon-control-center-data
E: Package 'gdm' has no installation candidate
更新2:
dpkg-reconfigure lightdm
>> 我手动选择lightdm
root@linaro-alip:~# systemctl enable lightdm
Synchronizing state of lightdm.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable lightdm
The unit files have no installation config (WantedBy, RequiredBy, Also, Alias
settings in the [Install] section, and DefaultInstance for template units).
This means they are not meant to be enabled using systemctl.
Possible reasons for having this kind of units are:
1) A unit may be statically enabled by being symlinked from another unit's
.wants/ or .requires/ directory.
2) A unit's purpose may be to act as a helper for some other unit which has
a requirement dependency on it.
3) A unit may be started when needed via activation (socket, path, timer,
D-Bus, udev, scripted systemctl call, ...).
4) In case of template units, the unit is meant to be enabled with some
instance name specified.
问题仍然没有解决。
当我使用以下命令时,它说该文件不存在。我怎样才能解决这个问题?
update-rc.d '/etc/init.d/xserver start' defaults
update-rc.d: error: initscript does not exist: /etc/init.d//etc/init.d/xserver start
答案1
由于您可以手动启动图形环境,因此您可能会缺少图形登录屏幕(在 Gnome 系统中通常是 GDM),或者它不会自动启动。
请尝试通过执行以下命令来安装并启用它root
(sudo
适当地添加前缀):
apt install gdm
如果该apt install
命令告诉您gdm
已安装,请保留它并继续执行其他命令。
如果该命令告诉您该包gdm
不可用,请尝试lightdm
:
apt install lightdm
dpkg-reconfigure lightdm
然后启用并启动gdm
(或者lightdm
,根据需要进行替换):
systemctl enable gdm
systemctl start gdm
如果这些命令有效,则将开始登录。打开控制台(或返回)然后请输入(root
再次):
systemctl set-default graphical.target
启动时启用图形登录。
如果systemctl start gdm
命令失败(没有出现登录屏幕),则首先重新安装 gnome 本身:
apt install --reinstall gnome
并继续执行行中的下一个命令。