- Как запустить графическую оболочку Ubuntu
- Запуск графической оболочки Ubuntu
- Смена менеджера дисплеев (DM) по-умолчанию (KDM,GDM и т.п)
- Display manager
- Contents
- Available software
- Configuration
- OpenRC
- Historical use of the deprecated xdm init script
- systemd
- How to Fix – Failed to Start Light Display Manager Error
- 3 min
- How to Fix – Failed to Start Light Display Manager Error
- Why this error?
- How to Fix
- Other Solutions
- Closing Notes
Как запустить графическую оболочку Ubuntu
Если вы запустили систему в текстовом режиме или вовсе это сервер и на нём надо работать только через терминал, но на нём уже есть установлено графическое окружение, есть несколько способов его запустить.
В этой статье мы постараемся разобраться как запустить графическую оболочку Ubuntu из терминала несколькими способами.
Запуск графической оболочки Ubuntu
Сначала можно посмотреть текущий уровень запуска в systemd. Для этого выполните:
systemctl list-units —type target | egrep «eme|res|gra|mul» | head -1
Если уровень запуска не graphical.target вы можете это исправить выполнив команду:
sudo systemd isolate graphical.target
После этого уровень запуска будет изменён на графический и графическая оболочка запуститься автоматически. Если вам нужно запустить менеджер входа вручную выполните такую команду:
sudo systemctl start display-manager
Эта команда запустит менеджер входа в систему, после этого вы сможете ввести логин и пароль, а затем запуститься графическая оболочка.
С более простыми графическими оболочками, вроде Openbox, Fluxbox, i3wm и даже XFCE может сработать ещё один метод, очень популярный ранее. Это команда startx. Однако чтобы она сработала в файле
/.xinitrc надо прописать оболочку, которую вы хотите запустить. Например:
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
[ -x «$f» ] && . «$f»
done
unset f
fi
feh —bg-fill
/Загрузки/52453-sklon_holm_cerkvushka_sneg.jpg &
lxpanel &
exec openbox-session
Блок if загружает все конфигурационные файлы из каталога /etc/X11/xinit*, сторчка, начинающаяся с feh добавляет фон рабочего стола, следующая — нижнюю панель, а последняя запускает сам openbox. Теперь запуск графической оболочки Ubuntu из консоли выполняется командой:
Или если, на первом экране уже что-то запущено, можно использовать любой другой доступный, например, второй:
Обратите внимание, что оболочку можно запустить только из консоли TTY, из терминала в графическом окружении это не сработает. Как видите, всё просто. Ваша оболочка запуститься в том же терминале, в котором вы выполнили startx.
Источник
Смена менеджера дисплеев (DM) по-умолчанию (KDM,GDM и т.п)
Дата добавления: 08 августа 2010
KDM или GDM?
KDM (KDE Display Manager) и GDM (GNOME Display Manager) являются самыми популярными менеджерами дисплеев. KDM рекомендуется использовать если вы используете среду рабочего стола KDE, а GDM если используете GNOME, xfce, lxde и т.д. Однако есть и другие DM.
Функциональность обоих менеджеров примерно одинакова.
Частые причины для смены DM
Если вы установили и используете GNOME, а в качестве менеджера DE выступает KDM (такое бывает при наличии KDE и GNOME в одной системе). Так-же вы возможно хотите вернуться на прошлую DE, но менеджера дисплеев все равно используется от старой (предположим, не понравившийся) DE.
Мне, например, пришлось изменить менеджер дисплеев чтобы зайти в Ubiquty т.к из KDM почему-то запускался стандартный GNOME.
Смена DM для основанном на DEB дистрибутивов
Если у вас «DEB-BASED» дистрибутив (Debian, Ubuntu, Mint, Gnewsense и т.д), то можете воспользоваться командой.
От суперпользователя!
dpkg-reconfigure gdm
После ввода команды появится меню выбора DM по-умолчанию:
Редактируем конфигурационный файл (для всех дистрибутивов)
Во многих дистрибутивах (точно перечислить не могу, но у меня в Debian именно в этом файле) нужно прописать путь до нужного DM в конфигурационном файле X11 под названием default-display-manager. Давайте его изменим.
От суперпользователя!
nano -w /etc/X11/default-display-manager
И в прописываем (или редактируем) путь до нужного DM: /usr/sbin/gdm для GDM, /usr/sbin/kdm для KDM или другой путь для другой DM.
Сохраняем файл (Ctrl+O) и все готово.
В дистрибутивах OpenSuse, ASP (и возможно в других) необходимо отредактировать другой конфигурационный файл.
От суперпользователя!
nano -w /etc/sysconfig/desktop
И прописываем (или редактируем) строчку: DISPLAYMANAGER=KDM для KDM или DISPLAYMANAGER=GDM для GDM.
Сохраняем файл (Ctrl+O) и все готово.
Для gentoo (и опять же возможно и других) нужно отредактировать другой конфигурационный файл.
От суперпользователя!
nano -w /etc/conf.d/xdm
Создаем строку (или находим и редактируем): DISPLAYMANAGER=»kdm» для KDM или DISPLAYMANAGER=»gdm» для GDM.
Сохраняем файл (Ctrl+O) и все готово.
У меня другой дистрибутив. Как узнать какой файл редактировать?
Выполните в терминале команду (на самом деле цепочка команд, но запускается как одна команда):
И смотрим какая команда выдает результат (выводиться содержимое файла с текущими параметрами). Собственно тот конфигурационный файл вам и нужно будет редактировать по инструкциям выше.
* Вместо редактора nano -w можно использовать любой другой, например kate или gedit.
Запуск нужного DM однократно
Для этого нужно просто запустить нужную службу ( от суперпользователя ):
/etc/init.d/kdm start
— Для KDM.
/etc/init.d/gdm start
— Для GDM.
Возможно понадобится остановка действующей службы, например надо буде выполнить /etc/init.d/kdm stop перед запуском GDM.
$ sudo update-alternatives —config x-session-manager
Автор: Subsanek, дата: 08 августа 2010 , время: 22:38:41 (MSK).
>А где тут написано про оконные менеджеры?
В описании было, уже исправил.
Автор: Анон, дата: 17 октября 2010 , время: 23:30:21 (MSK).
[Некропост]
И как я это пропустил?
>От суперпользователя!
>dpkg-reconfigure gdm
Охлол. А нет у мя гдм. Чо теперь?
>Во многих дистрибутивах (точно перечислить не могу, но у меня в Debian именно в этом файле)
Проверить лично / погуглить / почитать ман / посмотреть политику дистра(ов) / посмотреть стандарт религия не позволяет?
>И в прописываем (или редактируем
Чочо мы делаем?
>/etc/init.d/kdm start
1. дистрибутиво-зависимо
2. аффтар-дебианщег не знает про service?
На сладенькое. Объяснил бы простым смертным зачем nano непременно с опцией -w
Автор: Анон, дата: 18 октября 2010 , время: 13:37:02 (MSK).
В каком месте я не прав?
Я знаю, что делает опция -w у нано, но зачем она тут так яростна рекомендована без описания действия?
М. Поверхностное гугление показывает что таки это не дистрибутиво зависимо был не прав. Однако service гибче / лучше / в конце концов тупо печатать меньше. И сервис есть везде, где есть инитд (как минимум в красношапке)
Ошибки автора в тексте поста считаются троллингом комментатора? О_о
Первое замечание также является обоснованным ибо и ты и ксенос не раз на просторах этого бложика упоминали, что тут статьи для пользователей разного уровня.
Источник
Display manager
A display manager (DM), sometimes known as login manager, presents the user with a graphical login screen to start a GUI session, either X or Wayland.
A display manager is not strictly necessary, X can be started from a shell in a VT, but one can provide extra or useful funtionality.
Contents
Available software
Alphabetical list of some display managers in the official Gentoo tree:
Name | Package | Description |
---|---|---|
CDM (Console Display Manager) | x11-misc/cdm | Minimalistic display manager. |
GDM (GNOME Display Manager) | gnome-base/gdm | DM often used with GNOME, for Wayland or X. |
GreetD | gui-apps/gtkgreet gui-apps/tuigreet | System login and authentication daemon designed for Wayland. |
LightDM (Lightweight Display Manager) | x11-misc/lightdm | Cross-desktop display manager aiming to be the standard display manager for X. |
LXDM (LXDE Display Manager) | lxde-base/lxdm | LXDE Display Manager. |
Qingy (Qingy Is Not GettY) | sys-apps/qingy | A DirectFB getty replacement. |
SDDM (Simple Desktop Display Manager) | x11-misc/sddm | Modern display manager for X11 and Wayland aiming to be fast, simple and beautiful. |
SLiM (Simple Login Manager) | x11-misc/slim | Desktop-independent graphical display manager, fast with only a few dependencies. |
WDM (WINGs Display Manager) | x11-misc/wdm | Modification of XDM. |
XDM (X Display Manager) | x11-apps/xdm | X.Org’s DM. |
Configuration
In all major Linux operating systems, display managers are started automatically on boot. In order for this to happen automatically a script must be added to the init system’s appropriate runlevel. Examples for OpenRC and systemd are provided below.
OpenRC
Under most circumstances, the OpenRC init system (Gentoo’s default init system) will be used to start the display manager. The following examples will set SDDM as the display manager, adjust as necessary for other display managers.
Historically, the xdm init script handled the starting of the display manager, which has now been deprecated in favor of the display-manager init script from gui-libs/display-manager-init, jump to next section for a sytem still using xdm.
If gui-libs/display-manager-init is not present, emerge it with:
The configuration file should be modified to use SDDM:
To start the chosen display manager on boot, add the display-manager to the system’s default runlevel:
To start the display-manager immediately, run:
Historical use of the deprecated xdm init script
To start the chosen display manager on boot, add the xdm to the system’s default runlevel:
To start SDDM immediately, run:
systemd
If using systemd as the init system, first locate the chosen .service file.
Источник
How to Fix – Failed to Start Light Display Manager Error
3 min
This post is about guiding you on how to fix the scary error Failed to Start Light Display Manager Error in Linux systems.
It’s scary. I know. When you expect something to come up on the screen and suddenly face this particular error. It is horrifying because you are lost in a terminal and not sure what to do.
How to Fix – Failed to Start Light Display Manager Error
Why this error?
This error comes from the lightdm package which is a popular Linux system display manager. It is likely caused by any action that you may have taken before this error. More likely it is caused by incorrect package updates or removing certain lightdm related packages or incorrect configurations of lightdm.
The display manager enables the login screen by communicating with X11 server and by failing to do so, the system stalls at the prompt and sometimes with a black screen.
How to Fix
As it may have caused by multiple failure points, hence the solution may differ. Here I am outlining some of the fixes and they may help you to troubleshoot.
When you are stuck at the above screen, press CTRL+ALT+F1 to reach the console mode.
Then log in using any admin id and password. You can log in using your usual user id and when required you can provide the sudo password as well.
First check whether anything wrong with the lightdm systemd service.
If it gives you status GREEN then something else is broken.
Next, try to run the following command to start lightdm as test mode with debugging switch. This would try to launch lightdm and show you any errors, warnings.
For this example, as you can see below – it successfully loads everything but in the end, it is not able to find the greeter. The greeter is a graphical login window where you enter your user id and password. And for this case, somehow the greeter is messed up.
So, the obvious corrective step is to reinstall the greeter and enable the lightdm systemd service. You can use your distribution’s package manager to install the greeter.
For this guide, I am using Arch Linux, hence I ran the following to re-install the lightdm-gtk-greeter –
Then enable the systemd service for lightdm, just in case.
And then reboot –
If all goes well, this error should go away and you should get your login screen back.
Other Solutions
If above steps did not work, you might want to go over the following troubleshooting options as well. These may work.
- Xorg server is corrupted or not installed. Hence lightdm is not able to communicate with xorg. Reinstalling xorg package would help. You can reinstall in Arch Linux just using pacman -S xorg .
- Sometimes the lightdm-gtk-greeter-settings package misconfiguration causes this error. So reinstalling lightdm-gtk-greeter-settings can help as well.
- It always poses no harm to check whether you have the lightdm service enabled via systemd.
- In the end, check the log of debug mode command carefully. You would find the possible cause of this problem.
- Verify the lightdm log file and xorg log file in the following path for any errors or warnings. The lightdm log file: /var/log/lightdm/lightdm.lo g . And the xorg log file /var/log/lightdm/x-0.org .
- If you have an advanced system that boots in superfast mode, then lightdm and graphics drivers may run into race conditions. The lightdm service may start before Kernel loads the graphics drivers. If this is the case, you may try to add the following lines in the /etc/lightdm/lightdm.conf file under [lightDM] section.
Historically, Nvidia driver updates may cause issues with xorg and lightdm as well. As lightdm depends on xorg to work properly, it might be needed to fix xorg also for errors. The following commands you may use to reconfigure xorg after purging Nvidia driver.
Closing Notes
This error more frequent in Arch Linux and its derivatives such as Manjaro, Arco Linux, etc. I hope the above troubleshooting steps help you to get back to your login screen and your system. Let me know in the comment box below if it helps.
We bring the latest tech, software news and stuff that matters. Stay in touch via Telegram, Twitter, YouTube, and Facebook and never miss an update!
Источник