lightdm.service를 다시 활성화하는 방법은 무엇입니까?

lightdm.service를 다시 활성화하는 방법은 무엇입니까?

과거 어느 시점에서는 다음을 lightdm통해 서비스를 비활성화해야 했습니다.

systemctl disable lightdm.service

또는 Cinnamon 데스크탑을 사용하는 데비안에서도 비슷한 것입니다.

불행히도 지금은 필요하지만 다음을 실행하십시오.

systemctl start lightdm.service

컴퓨터가 부팅될 때마다 기분이 좋지는 않아서...

서비스 를 다시 활성화하려면 어떻게 해야 합니까 lightdm? 방금 실행했기 때문에 :

systemctl enable lightdm.service

다음 오류가 발생합니다.

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:
• A unit may be statically enabled by being symlinked from another unit's
  .wants/ or .requires/ directory.
• A unit's purpose may be to act as a helper for some other unit which has
  a requirement dependency on it.
• A unit may be started when needed via activation (socket, path, timer,
  D-Bus, udev, scripted systemctl call, ...).
• In case of template units, the unit is meant to be enabled with some
  instance name specified.

이전에도 시도했습니다.

dpkg-reconfigure lightdm

소용이 없습니다.

답변1

lightdm.service이 장치를 활성화해도 다음 메시지에 표시된 이유로 인해 아무 작업도 수행되지 않습니다.서비스 단위메시지가 없습니다 [Install]. 이는 사람들이 이 서비스를 활성화하는 데 사용해서는 안 되기 때문입니다 systemctl enable. 디스플레이 관리자에는 고유한 특수 활성화/비활성화 메커니즘이 있습니다.

이 서비스는 가능한 대안 중 하나 display-manager.service이며어떤 디스플레이 관리자를 실행하든 상관 없습니다.. display-manager.service임의의 것을 가리키도록 고안된 심볼릭 링크입니다.실제디스플레이 관리자 서비스 단위 파일은 systemd 사용자 매뉴얼에 설명되어 있습니다. 이는 Wants장치에 고정되어 고정되어 있으며, graphical.target서비스 그래프의 시작 지점에서 시작되면 선택한 디스플레이 관리자가 해당 지점을 통해 시작된다는 아이디어입니다.graphical.target

이러한 상징적 연결은 물론 직원을 채용할 수 있는 이상적인 기회입니다.데비안 "대체" 시스템. 디스플레이 관리자 간 전환은 실행 중인 모든 패키지에 대해 간단하고 일관됩니다.

대안 업데이트 --config display-manager.service

이것은 실제로OpenSUSE에서 수행되는 방법, 시스템 단위를 전환하지는 않지만 :

대안 업데이트 --config 기본 디스플레이 관리자

그래서틀림없이"대체" 시스템은 다음과 같습니다.아니요패키지 관리자 스크립트의 사용자 정의 코드로 관리되는 대신 가능성 간 전환에 사용됩니다.lightdm,gdm3,xdm/etc/X11/default-display-manager, 특수 파일을 읽고 모든 패키지에서 정확히 동일한 작업을 수행하지 않는 기타 패키지 .

이러한 다양한 사용자 정의 셸 스크립트 중 하나 를 실행한 후에 dpkg-reconfigure는 부트로더의 시작 지점 graphical.targetmulti-user.target.systemctl set-default

답변2

귀하의 서비스는 다음과 같습니다가면을 쓴.


차단을 해제하려면 다음을 실행하세요.

systemctl unmask lightdm.service

그런 다음 다음을 실행하십시오.

systemctl daemon-reload

답변3

Lightdm은 /etc/rc*.d/의 심볼릭 링크를 통해 sysV init 스타일 시작 스크립트(debian 8 - 11)로 관리됩니다.

(systemd는 systemd-sysv-generator를 통해 호출합니다)

update-rc.d lightdm defaults

답변4

임시로 설치해 보세요대체 디스플레이 관리자좋다SDDM그런 다음lightdm으로 다시 전환. Xubuntu 22.04.3 LTS에서 테스트되었습니다.

sudo apt install sddm # Select sddm
sudo dpkg-reconfigure sddm # Switch back to lightdm
sudo reboot
sudo systemctl status lightdm.service # After reboot, should be active

기타 유용한 디버깅 명령:

ls -rtla /var/log/lightdm # see logs files
less +G /var/log/lightdm/lightdm.log # see from the end
lightdm --test-mode --debug # test

관련 정보