public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Policykit problems (blueman, nm-applet, USB mount, etc) after some update
@ 2018-10-26 11:14 Alexey Eschenko
  2018-10-26 12:15 ` Mick
  0 siblings, 1 reply; 8+ messages in thread
From: Alexey Eschenko @ 2018-10-26 11:14 UTC (permalink / raw
  To: gentoo-user


[-- Attachment #1.1: Type: text/plain, Size: 2267 bytes --]

Hi.

Some time ago (probably between two weeks and month) after another
system update I started encountering problems with some userland
services like blueman and nm-applet.

I have encountered blueman problem every time when I logged in to my
XFCE session. Right after XFCE init I did see this:
https://github.com/blueman-project/blueman/issues/913

Probably at the same time I became unable to enable my VPN connections
using nm-applet. After choosing my connection from dropdown menu I've
seen the error in notification bubble:
> The VPN connection "..." failed to start.
> Not authorized to control networking

Third but not as likely related (not sure if it started to happen at the
same time) is XFCE shutdown/reboot problems. For some time I'm unable to
directly shutdown or reboot my PC from XFCE "Action Buttons" panel
plugin. If I choose "Restart" or "Shut Down" then XFCE just logs out
from my session and I will see SDDM. If I choose shutdown/reboot in SDDM
then all will be ok but direct shutdown from XFCE only logs me out.

And fourth problem is that for some time I became unable to mount USB
flash drives from the file manager. In Thunar when I'm clicking on USB
drive nothing happens (even nothing in the thunar console output if I
run it from there). There is also nothing strange in journalctl when I'm
plugging my USB flash drive.
If I try to mount my USB drive using "sudo mount /dev/sdX1
/media/usb_flash" then all works perfectly. udisksctl which I've never
used in the past (but was told to try after mentioning this problem)
mounts USB drive correctly but only after asking root password.

After reading the issue in the blueman repository I tried "fix" which
was mentioned here:
https://github.com/blueman-project/blueman/issues/912#issuecomment-427648539
https://github.com/blueman-project/blueman/wiki/PolicyKit

It did help with blueman error on XFCE start.
I'm not familiar with policykit at all but it looks like there was some
systematic changes in permission policies and I think that there must be
more correct and more generic solution than manually creating policykit
policies for every service which I notice problems with.

-- 
Kind regards,
Alexey Eschenko
https://skobk.in/



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] Policykit problems (blueman, nm-applet, USB mount, etc) after some update
  2018-10-26 11:14 [gentoo-user] Policykit problems (blueman, nm-applet, USB mount, etc) after some update Alexey Eschenko
@ 2018-10-26 12:15 ` Mick
  2018-10-26 13:41   ` Alexey Eschenko
  0 siblings, 1 reply; 8+ messages in thread
From: Mick @ 2018-10-26 12:15 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 2826 bytes --]

On Friday, 26 October 2018 12:14:17 BST Alexey Eschenko wrote:
> Hi.
> 
> Some time ago (probably between two weeks and month) after another
> system update I started encountering problems with some userland
> services like blueman and nm-applet.
> 
> I have encountered blueman problem every time when I logged in to my
> XFCE session. Right after XFCE init I did see this:
> https://github.com/blueman-project/blueman/issues/913
> 
> Probably at the same time I became unable to enable my VPN connections
> using nm-applet. After choosing my connection from dropdown menu I've
> 
> seen the error in notification bubble:
> > The VPN connection "..." failed to start.
> > Not authorized to control networking
> 
> Third but not as likely related (not sure if it started to happen at the
> same time) is XFCE shutdown/reboot problems. For some time I'm unable to
> directly shutdown or reboot my PC from XFCE "Action Buttons" panel
> plugin. If I choose "Restart" or "Shut Down" then XFCE just logs out
> from my session and I will see SDDM. If I choose shutdown/reboot in SDDM
> then all will be ok but direct shutdown from XFCE only logs me out.
> 
> And fourth problem is that for some time I became unable to mount USB
> flash drives from the file manager. In Thunar when I'm clicking on USB
> drive nothing happens (even nothing in the thunar console output if I
> run it from there). There is also nothing strange in journalctl when I'm
> plugging my USB flash drive.
> If I try to mount my USB drive using "sudo mount /dev/sdX1
> /media/usb_flash" then all works perfectly. udisksctl which I've never
> used in the past (but was told to try after mentioning this problem)
> mounts USB drive correctly but only after asking root password.
> 
> After reading the issue in the blueman repository I tried "fix" which
> was mentioned here:
> https://github.com/blueman-project/blueman/issues/912#issuecomment-427648539
> https://github.com/blueman-project/blueman/wiki/PolicyKit
> 
> It did help with blueman error on XFCE start.
> I'm not familiar with policykit at all but it looks like there was some
> systematic changes in permission policies and I think that there must be
> more correct and more generic solution than manually creating policykit
> policies for every service which I notice problems with.

I've experienced similar problems lately on a system where I had erroneously 
left settings to cater for startx, but these were in addition to what the 
Display Manager was doing (sddm).  As a result there were two sessions 
starting as shown by ck-list-sessions and this created a clash blocking things 
like BT, USB mounts from userspace (on any DE) and the like.

You may want to check if you have left any manually created session files in /
etc/X11/Sessions/ and ~/.xinit or ~/.xsession.

-- 
Regards,
Mick

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] Policykit problems (blueman, nm-applet, USB mount, etc) after some update
  2018-10-26 12:15 ` Mick
@ 2018-10-26 13:41   ` Alexey Eschenko
  2018-10-26 14:18     ` Mick
  0 siblings, 1 reply; 8+ messages in thread
From: Alexey Eschenko @ 2018-10-26 13:41 UTC (permalink / raw
  To: gentoo-user


[-- Attachment #1.1: Type: text/plain, Size: 4239 bytes --]

On 10/26/18 3:15 PM, Mick wrote:
> On Friday, 26 October 2018 12:14:17 BST Alexey Eschenko wrote:
>> Hi.
>>
>> Some time ago (probably between two weeks and month) after another
>> system update I started encountering problems with some userland
>> services like blueman and nm-applet.
>>
>> I have encountered blueman problem every time when I logged in to my
>> XFCE session. Right after XFCE init I did see this:
>> https://github.com/blueman-project/blueman/issues/913
>>
>> Probably at the same time I became unable to enable my VPN connections
>> using nm-applet. After choosing my connection from dropdown menu I've
>>
>> seen the error in notification bubble:
>>> The VPN connection "..." failed to start.
>>> Not authorized to control networking
>> Third but not as likely related (not sure if it started to happen at the
>> same time) is XFCE shutdown/reboot problems. For some time I'm unable to
>> directly shutdown or reboot my PC from XFCE "Action Buttons" panel
>> plugin. If I choose "Restart" or "Shut Down" then XFCE just logs out
>> from my session and I will see SDDM. If I choose shutdown/reboot in SDDM
>> then all will be ok but direct shutdown from XFCE only logs me out.
>>
>> And fourth problem is that for some time I became unable to mount USB
>> flash drives from the file manager. In Thunar when I'm clicking on USB
>> drive nothing happens (even nothing in the thunar console output if I
>> run it from there). There is also nothing strange in journalctl when I'm
>> plugging my USB flash drive.
>> If I try to mount my USB drive using "sudo mount /dev/sdX1
>> /media/usb_flash" then all works perfectly. udisksctl which I've never
>> used in the past (but was told to try after mentioning this problem)
>> mounts USB drive correctly but only after asking root password.
>>
>> After reading the issue in the blueman repository I tried "fix" which
>> was mentioned here:
>> https://github.com/blueman-project/blueman/issues/912#issuecomment-427648539
>> https://github.com/blueman-project/blueman/wiki/PolicyKit
>>
>> It did help with blueman error on XFCE start.
>> I'm not familiar with policykit at all but it looks like there was some
>> systematic changes in permission policies and I think that there must be
>> more correct and more generic solution than manually creating policykit
>> policies for every service which I notice problems with.
> I've experienced similar problems lately on a system where I had erroneously 
> left settings to cater for startx, but these were in addition to what the 
> Display Manager was doing (sddm).  As a result there were two sessions 
> starting as shown by ck-list-sessions and this created a clash blocking things 
> like BT, USB mounts from userspace (on any DE) and the like.
>
> You may want to check if you have left any manually created session files in /
> etc/X11/Sessions/ and ~/.xinit or ~/.xsession.

Thanks for the tips. But looks like it's not my case (or at least I
think so):

> root@skobkin-pc /etc/X11/Sessions
> > # ls -l
> total 6
> lrwxrwxrwx 1 root root    5 Aug  9 16:14 Xfce -> Xfce4
> -rwxr-xr-x 1 root root   11 Aug  9 16:14 Xfce4
> -rwxr-xr-x 1 root root 2187 Jul  9 11:05 Xsession

> skobkin@skobkin-pc ~
> > $ ls -l ./.x*
> -rw-r--r-- 1 skobkin skobkin     72 Apr  2  2016 ./.xinitrc # here's
> only two commented lines which I used long ago
> -rw-r--r-- 1 skobkin skobkin   8149 Jan 12  2016 ./.xscreensaver
> -rw------- 1 skobkin skobkin 189985 Jul  9  2017 ./.xsession-errors
>
> > $ ls -l ./.X*
> -rw------- 1 skobkin skobkin 55 Oct 26 13:25 ./.Xauthority

> As a result there were two sessions 
> starting as shown by ck-list-sessions

I don't have ck-list-sessions binary in my filesystem. Looks like it's
provided by sys-auth/consolekit which is not installed in my system
right now. But I think it was until I moved to the systemd and then made
depclean.

Also after this I tried to list sessions with loginctl but I've got
strange result:

> > $ loginctl list-sessions
> No sessions.
I remember when I used it last time it showed at least one X-session...

-- 
Kind regards,
Alexey Eschenko
https://skobk.in/



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] Policykit problems (blueman, nm-applet, USB mount, etc) after some update
  2018-10-26 13:41   ` Alexey Eschenko
@ 2018-10-26 14:18     ` Mick
  2018-10-26 14:31       ` Alexey Eschenko
  0 siblings, 1 reply; 8+ messages in thread
From: Mick @ 2018-10-26 14:18 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1628 bytes --]

On Friday, 26 October 2018 14:41:53 BST Alexey Eschenko wrote:
> On 10/26/18 3:15 PM, Mick wrote:

> > You may want to check if you have left any manually created session files
> > in / etc/X11/Sessions/ and ~/.xinit or ~/.xsession.
> 
> Thanks for the tips. But looks like it's not my case (or at least I
> think so):
> > root@skobkin-pc /etc/X11/Sessions
> > 
> > > # ls -l
> > 
> > total 6
> > lrwxrwxrwx 1 root root    5 Aug  9 16:14 Xfce -> Xfce4
> > -rwxr-xr-x 1 root root   11 Aug  9 16:14 Xfce4
> > -rwxr-xr-x 1 root root 2187 Jul  9 11:05 Xsession

On my system only Xsession is now listed.  Did you install Xfce in Aug when 
the session file and symlink were created, or did you set these up manually?

How do you start your X session?  Do you use a Display Manager to login?


> > As a result there were two sessions
> > starting as shown by ck-list-sessions
> 
> I don't have ck-list-sessions binary in my filesystem. Looks like it's
> provided by sys-auth/consolekit which is not installed in my system
> right now. But I think it was until I moved to the systemd and then made
> depclean.

Yes, systemd uses its own systemd-logind instead.


> Also after this I tried to list sessions with loginctl but I've got
> 
> strange result:
> > > $ loginctl list-sessions
> > 
> > No sessions.
> 
> I remember when I used it last time it showed at least one X-session...

Hmm ... there should be a Session/User/Seat output listed as far as I know.  
So there seems to be a problem right there.  I don't use either systemd or 
Xfce to compare with mine, but hopefully someone who does will chime in soon.

-- 
Regards,
Mick

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] Policykit problems (blueman, nm-applet, USB mount, etc) after some update
  2018-10-26 14:18     ` Mick
@ 2018-10-26 14:31       ` Alexey Eschenko
  2018-10-26 18:49         ` Mick
  0 siblings, 1 reply; 8+ messages in thread
From: Alexey Eschenko @ 2018-10-26 14:31 UTC (permalink / raw
  To: gentoo-user@lists.gentoo.org

[-- Attachment #1: Type: text/html, Size: 2632 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] Policykit problems (blueman, nm-applet, USB mount, etc) after some update
  2018-10-26 14:31       ` Alexey Eschenko
@ 2018-10-26 18:49         ` Mick
  2018-11-07 13:56           ` Alexey Eschenko
  0 siblings, 1 reply; 8+ messages in thread
From: Mick @ 2018-10-26 18:49 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 988 bytes --]

On Friday, 26 October 2018 15:31:33 BST Alexey Eschenko wrote:
> I installed XFCE a long ago. But it was updated somewhen near August.
> I'm using login manager as I wrote earlier when described reboot/shutdown
> problem. It's unit enabled using systemctl enable.

I'm not familiar with systemd, to know where logind obtains its $XSESSION 
from, but someone else should hopefully contribute in soon.


> I didn't set up sessions
> manually. Nor am I remember to create this symlink. I think it must be part
> of xfce4-session installation. Yeah. I remember using loginctl in the past
> and there was always at least one session.

Perhaps the Xfce file and symlink in /etc/X11/Sessions, or even /etc/env.d/
90xsession if installed, were part of the default Xfce installation - assuming 
Xfce is meant to be started with startx or startxfce4 from a console.

Someone who runs both Xfce and systemd should post what their setup looks like 
for Alexey to compare notes with.
-- 
Regards,
Mick

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] Policykit problems (blueman, nm-applet, USB mount, etc) after some update
  2018-10-26 18:49         ` Mick
@ 2018-11-07 13:56           ` Alexey Eschenko
  2018-11-08  8:26             ` Mick
  0 siblings, 1 reply; 8+ messages in thread
From: Alexey Eschenko @ 2018-11-07 13:56 UTC (permalink / raw
  To: gentoo-user


[-- Attachment #1.1: Type: text/plain, Size: 1874 bytes --]

Still no answers from anyone :)

Also I've encountered other problem when ran gparted-pkexec:

> $ gparted-pkexec
> ==== AUTHENTICATING FOR org.gentoo.pkexec.gparted ====
> Authentication is required to run the GParted Partition Editor
> Authenticating as: root
> Password:
> polkit-agent-helper-1: error response to PolicyKit daemon:
> GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: No session for cookie
> ==== AUTHENTICATION FAILED ====
> Error executing command as another user: Not authorized
>
> This incident has been reported.

It can probably be related to this problem:
https://gitlab.freedesktop.org/polkit/polkit/issues/17

Maybe I need to post the issue to the Gentoo Bugzilla? Is it appropriate
for this kind of problems?

On 10/26/18 9:49 PM, Mick wrote:
> On Friday, 26 October 2018 15:31:33 BST Alexey Eschenko wrote:
>> I installed XFCE a long ago. But it was updated somewhen near August.
>> I'm using login manager as I wrote earlier when described reboot/shutdown
>> problem. It's unit enabled using systemctl enable.
> I'm not familiar with systemd, to know where logind obtains its $XSESSION 
> from, but someone else should hopefully contribute in soon.
>
>
>> I didn't set up sessions
>> manually. Nor am I remember to create this symlink. I think it must be part
>> of xfce4-session installation. Yeah. I remember using loginctl in the past
>> and there was always at least one session.
> Perhaps the Xfce file and symlink in /etc/X11/Sessions, or even /etc/env.d/
> 90xsession if installed, were part of the default Xfce installation - assuming 
> Xfce is meant to be started with startx or startxfce4 from a console.
>
> Someone who runs both Xfce and systemd should post what their setup looks like 
> for Alexey to compare notes with.

-- 
Kind regards,
Alexey Eschenko
https://skobk.in/



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] Policykit problems (blueman, nm-applet, USB mount, etc) after some update
  2018-11-07 13:56           ` Alexey Eschenko
@ 2018-11-08  8:26             ` Mick
  0 siblings, 0 replies; 8+ messages in thread
From: Mick @ 2018-11-08  8:26 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1080 bytes --]

On Wednesday, 7 November 2018 13:56:32 GMT Alexey Eschenko wrote:
> Still no answers from anyone :)
> 
> Also I've encountered other problem when ran gparted-pkexec:
> > $ gparted-pkexec
> > ==== AUTHENTICATING FOR org.gentoo.pkexec.gparted ====
> > Authentication is required to run the GParted Partition Editor
> > Authenticating as: root
> > Password:
> > polkit-agent-helper-1: error response to PolicyKit daemon:
> > GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: No session for cookie
> > ==== AUTHENTICATION FAILED ====
> > Error executing command as another user: Not authorized
> > 
> > This incident has been reported.
> 
> It can probably be related to this problem:
> https://gitlab.freedesktop.org/polkit/polkit/issues/17
> 
> Maybe I need to post the issue to the Gentoo Bugzilla? Is it appropriate
> for this kind of problems?

Yes, I think this looks like a bug, but like your previous problem it may have 
something to do with the interaction (buggy or otherwise) between polkit and 
systemctl.

I suggest you raise a bug report with BGO.

-- 
Regards,
Mick

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-11-08  8:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-26 11:14 [gentoo-user] Policykit problems (blueman, nm-applet, USB mount, etc) after some update Alexey Eschenko
2018-10-26 12:15 ` Mick
2018-10-26 13:41   ` Alexey Eschenko
2018-10-26 14:18     ` Mick
2018-10-26 14:31       ` Alexey Eschenko
2018-10-26 18:49         ` Mick
2018-11-07 13:56           ` Alexey Eschenko
2018-11-08  8:26             ` Mick

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox