1

I am trying to identify the unit precedence/pre-requisite sequencing related to disk mounting and Graphical Display Manager for the UbuntuMATE 20.04 environment.

Trying to resolve issue of non-access to non-root partition, causing system "auto-recovering" by designating "/home/user" directory as the info source for what is displayed on the user desktop, when "/home/user/Desktop" is a symbolic link pointing to a different partition, "/DB001_F2/home/user.Desktop".

So far ...

# systemctl get-default
graphical.target
#

and

# systemctl list-dependencies graphical.target
...(snip)...
●   │ │ ├─local-fs.target
●   │ │ │ ├─-.mount
●   │ │ │ ├─DB001_F2.mount
●   │ │ │ ├─DB001_F3.mount
●   │ │ │ ├─DB001_F4.mount
...(snip)...
#

I need to know how to tweak the config file for local-fs.target (*.conf file or *.wants directory entry ???), or if I need to create a custom file, for which I have no clue as to the content required.

My environment is UbuntuMATE 20.04:
Desktop: MATE 1.24.0
Distro: Ubuntu 20.04.2 LTS (Focal Fossa)
Kernel: 5.4.0-67-generic x86_64

P.S. Full pared-down systemd tree of targets is as follows:

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

(added March 27) The appearance of the desktop is currently as follows:

enter image description here

which is displaying the contents of the "${HOME}" directory as if it were "${HOME}/Desktop" .

(added March 28) The ".xsession-errors" file is the only thing I can think of for a hint of what is happening. At the end, it says "$HOME" is malformed. Here is the relevant segment from start until error is encountered:

# 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)

I don't know how to translate that into a corrective action.

Also, is there any way to specify that "multi-user.target" must be reached as a first target before attempting other targets for "graphical.target", or is there a dependency of which I am not aware of which would make that an impossible precondition?

2 Answers 2

1

The comment by Cristian Rodriguez, using

systemctl edit lightdm.service

to add

[Unit]
RequiresMountsFor=/DB001_F2

as a custom local pre-condition for the lightdm.service unit likely provides the solution to preventing a repeat of the problem encountered. For that, thank you Cristian.

The additional step to get the GUI environment to point to the correct location(s) for various components, including having ${HOME}/Desktop correctly displayed, is done per the guidance found at https://forums.linuxmint.com/viewtopic.php?t=222560 which gave the direction to edit the file "${HOME}/.config/user-dirs.dirs" by replacing the string

XDG_DESKTOP_DIR="$HOME/"

by

XDG_DESKTOP_DIR="$HOME/Desktop" .

Having made that correction, and after closing all my other applications, I ran the command

systemctl restart lightdm.service

which essentially did the same thing as doing a logout followed by a login.

Following that, the session manager was using the correct location to display the ${HOME}/Desktop contents as expected.

0

lightdm.service needs to RequiresMountsFor=/DB001_F2

3
  • When I do a search for lightdm references, the only thing I find is the symbolic link /etc/systemd/system/display-manager.service -> /lib/systemd/system/lightdm.service . Are you saying I should modify the "/lib" file, or should I be creating a "lightdm.service.conf" file ? If the the first, where should I place it ? If the latter, what should that file contain? Mar 25, 2021 at 20:17
  • One never modiied unti files in /lib.. you have to systemctl edit lightdm.service add [Unit] RequiresMountsFor=/DB001_F2 save and exit . reboot the system or reload systemd with systemctl daemon-reload Mar 26, 2021 at 17:34
  • So I've added that as directed. I rebooted the system. When I log into the session, the system is still behaving as if the ${HOME}/Desktop is not available and is presenting the ${HOME} directory contents on the GUI desktop. Is there a event memory flag which needs to be removed or purged, so that the system knows that it is now safe to use the proper ${HOME}/Desktop directory and to behave on that basis? Also, if I create a file "/etc/systemd/system/lightdm.service.d/override.conf.${HOSTNAME}", will that confuse systemd ? I always duplicate modified system files with HOSTNAME as suffix. Mar 28, 2021 at 0:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .