Bug 383498 - Mount media when clicking on it without having to click the "mount" button besides
Summary: Mount media when clicking on it without having to click the "mount" button be...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Disks & Devices widget (show other bugs)
Version: 5.9.5
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-14 11:32 UTC by Tobias Leupold
Modified: 2020-11-26 06:28 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Leupold 2017-08-14 11:32:07 UTC
When I have Dolphin open and plug a removable storage device like an USB stick, it appears in "Places". When I click on it, it's mounted and I can access it.

When I try to mount it via the device notifier by clicking "Open with file manager" (or so), I get "You don't have the permission to mount this device". When I click that "mount" logo, the device is actually mounted, and Dolphin pops up when I click on it afterwards.

The device should IMO be mounted and displayed (in Dolphin) when clicking on "Display in file manager". Or at least say "Don't click here when the device is not mounted yet, click the mount button first" – but I think we can really cheap out this by doing it automatically. I mean, when I click on it to view it, I also want to mount it first, don't I?! ;-)

The "no permission" error message is a bit confusing as this is simply not the case. First time I saw this, I kept searching for why I'm not allowed anymore to mount removable media, until I saw that it's simply not the case.

Would be very nice it this was fixed.
Comment 1 David Edmundson 2017-09-07 12:49:28 UTC
Automatically mounting is the intended behaviour, and (as unhelpful as this comment is) it works here.

Is this just on your personal machine or Limux too?

Can you run "solid-hardware5 listen" whilst you plug in the disk then try to open it with the "open with file manager"
Comment 2 Tobias Leupold 2017-09-07 13:16:41 UTC
What do you mean with "or Limux too?"?

Here's the output:

$ solid-hardware5 listen
Listening to add/remove events: 
"/org/freedesktop/UDisks2/drives/UFD_3_2e0_Silicon_Power16G_P1503992734160100178" has new interfaces: ("org.freedesktop.UDisks2.Drive")
Device Added:
udi = '/org/freedesktop/UDisks2/drives/UFD_3_2e0_Silicon_Power16G_P1503992734160100178'
"/org/freedesktop/UDisks2/block_devices/sdb" has new interfaces: ("org.freedesktop.UDisks2.Block", "org.freedesktop.UDisks2.PartitionTable")
Device Added:
udi = '/org/freedesktop/UDisks2/block_devices/sdb'
"/org/freedesktop/UDisks2/block_devices/sdb1" has new interfaces: ("org.freedesktop.UDisks2.Block", "org.freedesktop.UDisks2.Filesystem", "org.freedesktop.UDisks2.Partition")
Device Added:
udi = '/org/freedesktop/UDisks2/block_devices/sdb1'

No output is generated when I try to "Open with file manager" (which produces the error described above) or actually mount the device via the "mount" button. Also, I get the very same output if I have Dolphin open. When I click on the device to view it, it's mounted, but also no additional output is genrerated.
Comment 3 David Edmundson 2017-09-07 15:22:22 UTC
I think I have your name confused with someone else... sorry.
Comment 4 David Edmundson 2017-09-07 15:24:04 UTC
The fact that you see the error means we're trying to mount it, which is a good sign.

Is there anything in the udisks2 log?

sudo journalctl -u udisks2 -b
Comment 5 Tobias Leupold 2017-09-07 17:30:55 UTC
I don't use systemd, but the "everything" log is empty besides the kernel message that the disk was found. This is everything after connecting the stick and clicking on "View with file manager":

Sep 07 19:29:05 [kernel] [120132.771863] usb 3-8: new high-speed USB device number 7 using xhci_hcd
Sep 07 19:29:05 [kernel] [120132.945275] usb 3-8: New USB device found, idVendor=090c, idProduct=1000
Sep 07 19:29:05 [kernel] [120132.945276] usb 3-8: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Sep 07 19:29:05 [kernel] [120132.945277] usb 3-8: Product: Silicon-Power16G
Sep 07 19:29:05 [kernel] [120132.945278] usb 3-8: Manufacturer: UFD 3.0
Sep 07 19:29:05 [kernel] [120132.945278] usb 3-8: SerialNumber: P1503992734160100178
Sep 07 19:29:05 [kernel] [120132.946388] usb-storage 3-8:1.0: USB Mass Storage device detected
Sep 07 19:29:05 [kernel] [120132.946429] scsi host4: usb-storage 3-8:1.0
Sep 07 19:29:06 [kernel] [120134.265838] scsi 4:0:0:0: Direct-Access     UFD 3.0  Silicon-Power16G 1100 PQ: 0 ANSI: 6
Sep 07 19:29:06 [kernel] [120134.265966] sd 4:0:0:0: Attached scsi generic sg2 type 0
Sep 07 19:29:06 [kernel] [120134.266567] sd 4:0:0:0: [sdb] 31490048 512-byte logical blocks: (16.1 GB/15.0 GiB)
Sep 07 19:29:06 [kernel] [120134.267066] sd 4:0:0:0: [sdb] Write Protect is off
Sep 07 19:29:06 [kernel] [120134.267584] sd 4:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Sep 07 19:29:06 [kernel] [120134.271298]  sdb: sdb1
Sep 07 19:29:06 [kernel] [120134.273285] sd 4:0:0:0: [sdb] Attached SCSI removable disk
Comment 6 David Edmundson 2017-09-07 21:59:00 UTC
I don't want the kernel log, I want the log from udisks2 the Daemon sending is the error.
Comment 7 Tobias Leupold 2017-09-08 11:50:27 UTC
Okay, here's what the udisk monitor prints out when plugging the USB stick:

# udisksctl monitor  
Monitoring the udisks daemon. Press Ctrl+C to exit.
13:48:42.831: The udisks-daemon is running (name-owner :1.5).
13:48:56.793: Added /org/freedesktop/UDisks2/drives/UFD_3_2e0_Silicon_Power16G_P1503992734160100178
  org.freedesktop.UDisks2.Drive:
    CanPowerOff:                true
    Configuration:              {}
    ConnectionBus:              usb
    Ejectable:                  true
    Id:                         UFD-3.0-Silicon-Power16G-P1503992734160100178
    Media:                      
    MediaAvailable:             true
    MediaChangeDetected:        true
    MediaCompatibility:         
    MediaRemovable:             true
    Model:                      Silicon-Power16G
    Optical:                    false
    OpticalBlank:               false
    OpticalNumAudioTracks:      0
    OpticalNumDataTracks:       0
    OpticalNumSessions:         0
    OpticalNumTracks:           0
    Removable:                  true
    Revision:                   1100
    RotationRate:               -1
    Seat:                       seat0
    Serial:                     P1503992734160100178
    SiblingId:                  /sys/devices/pci0000:00/0000:00:14.0/usb3/3-8/3-8:1.0
    Size:                       16122904576
    SortKey:                    01hotplug/1504871336792249
    TimeDetected:               1504871336792249
    TimeMediaDetected:          1504871336792249
    Vendor:                     UFD 3.0
    WWN:                        
13:48:56.794: Added /org/freedesktop/UDisks2/block_devices/sdb
  org.freedesktop.UDisks2.Block:
    Configuration:              []
    CryptoBackingDevice:        '/'
    Device:                     /dev/sdb
    DeviceNumber:               2064
    Drive:                      '/org/freedesktop/UDisks2/drives/UFD_3_2e0_Silicon_Power16G_P1503992734160100178'
    HintAuto:                   true
    HintIconName:               
    HintIgnore:                 false
    HintName:                   
    HintPartitionable:          true
    HintSymbolicIconName:       
    HintSystem:                 false
    Id:                         
    IdLabel:                    
    IdType:                     
    IdUUID:                     
    IdUsage:                    
    IdVersion:                  
    MDRaid:                     '/'
    MDRaidMember:               '/'
    PreferredDevice:            /dev/sdb
    ReadOnly:                   false
    Size:                       16122904576
    Symlinks:                   /dev/disk/by-id/usb-UFD_3.0_Silicon-Power16G_P1503992734160100178-0:0
                                /dev/disk/by-path/pci-0000:00:14.0-usb-0:8:1.0-scsi-0:0:0:0
  org.freedesktop.UDisks2.PartitionTable:
    Type:               dos
13:48:56.844: Added /org/freedesktop/UDisks2/block_devices/sdb1
  org.freedesktop.UDisks2.Block:
    Configuration:              []
    CryptoBackingDevice:        '/'
    Device:                     /dev/sdb1
    DeviceNumber:               2065
    Drive:                      '/org/freedesktop/UDisks2/drives/UFD_3_2e0_Silicon_Power16G_P1503992734160100178'
    HintAuto:                   true
    HintIconName:               
    HintIgnore:                 false
    HintName:                   
    HintPartitionable:          true
    HintSymbolicIconName:       
    HintSystem:                 false
    Id:                         by-uuid-0FE2-0D74
    IdLabel:                    SP UFD U3
    IdType:                     vfat
    IdUUID:                     0FE2-0D74
    IdUsage:                    filesystem
    IdVersion:                  FAT32
    MDRaid:                     '/'
    MDRaidMember:               '/'
    PreferredDevice:            /dev/sdb1
    ReadOnly:                   false
    Size:                       16122847232
    Symlinks:                   /dev/disk/by-id/usb-UFD_3.0_Silicon-Power16G_P1503992734160100178-0:0-part1
                                /dev/disk/by-label/SP\x20UFD\x20U3
                                /dev/disk/by-partuuid/c3072e18-01
                                /dev/disk/by-path/pci-0000:00:14.0-usb-0:8:1.0-scsi-0:0:0:0-part1
                                /dev/disk/by-uuid/0FE2-0D74
  org.freedesktop.UDisks2.Filesystem:
    MountPoints:        
  org.freedesktop.UDisks2.Partition:
    Flags:              0
    IsContained:        false
    IsContainer:        false
    Name:               
    Number:             1
    Offset:             57344
    Size:               16122847232
    Table:              '/org/freedesktop/UDisks2/block_devices/sdb'
    Type:               0x0c
    UUID:               c3072e18-01


There's no output when trying to "view in file manager" though.
Comment 8 Tobias Leupold 2017-10-26 17:48:40 UTC
It's also not possible to mount a dm-crypt/luks encrypted disk via the device notifier. It also fails with "You don't have the permission to mount this device". Probably the very same issue.
Comment 9 Justin Zobel 2020-11-11 23:49:52 UTC
(In reply to Tobias Leupold from comment #8)
> It's also not possible to mount a dm-crypt/luks encrypted disk via the
> device notifier. It also fails with "You don't have the permission to mount
> this device". Probably the very same issue.

I've just tested on latest Plasma from git master and devices are automatically mounted for me when clicking on the Open with File Manager option.

Can you please test and confirm if this issue is still occurring or if this bug report can be marked as resolved. I'm setting status to "needsinfo" pending your response, please change back to "reported" when you respond, thanks.

In regards to the other encrypted disk issue, if that is still occurring can you please open a separate bug report so it can be investigated.
Comment 10 Bug Janitor Service 2020-11-26 04:33:46 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 11 Tobias Leupold 2020-11-26 06:23:53 UTC
Sorry, I overlooked this one! Seems like the issue has been fixed. Using Plasma 5.19.5, removable media is mounted as expected when clicking on "Open with file manager".
Comment 12 Justin Zobel 2020-11-26 06:28:23 UTC
Thanks for confirming Tobias.