1

I have changed my cursor theme system-wide in this way:

/etc/rc.local:

#!/bin/bash -e
rm -f /tmp/HOME
while [[ ! -f /tmp/HOME ]]
do
    sleep 1
done
HOME=$(< /tmp/HOME)
if [[ -f $HOME/.icons/default/index.theme ]]; then
    ln -sf $HOME/.icons/default/index.theme /etc/alternatives/x-cursor-theme
fi
# apply changes now.
exit 0

/etc/profile.d/write_home_dir_in_tmp_folder.sh:

echo ~ > /tmp/HOME

This way after reboot, if x-cursor-theme still pointed to the old path, once pointed to the user path, the changes are not applied and are only applied from the second reboot onwards. It would take another line in the rc.local file that "apply changes now.". I've searched the internet but can't find an answer. Can someone help me?

P.S.

pstree | grep session returns an empty string.

wmctrl -m returns:

Name: Mutter (Muffin)
Class: N/A
PID: N/A
Window manager's "showing the desktop" mode: N/A

echo $DESKTOP_SESSION returns:

cinnamon

echo $GDMSESSION returns:

cinnamon

echo $XDG_CURRENT_DESKTOP returns:

X-Cinnamon
Mario Palumbo
  • 277
  • 2
  • 8
  • 36
  • More input is required at this point. It depends on the session which is running. You could improve your question with

    pstree | grep session

    wmctrl -m

    echo $DESKTOP_SESSION

    echo $GDMSESSION

    echo $XDG_CURRENT_DESKTOP

    – lemrm Dec 19 '21 at 17:40
  • Ok, I have update the question. – Mario Palumbo Dec 19 '21 at 23:12
  • Your Question seems to be related to this a bit outdated Q/A. Maybe you can also think about gsetting but you could try first
    `$ pkill -HUP -f "cinnamon --replace"`
    
    

    -- Or -- you could try something like this from here

    gsettings set org.gnome.desktop.interface cursor-theme "$CURSOR" && sudo update-alternatives --set x-cursor-theme <the path you like>/$CURSOR/cursor.theme

    – lemrm Dec 20 '21 at 10:39
  • if that answers the question, i can promote the comment to an answer – lemrm Dec 20 '21 at 10:42
  • Restarting cinnamon doesn't restart the mouse pointer as well, so it doesn't fix the problem. Before asking this question I searched far and wide. – Mario Palumbo Dec 20 '21 at 17:23
  • @MarioPalumbo AFAIK cursor theme are used by X server not by session manager or application. Probably you need to restart Xorg server and to do so, restart the running DM (Display Manager). As in this post: https://askubuntu.com/q/1220/26246 . DM in current Desktop Environments is handling login too, so it will kill running user applications and require login again. – user.dz Dec 26 '21 at 09:38

0 Answers0