![GDM/GUI 이전에 모든 로컬 드라이브(네트워크 장치 없음)를 강제로 마운트하도록 systemd를 어떻게 구성합니까?](https://linux55.com/image/189823/GDM%2FGUI%20%EC%9D%B4%EC%A0%84%EC%97%90%20%EB%AA%A8%EB%93%A0%20%EB%A1%9C%EC%BB%AC%20%EB%93%9C%EB%9D%BC%EC%9D%B4%EB%B8%8C(%EB%84%A4%ED%8A%B8%EC%9B%8C%ED%81%AC%20%EC%9E%A5%EC%B9%98%20%EC%97%86%EC%9D%8C)%EB%A5%BC%20%EA%B0%95%EC%A0%9C%EB%A1%9C%20%EB%A7%88%EC%9A%B4%ED%8A%B8%ED%95%98%EB%8F%84%EB%A1%9D%20systemd%EB%A5%BC%20%EC%96%B4%EB%96%BB%EA%B2%8C%20%EA%B5%AC%EC%84%B1%ED%95%A9%EB%8B%88%EA%B9%8C%3F.png)
UbuntuMATE 20.04 환경에 대한 디스크 설치 및 그래픽 디스플레이 관리자와 관련된 장치 우선 순위/필수 구성 요소 순서를 결정하려고 합니다.
사용자 데스크탑에 컨텐츠를 표시하기 위한 정보 소스로 "/home/user" 디렉토리를 지정하여 루트가 아닌 파티션에 액세스할 수 없는 문제를 해결해 보십시오. 그러면 시스템이 "/home/user"일 때 "자동 복구"됩니다. 사용자/데스크톱"은심볼릭 링크다른 파티션 "/DB001_F2/home/user.Desktop"을 가리킵니다.
지금까지...
# systemctl get-default
graphical.target
#
그리고
# systemctl list-dependencies graphical.target
...(snip)...
● │ │ ├─local-fs.target
● │ │ │ ├─-.mount
● │ │ │ ├─DB001_F2.mount
● │ │ │ ├─DB001_F3.mount
● │ │ │ ├─DB001_F4.mount
...(snip)...
#
구성 파일을 조정하는 방법을 알아야 합니다.localfs.대상(*.conf파일 또는 *.고 싶어요디렉토리 항목???) 또는 사용자 정의 파일을 만들어야 하는데 무엇이 필요한지 모르는 경우입니다.
내 환경은우분투 컴패니언 20.04:
데스크톱: MATE 1.24.0
릴리스: Ubuntu 20.04.2 LTS(Focal Fossa)
커널: 5.4.0-67-generic x86_64
PS 완전하고 간소화된 시스템 대상 트리는 다음과 같습니다.
graphical.target
● ├─accounts-daemon.service
● ├─apport.service
● ├─cpufrequtils.service
● ├─e2scrub_reap.service
● ├─grub-common.service
● ├─hddtemp.service
● ├─lightdm.service
● ├─loadcpufreq.service
● ├─systemd-update-utmp-runlevel.service
● ├─udisks2.service
● └─multi-user.target
● ├─...(snip)...
● └─basic.target
● ├─...(snip)...
● └─sysinit.target
● ├─...(snip)...
● └─local-fs.target
● ├─-.mount
● ├─DB001_F2.mount <<< Need to ensure this is fully mounted and accessible
● ├─...(snip)...
● ├─systemd-fsck-root.service
● └─systemd-remount-fs.service
(3월 27일 추가)현재 데스크탑 모습은 다음과 같습니다.
"라는 내용을 보여주고 있습니다.${집}"디렉터리 그대로"${HOME}/데스크톱".
(3월 28일 추가)이것".xsession-오류"내가 생각할 수 있는 유일한 것은 무슨 일이 일어나고 있는지 암시하는 유일한 문서입니다. 마지막으로 다음과 같이 말합니다."$HOME" 형식 오류. 시작부터 오류가 발생할 때까지의 관련 부분은 다음과 같습니다.
# more .xsession-errors
dbus-update-activation-environment: setting DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
dbus-update-activation-environment: setting DISPLAY=:0
dbus-update-activation-environment: setting XAUTHORITY=/home/ericthered/.Xauthority
dbus-update-activation-environment: setting GTK_MODULES=appmenu-gtk-module:gail:atk-bridge:canberra-gtk-module
dbus-update-activation-environment: setting QT_ACCESSIBILITY=1
dbus-update-activation-environment: setting SHELL=/bin/bash
dbus-update-activation-environment: setting QT_ACCESSIBILITY=1
dbus-update-activation-environment: setting XDG_CONFIG_DIRS=/etc/xdg/xdg-mate:/etc/xdg
dbus-update-activation-environment: setting XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
dbus-update-activation-environment: setting LANGUAGE=en_CA:en
dbus-update-activation-environment: setting DESKTOP_SESSION=mate
dbus-update-activation-environment: setting GTK_MODULES=appmenu-gtk-module:gail:atk-bridge:canberra-gtk-module
dbus-update-activation-environment: setting PWD=/home/ericthered
dbus-update-activation-environment: setting XDG_SESSION_DESKTOP=mate
dbus-update-activation-environment: setting LOGNAME=ericthered
dbus-update-activation-environment: setting QT_QPA_PLATFORMTHEME=gtk2
dbus-update-activation-environment: setting XDG_SESSION_TYPE=x11
dbus-update-activation-environment: setting GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1
dbus-update-activation-environment: setting XAUTHORITY=/home/ericthered/.Xauthority
dbus-update-activation-environment: setting XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/ericthered
dbus-update-activation-environment: setting GDM_LANG=en_CA
dbus-update-activation-environment: setting HOME=/home/ericthered
dbus-update-activation-environment: setting IM_CONFIG_PHASE=1
dbus-update-activation-environment: setting LANG=en_CA.UTF-8
dbus-update-activation-environment: setting XDG_CURRENT_DESKTOP=MATE
dbus-update-activation-environment: setting XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
dbus-update-activation-environment: setting XDG_SESSION_CLASS=user
dbus-update-activation-environment: setting GTK_OVERLAY_SCROLLING=0
dbus-update-activation-environment: setting USER=ericthered
dbus-update-activation-environment: setting DISPLAY=:0
dbus-update-activation-environment: setting SHLVL=1
dbus-update-activation-environment: setting UBUNTU_MENUPROXY=1
dbus-update-activation-environment: setting XDG_RUNTIME_DIR=/run/user/1000
dbus-update-activation-environment: setting COMPIZ_CONFIG_PROFILE=mate
dbus-update-activation-environment: setting XDG_DATA_DIRS=/usr/share/mate:/usr/local/share:/usr/share:/var/lib/snapd/desktop
dbus-update-activation-environment: setting PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
dbus-update-activation-environment: setting GDMSESSION=mate
dbus-update-activation-environment: setting DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
dbus-update-activation-environment: setting _=/usr/bin/dbus-update-activation-environment
mate-session[1437]: WARNING: Unable to find provider '' of required component 'dock'
Window manager warning: Log level 128: unsetenv() is not thread-safe and should not be used after threads are created
Window manager warning: Log level 128: Name com.canonical.AppMenu.Registrar does not exist on the session bus
mate-session[1437]: WARNING: Could not launch application 'indicator-datetime.desktop': Unable to start application: Failed to execute child process “
/usr/lib/x86_64-linux-gnu/indicator-datetime/indicator-datetime-service” (No such file or directory)
cannot create user data directory: /home/ericthered/snap/ubuntu-mate-welcome/611: Not a directory
(caja:1733): Gtk-WARNING **: 15:31:10.074: Failed to register client: GDBus.Error:org.gnome.SessionManager.AlreadyRegistered: Unable to register clien
t
(process:1962): indicator-sound-WARNING **: 15:31:10.146: volume-control-pulse.vala:744: Unable to connect to dbus server at 'unix:path=/run/user/1000
/pulse/dbus-socket': Could not connect: No such file or directory
blueman-applet 15.31.12 WARNING PluginManager:147 __load_plugin: Not loading DhcpClient because its conflict has higher priority
blueman-applet 15.31.12 WARNING PluginManager:147 __load_plugin: Not loading PPPSupport because its conflict has higher priority
(mate-settings-daemon:1701): Gtk-WARNING **: 15:31:12.508: gtk_widget_size_allocate(): attempt to allocate widget with width -1 and height 28
** (mate-screensaver:1754): WARNING **: 15:31:13.992: Screensaver already running in this session
INFO:root:The HUD is disabled via org.mate.hud in gsettings.
RuntimeError: object at 0x7fedf7823440 of type RenameMenu is not initialized
RuntimeError: object at 0x7fedf7d31d00 of type FolderColorMenu is not initialized
blueman-applet 15.31.17 WARNING DiscvManager:109 update_menuitems: warning: Adapter is None
JavaScript error: resource:///modules/AddrBookCard.jsm, line 197: NS_ERROR_NOT_AVAILABLE: PreferDisplayName: undefined - not a boolean
Window manager warning: Log level 16: Visible region is null
Window manager warning: Log level 16: Visible region is null
Window manager warning: Log level 16: Visible region is null
Traceback (most recent call last):
File "/usr/share/caja-python/extensions/dejadup.py", line 156, in get_file_items
include_paths = self.dejadup.get_dejadup_paths('include-list')
File "/usr/share/caja-python/extensions/dejadup.py", line 70, in get_dejadup_paths
paths = ast.literal_eval([stdout][0]) # Convert shell dump to list
File "/usr/lib/python3.8/ast.py", line 99, in literal_eval
return _convert(node_or_string)
File "/usr/lib/python3.8/ast.py", line 98, in _convert
return _convert_signed_num(node)
File "/usr/lib/python3.8/ast.py", line 75, in _convert_signed_num
return _convert_num(node)
File "/usr/lib/python3.8/ast.py", line 66, in _convert_num
_raise_malformed_node(node)
File "/usr/lib/python3.8/ast.py", line 63, in _raise_malformed_node
raise ValueError(f'malformed node or string: {node!r}')
ValueError: malformed node or string: b"['$HOME']\n"
...(snip)... (multiple repeats of the "Traceback" report)
이를 시정 조치로 변환하는 방법을 모르겠습니다.
또한 "를 지정하는 방법이 있습니까?다중 사용자 대상"다른 목표를 시도하기 전에 첫 번째 목표를 달성해야 합니다"그래픽 타겟”, 아니면 내가 인식하지 못하는 종속성이 있어 불가능한 전제 조건이 되나요?
답변1
다음을 사용하여 Cristian Rodriguez의 댓글
systemctl edit lightdm.service
...을 더한
[Unit]
RequiresMountsFor=/DB001_F2
사용자 정의 로컬 전제조건lightdm 서비스장치가 솔루션을 제공할 수 있음같은 실수를 반복하지 않도록 하세요문제가 발생했습니다. 그 점에 대해 크리스천에게 감사드립니다.
이것추가 단계${HOME}/Desktop을 올바르게 표시하는 것을 포함하여 GUI 환경이 다양한 구성 요소의 올바른 위치를 가리키도록 하려면 다음 지침을 따르십시오.https://forums.linuxmint.com/viewtopic.php?t=222560 이는 파일 편집에 대한 지침을 제공합니다."${HOME}/.config/user-dirs.dirs" 문자열을 교체하여
XDG_DESKTOP_DIR="$HOME/"
통과
XDG_DESKTOP_DIR="$HOME/Desktop" .
수정하고 다른 모든 응용 프로그램을 닫은 후 명령을 실행했습니다.
systemctl restart lightdm.service
이는 기본적으로 로그아웃한 다음 로그인하는 것과 동일한 작업을 수행합니다.
그 후 세션 관리자는 올바른 위치를 사용하여 예상대로 ${HOME}/Desktop 콘텐츠를 표시합니다.
답변2
lightdm.service에는 RequiresMountsFor=/DB001_F2가 필요합니다.