5

I have upgraded my Kubuntu from 14.10 to 15.04 via Package-Manager.
Now, Plasma 5 is used.
But with Plasma 5, I am missing some functions: e.g. Removable Devices in System-Settings. (I used this to automatically mount some of my hard drives.)

Does anyone know where i can find this option in Plasma 5?

EDIT:
I tried suggestion of user26687 kcmshell4 device_automounter_kcm.
This brings up the settings window, but all changes made in this windows does not have any effect.
My hard drive (500GB HD) is not auto-mounted after login (like with 14.10/KDE 4) enter image description here

EDIT 2:
I tried also the second suggestion from user26687, starting the service via: kcmshell4 kcmkded.
Indeed, the service was not running!
After starting the service via button start, it mounts directly my devices.

But after a system reboot, the service is not starting automatically.

Ben
  • 752

2 Answers2

7

Short answer

  1. Changing the /usr/share/kde4/services/kded/device_automounter.desktop line from

    > X-KDE-Kded-phase=1
    

    to:

    > X-KDE-Kded-phase=0
    
  2. Starting 'Removable Device Automounter' from the Service Manager using

    kcmshell4 kcmkded
    
  3. Picking the right options from the KDE 'Removable Devices module usinc

    kcmshell4 device_automounter_kcm
    

Explanation

KDE System Settings (5)

The Kubuntu 15.04 is using KDE System Settings that can show KDE Control Modules (kcm) for the KF5/Plasma5. The removable devices kcm is from the KDE4. You could launch the KDE Control Modules from the command line, i.e. the following command will launch the module:

kcmshell4 device_automounter_kcm

KDE Removable device windows

Daemon must be running

The 'Removable Device Automounter' Service, another KDE(4) control module, needs to be running. Check with:

$ kcmshell4 --list | grep kcmkded
kcmkded                    - KDE Services Configuration

As default the Removable Device Automounter is not running by default, open the windows and start the serice:

kcmshell4 kcmkded

KDE service manager windows

Configure KDE Daemon start-up

  1. the KDE(4) Daemon (kded) desktop files are in /usr/share/kde4/services/kded/ ;
  2. the device_automounter.desktop has line

    X-KDE-Kded-phase=1

From HOWTO Make KDED Modules:

The exact way autoloading works is controlled by X-KDE-Kded-phase=, which may be 0, 1 or 2 (the default). Kded phase 0 means the module is always loaded by kded, even outside of KDE session. It should used only by kded modules which must be always running. Kded phase 1 modules are loaded right after kded startup, but only during KDE startup, i.e. it is for modules that are always needed by the KDE session. Phase 2 modules will be loaded later.

Maybe the KF5 KDE is not detected as proper KDE?

We need to change the device_automounter.desktop line to:

> X-KDE-Kded-phase=0

editing device_automounter.desktop

The Removable Device Automounter service will be running after a reboot.

Edit

solid-device-automounter Port to KF5: https://git.reviewboard.kde.org/r/124730/

Review Request #124730 - Created Aug. 13, 2015 and submitted 8 months ago

Is part of the Plasma desktop 5.5 or later.

user26687
  • 15,174
0

If normally a password is required to mount your drive via gui, for example using dolphin, automount may not work, even if service is running and settings are correct. The first thing had to be tried - password check on mount disable.

This solution worked for me without first step, but I have created a policy file that disables password check when mounting via udisks2.

root@pc:/# cat /etc/polkit-1/localauthority/50-local.d/10-udisks2.pkla
[Mount system devices]
Identity=unix-group:sudo
Action=org.freedesktop.udisks2.filesystem-mount-system
ResultAny=auth_admin
ResultInactive=auth_admin
ResultActive=yes

After that little trick with policies automount started working. I am not a linux expert, an this solution may be not a perfect one, especially in security aspect, but it worked for me at least.