Score:0

Kubuntu/Plasma: How to force immediate mount of removable media before login or instead, refresh desktop shortcuts after delayed mounting

zw flag

I initially installed Ubuntu, then installed kubuntu-desktop and switched to Plasma. However, initially, my removable drives no longer auto-mounted on (automatic) login. So I went to settings and configured the drive to automount on login. After restarts however, there is something like a full minute where the drive is unmountable. I get "you are not authorized to mount this device" from the removable media pop-up. After a minute it goes away, and I can manually mount the drive from dolphin.

Because of this, since I have various desktop shortcuts (some pinned to taskbar), that refer to scripts on the removable drive (or refer to local links that themselves refer to scripts that reside on the removable drive), many shortcuts on the taskbar are thus missing. After mounting, I can hover over them and see their names, but not their icons. If I log out and log in, it works normally.

So I created a script that touches a temporary file in the shortcuts folder and then deletes it. This indirectly triggers both Gnome & Plasma to refresh these icons, and it works. But in Plasma I have to wait random delays until it takes effect and sometimes I have to run the script twice. Ubuntu/Gnome had a nice command one could run to immediately refresh/update these icons. I forgot its name. Is there something similar for KDE?

Btw I had the same problem on Gnome, except that Gnome correctly and directly auto-mounts the removable media on login. I don't have to wait, then manually mount. Yet still probably because of timing issues, the shortcuts still didn't all load properly until I updated the desktop.

Also, does anyone know why the drive is mounting so late and how to make this happen before login or before loading the desktop?

vanadium avatar
cn flag
Either plug the drives in after you logged in, so the drives get automounted correctly for your user, or leave them plugged in, but then have them mounted through fstab.
moe fear avatar
zw flag
so why isn't plasma doing it automatically?
vanadium avatar
cn flag
As you see, Gnome does it differently - so that is a question for the developpers of Plasma.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.