View previous topic :: View next topic |
Author |
Message |
pd1986 Guru

Joined: 19 Feb 2012 Posts: 395 Location: Paris
|
Posted: Tue Sep 29, 2015 3:59 pm Post subject: kde5 device notifier can't automount USB |
|
|
Error log from .xssession-error
"Could not mount the following device: 15.0 GiB Removable Media" "An unspecified error has occurred: Not authorized to perform operation" "/org/freedesktop/UDisks2/block_devices/sdc1"
However, mount in Dolphin and umount in Device Notifier have no problem.
I am using openrc Does anyone have an idea how to solve this problem? Thanks |
|
Back to top |
|
 |
AnOriginalNick n00b

Joined: 02 Apr 2015 Posts: 14
|
Posted: Wed Sep 30, 2015 10:54 am Post subject: Re: kde5 device notifier can't automount USB |
|
|
pd1986 wrote: | Error log from .xssession-error
"Could not mount the following device: 15.0 GiB Removable Media" "An unspecified error has occurred: Not authorized to perform operation" "/org/freedesktop/UDisks2/block_devices/sdc1"
However, mount in Dolphin and umount in Device Notifier have no problem.
I am using openrc Does anyone have an idea how to solve this problem? Thanks |
IMHO it is a polkit issue, recently had my share of problems with this thing, you should add similar rule to /etc/polkit-1/rules.d/<some number> - <some name>.rules (i.e. 10-enable_mount.rules)
Code: | polkit.addRule(function(action, subject) {
if (action.id.indexOf("org.freedesktop.udisks2.") == 0 &&
subject.isInGroup("users")) {
return polkit.Result.YES;
}
});
|
Do note, that for this particular rule your user has to be in users groups (or you can drop the "&& subject.isInGroup("users")" clause, whichever you want). Polkit will automatically update your ruleset in time, but you can hasten the process by rebooting. |
|
Back to top |
|
 |
pd1986 Guru

Joined: 19 Feb 2012 Posts: 395 Location: Paris
|
Posted: Wed Sep 30, 2015 1:46 pm Post subject: Re: kde5 device notifier can't automount USB |
|
|
AnOriginalNick wrote: | pd1986 wrote: | Error log from .xssession-error
"Could not mount the following device: 15.0 GiB Removable Media" "An unspecified error has occurred: Not authorized to perform operation" "/org/freedesktop/UDisks2/block_devices/sdc1"
However, mount in Dolphin and umount in Device Notifier have no problem.
I am using openrc Does anyone have an idea how to solve this problem? Thanks |
IMHO it is a polkit issue, recently had my share of problems with this thing, you should add similar rule to /etc/polkit-1/rules.d/<some number> - <some name>.rules (i.e. 10-enable_mount.rules)
Code: | polkit.addRule(function(action, subject) {
if (action.id.indexOf("org.freedesktop.udisks2.") == 0 &&
subject.isInGroup("users")) {
return polkit.Result.YES;
}
});
|
Do note, that for this particular rule your user has to be in users groups (or you can drop the "&& subject.isInGroup("users")" clause, whichever you want). Polkit will automatically update your ruleset in time, but you can hasten the process by rebooting. |
has been tried. not working for automount but working by clicking.
In fact, suspend, reboot, shutdown, automount on dolphin, all work very well. So I don't know what I could try. |
|
Back to top |
|
 |
pd1986 Guru

Joined: 19 Feb 2012 Posts: 395 Location: Paris
|
Posted: Wed Sep 30, 2015 2:00 pm Post subject: Re: kde5 device notifier can't automount USB |
|
|
AnOriginalNick wrote: | pd1986 wrote: | Error log from .xssession-error
"Could not mount the following device: 15.0 GiB Removable Media" "An unspecified error has occurred: Not authorized to perform operation" "/org/freedesktop/UDisks2/block_devices/sdc1"
However, mount in Dolphin and umount in Device Notifier have no problem.
I am using openrc Does anyone have an idea how to solve this problem? Thanks |
IMHO it is a polkit issue, recently had my share of problems with this thing, you should add similar rule to /etc/polkit-1/rules.d/<some number> - <some name>.rules (i.e. 10-enable_mount.rules)
Code: | polkit.addRule(function(action, subject) {
if (action.id.indexOf("org.freedesktop.udisks2.") == 0 &&
subject.isInGroup("users")) {
return polkit.Result.YES;
}
});
|
Do note, that for this particular rule your user has to be in users groups (or you can drop the "&& subject.isInGroup("users")" clause, whichever you want). Polkit will automatically update your ruleset in time, but you can hasten the process by rebooting. |
However, I tried the method shown here:https://wiki.gentoo.org/wiki/Polkit
But it doesn't work. why? |
|
Back to top |
|
 |
AnOriginalNick n00b

Joined: 02 Apr 2015 Posts: 14
|
Posted: Thu Oct 01, 2015 9:08 am Post subject: Re: kde5 device notifier can't automount USB |
|
|
pd1986 wrote: | AnOriginalNick wrote: | pd1986 wrote: | Error log from .xssession-error
"Could not mount the following device: 15.0 GiB Removable Media" "An unspecified error has occurred: Not authorized to perform operation" "/org/freedesktop/UDisks2/block_devices/sdc1"
However, mount in Dolphin and umount in Device Notifier have no problem.
I am using openrc Does anyone have an idea how to solve this problem? Thanks |
IMHO it is a polkit issue, recently had my share of problems with this thing, you should add similar rule to /etc/polkit-1/rules.d/<some number> - <some name>.rules (i.e. 10-enable_mount.rules)
Code: | polkit.addRule(function(action, subject) {
if (action.id.indexOf("org.freedesktop.udisks2.") == 0 &&
subject.isInGroup("users")) {
return polkit.Result.YES;
}
});
|
Do note, that for this particular rule your user has to be in users groups (or you can drop the "&& subject.isInGroup("users")" clause, whichever you want). Polkit will automatically update your ruleset in time, but you can hasten the process by rebooting. |
However, I tried the method shown here:https://wiki.gentoo.org/wiki/Polkit
But it doesn't work. why? |
Well, I am not entirely sure what you mean, but I believe the syntax changed a little since then and the wiki entry isn't 100% appropriate anymore, especially I am not sure that returning simply "yes" is valid anymore. |
|
Back to top |
|
 |
pd1986 Guru

Joined: 19 Feb 2012 Posts: 395 Location: Paris
|
Posted: Thu Oct 01, 2015 12:17 pm Post subject: Re: kde5 device notifier can't automount USB |
|
|
AnOriginalNick wrote: | pd1986 wrote: | AnOriginalNick wrote: | pd1986 wrote: | Error log from .xssession-error
"Could not mount the following device: 15.0 GiB Removable Media" "An unspecified error has occurred: Not authorized to perform operation" "/org/freedesktop/UDisks2/block_devices/sdc1"
However, mount in Dolphin and umount in Device Notifier have no problem.
I am using openrc Does anyone have an idea how to solve this problem? Thanks |
IMHO it is a polkit issue, recently had my share of problems with this thing, you should add similar rule to /etc/polkit-1/rules.d/<some number> - <some name>.rules (i.e. 10-enable_mount.rules)
Code: | polkit.addRule(function(action, subject) {
if (action.id.indexOf("org.freedesktop.udisks2.") == 0 &&
subject.isInGroup("users")) {
return polkit.Result.YES;
}
});
|
Do note, that for this particular rule your user has to be in users groups (or you can drop the "&& subject.isInGroup("users")" clause, whichever you want). Polkit will automatically update your ruleset in time, but you can hasten the process by rebooting. |
However, I tried the method shown here:https://wiki.gentoo.org/wiki/Polkit
But it doesn't work. why? |
Well, I am not entirely sure what you mean, but I believe the syntax changed a little since then and the wiki entry isn't 100% appropriate anymore, especially I am not sure that returning simply "yes" is valid anymore. |
All right, Thanks.
I mean that when I plug the USB in my computer, it isn't automounted automatically, only it could only be automounted when I click it in device notifier. Well. it really doesn't matter. It is good now. Thanks. |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|