You are not logged in.

#1 2016-10-10 20:14:05

Roken
Member
From: South Wales, UK
Registered: 2012-01-16
Posts: 1,253

I want to say solved, but [FIXED] PolicyKit woes

OK, this is odd, and I don;t know when it started, because I've just lived with it, but polkit rules are no longer behaving.

It used to be the case that disks would auto-mount, and that I could reboot, or shutdown with no problem. Now, I have to authenticate every time, which since I bought the complete DVD collection of Only Fools and Horses, is becoming a PITA.

I still have the rules correctly setup, and I've hacked a shutdown button, but I'd like to get back to not needing to password rudimentary stuff.

I like to think it started when I installed xfce-polkit, but reverting to polkit-gnome doesn't fix it, just gives me a different skin on the password requester. I've checked and double checked, and re-made the rules, with no joy. My only other thought is it's a result of my dbus issue, but whatever I do, I either have to sudo, or pass unlock in a GUI.

Google is no help now, and since dbus cannot be updated (though it used to work just fine) - I'll post the upstream response separately, but it was critical off Arch disabling dbus-launch so soon, I'd just like a solution to this. So how can I recover shutdown, restart, auto-mount? Pleeeeeze smile

Last edited by Roken (2016-10-18 21:29:57)


Ryzen 5900X 12 core/24 thread - RTX 3090 FE 24 Gb, Asus Prime B450 Plus, 32Gb Corsair DDR4, Cooler Master N300 chassis, 5 HD (1 NvME PCI, 4SSD) + 1 x optical.
Linux user #545703

Offline

#2 2016-10-10 20:15:03

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: I want to say solved, but [FIXED] PolicyKit woes

Not a Sysadmin issue, moving to NC...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2016-10-10 20:15:43

Roken
Member
From: South Wales, UK
Registered: 2012-01-16
Posts: 1,253

Re: I want to say solved, but [FIXED] PolicyKit woes

With respect, it is very much sysadmin. PolicyKit is pretty much Sysadmin personified.

Last edited by Roken (2016-10-10 20:18:04)


Ryzen 5900X 12 core/24 thread - RTX 3090 FE 24 Gb, Asus Prime B450 Plus, 32Gb Corsair DDR4, Cooler Master N300 chassis, 5 HD (1 NvME PCI, 4SSD) + 1 x optical.
Linux user #545703

Offline

#4 2016-10-10 20:23:12

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: I want to say solved, but [FIXED] PolicyKit woes

READ the sticky I linked. Where are the journal entries, the conf files? Where is any evidence of you attempting to debug it other than reinstalling and hoping?
Your intial post is little more than hand waving and speculation. It contains nothing for anyone else to work with.

You have been here long enough to understand that some effort is expected of you; more so on that board.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2016-10-10 21:30:14

Roken
Member
From: South Wales, UK
Registered: 2012-01-16
Posts: 1,253

Re: I want to say solved, but [FIXED] PolicyKit woes

By way of example, for automount:

/etc/polkit-1/rules.d/10-enable-mount.rules

// /etc/polkit-1/rules.d/10-enable-mount.rules

polkit.addRule(function(action, subject) {
    if (action.id == "org.freedesktop.udisks2.filesystem-mount-system" &&
        subject.isInGroup("storage")) {
        return polkit.Result.YES;
    }
});

And, yes. user is a member of the storage group.

systemctl

systemctl status polkit
● polkit.service - Authorization Manager
   Loaded: loaded (/usr/lib/systemd/system/polkit.service; static; vendor preset: disabled)
   Active: active (running) since Mon 2016-10-10 22:35:45 BST; 3min 27s ago
     Docs: man:polkit(8)
 Main PID: 553 (polkitd)
    Tasks: 6 (limit: 4915)
   CGroup: /system.slice/polkit.service
           └─553 /usr/lib/polkit-1/polkitd --no-debug

Oct 10 22:35:45 Tex polkitd[553]: Finished loading, compiling and executing 4 rules
Oct 10 22:35:45 Tex systemd[1]: Started Authorization Manager.
Oct 10 22:35:45 Tex polkitd[553]: Acquired the name org.freedesktop.PolicyKit1 on the system bus
Oct 10 22:36:14 Tex polkitd[553]: Registered Authentication Agent for unix-session:c1 (system bus name :1.27 [/usr/lib/xfce-polkit/xfce-polki
Oct 10 22:36:57 Tex polkitd[553]: Registered Authentication Agent for unix-process:12474:8037 (system bus name :1.39 [/usr/bin/pkttyagent --n
Oct 10 22:36:58 Tex polkitd[553]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.login1.
Oct 10 22:36:59 Tex polkitd[553]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.login1.
Oct 10 22:37:00 Tex polkitd[553]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.systemd
Oct 10 22:37:00 Tex polkitd[553]: Unregistered Authentication Agent for unix-process:12474:8037 (system bus name :1.39, object path /org/free
Oct 10 22:37:29 Tex polkitd[553]: Operator of unix-session:c1 successfully authenticated as unix-user:steve to gain ONE-SHOT authorization fo
lines 1-19/19 (END)

And for the record, I don't take offence at being moved, I take offence at being moved to newbie, after 5 years of Arch, 2 years of LFS, and a further 10 years of Linux generally.

Last edited by Roken (2016-10-10 21:42:10)


Ryzen 5900X 12 core/24 thread - RTX 3090 FE 24 Gb, Asus Prime B450 Plus, 32Gb Corsair DDR4, Cooler Master N300 chassis, 5 HD (1 NvME PCI, 4SSD) + 1 x optical.
Linux user #545703

Offline

#6 2016-10-10 21:57:30

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: I want to say solved, but [FIXED] PolicyKit woes

org.freedesktop.login1.*  is handled by systemd-logind .

what is the output of

$ loginctl show-session $XDG_SESSION_ID

?

Last edited by Lone_Wolf (2016-10-10 21:58:57)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#7 2016-10-11 05:23:17

Roken
Member
From: South Wales, UK
Registered: 2012-01-16
Posts: 1,253

Re: I want to say solved, but [FIXED] PolicyKit woes

$ loginctl show-session $XDG_SESSION_ID
EnableWallMessages=no
NAutoVTs=6
KillUserProcesses=no
RebootToFirmwareSetup=no
IdleHint=no
IdleSinceHint=0
IdleSinceHintMonotonic=0
DelayInhibited=sleep
InhibitDelayMaxUSec=5s
HandlePowerKey=poweroff
HandleSuspendKey=suspend
HandleHibernateKey=hibernate
HandleLidSwitch=suspend
HandleLidSwitchDocked=ignore
HoldoffTimeoutUSec=30s
IdleAction=ignore
IdleActionUSec=30min
PreparingForShutdown=no
PreparingForSleep=no
Docked=no
RemoveIPC=yes
RuntimeDirectorySize=837488640
InhibitorsMax=8192
NCurrentInhibitors=1
SessionsMax=8192
NCurrentSessions=1
UserTasksMax=10813

Ryzen 5900X 12 core/24 thread - RTX 3090 FE 24 Gb, Asus Prime B450 Plus, 32Gb Corsair DDR4, Cooler Master N300 chassis, 5 HD (1 NvME PCI, 4SSD) + 1 x optical.
Linux user #545703

Offline

#8 2016-10-11 07:10:28

seth
Member
Registered: 2012-09-03
Posts: 51,029

Re: I want to say solved, but [FIXED] PolicyKit woes

Not *you* have been moved to NC, but your post - that's a difference.

As for your pk-whoes, org.freedesktop.udisks2.filesystem-mount-system won't allow you to mount DvDs, nor does it perform automount (ie. mount on insertion w/o any further action - usually unsuited for desktop systems and more relevant for media centers)

Since your restrictions are somewhat global, I assume this is a session problem and your former paste supports that (there should be some seat and UID mentioned)
As you switched between "xfce-polkit" and "polkit-gnome", you're most likely not on a "major desktop environment"?

=> Post the output of "loginctl" (ooc, there was a similar post and I want to cross check sth.) and
=> what kind is your session and how do you start it?

Offline

#9 2016-10-11 11:09:40

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: I want to say solved, but [FIXED] PolicyKit woes

seth wrote:

As you switched between "xfce-polkit" and "polkit-gnome", you're most likely not on a "major desktop environment"?

Xfce has a polkit daemon now? Last time I checked you had to use either lxpolkit or polkit-gnome and either of them work fine as long as you make sure to start them when the DE starts (tested on xfce).


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#10 2016-10-11 20:08:52

Roken
Member
From: South Wales, UK
Registered: 2012-01-16
Posts: 1,253

Re: I want to say solved, but [FIXED] PolicyKit woes

Yes, xfce-polkit exists, but switching back to polkit-gnome doesn't help (and I'm using xfce4).

I've made minor progress on a workaround, but it's just that, a workaround for just this one issue. It doesn't solve my other policykit related problems.

Installing udevil and invoking devmon gives me automount on the DVD again, BUT, since I have no idea where xfce is being launched from (it's still dbus-launch, but from root - see https://bbs.archlinux.org/viewtopic.php?id=216001) I can't start devmon at startup. Starting from xfce session settings doesn't work, and until dbus 1.10.10 everything just worked, so I'm sure it's related. The polkit rule for automount was just fine, as was reboot. As I mentioned in the other thread, I've hacked together a shutdown, but it echos the root password to the shutdown command, so not great security. If I can figure out where xfce4 is getting launched from (using dbus-launch), I can both get this working, and update dbus.

As I've mentioned over in the other thread, disabling dbus-launch is not recommended upstream yet.

The response to dbus upstream:

"This appears to be a distro integration issue, or possibly several different
distro integration issues with the same user-visible symptom. Please talk to
your distro's support channels about this. The maintainers of dbus and whatever
desktop environment you are using (XFCE or GNOME or whatever) in a particular
distribution are responsible for making sure the versions in that distribution
interoperate nicely: this is what distributions do.

Those maintainers will need a lot more information from you, such as which
version of which desktop environment you are using, any applicable logs, any
non-default configuration files or startup scripts that mention dbus-launch or
DBUS_SESSION_BUS_ADDRESS, and so on.

>From the linked forum thread, Arch Linux seems to have completely disabled
dbus-launch and X11 autolaunching. That's... ambitious, and not something I
would do in a general-purpose (non-embedded) distribution this year (quite
possibly not this decade either).

I'm the maintainer of dbus in Debian, where dbus-launch and X11 autolaunching
are effectively still required. I've started the process of reducing
dbus-launch from required to optional by opening over a hundred bugs[1]; many
of those bugs need solving upstream before we would even be able to *consider*
disabling X11 autolaunching."


Ryzen 5900X 12 core/24 thread - RTX 3090 FE 24 Gb, Asus Prime B450 Plus, 32Gb Corsair DDR4, Cooler Master N300 chassis, 5 HD (1 NvME PCI, 4SSD) + 1 x optical.
Linux user #545703

Offline

#11 2016-10-11 20:15:21

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: I want to say solved, but [FIXED] PolicyKit woes

seth wrote:

Since your restrictions are somewhat global, I assume this is a session problem and your former paste supports that (there should be some seat and UID mentioned)
As you switched between "xfce-polkit" and "polkit-gnome", you're most likely not on a "major desktop environment"?

=> Post the output of "loginctl" (ooc, there was a similar post and I want to cross check sth.) and
=> what kind is your session and how do you start it?

This.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#12 2016-10-11 20:19:29

seth
Member
Registered: 2012-09-03
Posts: 51,029

Re: I want to say solved, but [FIXED] PolicyKit woes

Looking at the other thread, you're on xfce and it's invoked as "/usr/bin/dbus-launch --sh-syntax --exit-with-session xfce4-session"?
Do you use a desktop manager? Which?

Offline

#13 2016-10-12 05:42:32

Roken
Member
From: South Wales, UK
Registered: 2012-01-16
Posts: 1,253

Re: I want to say solved, but [FIXED] PolicyKit woes

Lightdm, and I can't see anything in the .conf that starts xfce with dbus-launch. In fact, I did complete filesystem search for any references to dbus-launch, and can't find a damned thing where xfce may be launched from it.

Output of bare loginctl (separate from post #7):

loginctl 
   SESSION        UID USER             SEAT            
        c1       1000 steve            seat0           

1 sessions listed.

Ryzen 5900X 12 core/24 thread - RTX 3090 FE 24 Gb, Asus Prime B450 Plus, 32Gb Corsair DDR4, Cooler Master N300 chassis, 5 HD (1 NvME PCI, 4SSD) + 1 x optical.
Linux user #545703

Offline

#14 2016-10-12 05:58:48

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: I want to say solved, but [FIXED] PolicyKit woes

If you disable lightdm and just startx, do you get an active session?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#15 2016-10-12 18:51:12

Roken
Member
From: South Wales, UK
Registered: 2012-01-16
Posts: 1,253

Re: I want to say solved, but [FIXED] PolicyKit woes

Startx fails on the fonts directory, of all things. startxfce4 works, but with exactly the same symptoms.

I tries repacing lightdm with slim, but that was a no go since slim just goes into a loop at login. I completely purged lightdm, and removed /etc/lightdm/ then re-installed. Set up per the wiki for autologin (which didn't work - still needed to PW), but at least I'm back to my desktop. Same authentication problems, though.


Ryzen 5900X 12 core/24 thread - RTX 3090 FE 24 Gb, Asus Prime B450 Plus, 32Gb Corsair DDR4, Cooler Master N300 chassis, 5 HD (1 NvME PCI, 4SSD) + 1 x optical.
Linux user #545703

Offline

#16 2016-10-12 19:21:14

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: I want to say solved, but [FIXED] PolicyKit woes

Roken wrote:

Startx fails on the fonts directory, of all things.

That isn't an error message: https://bbs.archlinux.org/viewtopic.php?id=57855 nor is it helpful.

You have a broken session; that is the root of your issues. Until you address that, everything else is just wasting your time and ours.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#17 2016-10-12 19:51:22

Roken
Member
From: South Wales, UK
Registered: 2012-01-16
Posts: 1,253

Re: I want to say solved, but [FIXED] PolicyKit woes

OK, would you sit there and transcribe an entire TTY session? C&P without an xsession is not possible. I appreciate your position, but at least make it a reasonable one.

The failure was on the path to a fonts directory (not found). I can't find any reference to the path in any config files I examined (xorg.conf etc.)

Nevertheless, for all intents and purposes, startxfce4 does the same thing, and will get me to a working desktop, with the same authentication problems.

/var/log/lightdm/lightdm.log gives

[+0.02s] DEBUG: Logging to /var/log/lightdm/lightdm.log
[+0.02s] DEBUG: Starting Light Display Manager 1.18.3, UID=0 PID=542
[+0.02s] DEBUG: Loading configuration dirs from /usr/share/lightdm/lightdm.conf.d
[+0.02s] DEBUG: Loading configuration dirs from /usr/local/share/lightdm/lightdm.conf.d
[+0.02s] DEBUG: Loading configuration dirs from /etc/xdg/lightdm/lightdm.conf.d
[+0.02s] DEBUG: Loading configuration from /etc/lightdm/lightdm.conf
[+0.02s] DEBUG: Using D-Bus name org.freedesktop.DisplayManager
[+0.02s] DEBUG: Registered seat module xlocal
[+0.02s] DEBUG: Registered seat module xremote
[+0.02s] DEBUG: Registered seat module unity
[+0.02s] DEBUG: Monitoring logind for seats
[+0.02s] DEBUG: New seat added from logind: seat0
[+0.02s] DEBUG: Seat seat0: Loading properties from config section Seat:*
[+0.02s] DEBUG: Seat seat0: Starting
[+0.02s] DEBUG: Seat seat0: Creating user session
[+0.83s] DEBUG: Loading users from org.freedesktop.Accounts
[+0.83s] DEBUG: User /org/freedesktop/Accounts/User1000 added
[+0.84s] DEBUG: Seat seat0: Creating display server of type x
[+0.84s] DEBUG: Could not run plymouth --ping: Failed to execute child process "plymouth" (No such file or directory)
[+0.84s] DEBUG: Using VT 7
[+0.84s] DEBUG: Seat seat0: Starting local X display on VT 7
[+0.84s] DEBUG: DisplayServer x-0: Logging to /var/log/lightdm/x-0.log
[+0.84s] DEBUG: DisplayServer x-0: Writing X server authority to /run/lightdm/root/:0
[+0.84s] DEBUG: DisplayServer x-0: Launching X Server
[+0.84s] DEBUG: Launching process 571: /usr/sbin/X :0 -seat seat0 -auth /run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
[+0.84s] DEBUG: DisplayServer x-0: Waiting for ready signal from X server :0
[+0.84s] DEBUG: Acquired bus name org.freedesktop.DisplayManager
[+0.84s] DEBUG: Registering seat with bus path /org/freedesktop/DisplayManager/Seat0
[+2.36s] DEBUG: Got signal 10 from process 571
[+2.36s] DEBUG: DisplayServer x-0: Got signal from X server :0
[+2.36s] DEBUG: DisplayServer x-0: Connecting to XServer :0
[+2.36s] DEBUG: Seat seat0: Display server ready, starting session authentication
[+2.36s] DEBUG: Session pid=723: Started with service 'lightdm-autologin', username 'steve'
[+2.41s] DEBUG: Session pid=723: Authentication complete with return value 0: Success
[+2.41s] DEBUG: Seat seat0: Session authenticated, running command
[+2.41s] DEBUG: Registering session with bus path /org/freedesktop/DisplayManager/Session0
[+2.41s] DEBUG: Session pid=723: Running command /etc/lightdm/Xsession startxfce4
[+2.41s] DEBUG: Creating shared data directory /var/lib/lightdm-data/steve
[+2.41s] DEBUG: Session pid=723: Logging to .xsession-errors
[+27.43s] DEBUG: Activating VT 7

~/.xsession-errors is populated with wine d3d errors (and I accept that's my fault for playing Trackmania)

OK - after a clean boot - ~/xsession-errors

hp-systray is reference to an old, and no longer needed app. I should remove any startup commands. There may be clues in "(xfce4-session:860): xfce4-session-WARNING **: Unable to launch "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1" (specified by autostart/xfce-polkit-gnome-authentication-agent-1.desktop): Failed to execute child process "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1" (No such file or directory)
error: package '&' was not found" but this is off my experience.

Most of the other errors are errors I didn't know about, but can fix.

Failed to connect to bus: No such file or directory
xrdb:  "Xft.hintstyle" on line 10 overrides entry on line 7
xrdb:  "Xft.hinting" on line 11 overrides entry on line 6
gpg-agent[873]: WARNING: "--write-env-file" is an obsolete option - it has no effect
gpg-agent[874]: gpg-agent (GnuPG) 2.1.15 started

(xfce4-session:860): xfce4-session-WARNING **: gpg-agent returned no PID in the variables
Failed to run gnome-keyring-daemon: Failed to execute child process "gnome-keyring-daemon" (No such file or directory)

(xfce4-session:860): xfce4-session-WARNING **: Unable to launch "/usr/bin/hp-systray": Failed to execute child process "/usr/bin/hp-systray" (No such file or directory)
Connection failure: Connection refused
pa_context_connect() failed: Connection refused
Error: Error opening directory '/home/steve/>': No such file or directory
Error: Error opening directory '/dev/null': Not a directory
devmon: Unknown option &
        For help use: devmon --help

(xfce4-session:860): xfce4-session-WARNING **: Unable to launch "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1" (specified by autostart/xfce-polkit-gnome-authentication-agent-1.desktop): Failed to execute child process "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1" (No such file or directory)
error: package '&' was not found
/usr/bin/blueman-applet:15: PyGIWarning: Notify was imported without specifying a version first. Use gi.require_version('Notify', '0.7') before import to ensure that the right version gets loaded.
  from gi.repository import Notify

(cairo-dock:976): Gtk-WARNING **: Theme parsing error: <data>:7:1467: The :insensitive pseudo-class is deprecated. Use :disabled instead.

(cairo-dock:976): Gtk-WARNING **: Theme parsing error: <data>:7:3649: The :inconsistent pseudo-class is deprecated. Use :indeterminate instead.
/usr/lib/python2.7/site-packages/blueman/plugins/config/Gconf.py:21: PyGIWarning: GConf was imported without specifying a version first. Use gi.require_version('GConf', '2.0') before import to ensure that the right version gets loaded.
  from gi.repository import GConf

(tracker-miner-apps:1051): Tracker-WARNING **: Couldn't properly parse desktop file 'file:///usr/share/applications/docfetcher.desktop': 'Desktop file doesn't contain type'
/usr/lib/python2.7/site-packages/blueman/plugins/applet/AppIndicator.py:29: PyGIWarning: AppIndicator3 was imported without specifying a version first. Use gi.require_version('AppIndicator3', '0.1') before import to ensure that the right version gets loaded.
  from gi.repository import AppIndicator3 as girAppIndicator
Traceback (most recent call last):
  File "/opt/extras.ubuntu.com/pushbullet-indicator/bin/pushbullet-indicator", line 38, in <module>
    from pushbullet_indicator import main
  File "/opt/extras.ubuntu.com/pushbullet-indicator/share/pushbullet-indicator/pushbullet_indicator.py", line 65, in <module>
    from pushbullet_socket import PushBulletListener
  File "/opt/extras.ubuntu.com/pushbullet-indicator/share/pushbullet-indicator/pushbullet_socket.py", line 22, in <module>
    from ws4py.client.threadedclient import WebSocketClient
ImportError: No module named 'ws4py'
cat: /home/steve/.urserver/urserver.pid: No such file or directory
conky: Syntax error (/home/steve/.conkyrc_background:2: unexpected symbol near '#') while reading config file. 
conky: Assuming it's in old syntax and attempting conversion.
conky: desktop window (1600003) is subwindow of root window (2a1)
conky: window type - override
conky: drawing to created window (0x2a00001)
conky: drawing to double buffer
conky: forked to background, pid is 1548
conky: Syntax error (/home/steve/.conkyrc:2: unexpected symbol near '#') while reading config file. 
conky: Assuming it's in old syntax and attempting conversion.

conky: desktop window (1600003) is subwindow of root window (2a1)
conky: window type - desktop
conky: drawing to created window (0x2e00002)
conky: drawing to double buffer
conky: forked to background, pid is 1561


(tracker-miner-apps:1051): Tracker-WARNING **: Couldn't properly parse desktop file 'file:///home/steve/.local/share/applications/wine/Programs/MAXON/CINEMA%204D%2064%20Bit.desktop': 'Desktop file doesn't contain type'

Now, since you are sure I have a broken session, clues as to why (i.e. where to look) would be more helpful.

Oh, and to be clear:

$ lsb_release -drc
Description:	Arch Linux
Release:	rolling
Codename:	n/a

Last edited by Roken (2016-10-12 20:04:28)


Ryzen 5900X 12 core/24 thread - RTX 3090 FE 24 Gb, Asus Prime B450 Plus, 32Gb Corsair DDR4, Cooler Master N300 chassis, 5 HD (1 NvME PCI, 4SSD) + 1 x optical.
Linux user #545703

Offline

#18 2016-10-12 20:14:52

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: I want to say solved, but [FIXED] PolicyKit woes

Roken wrote:

OK, would you sit there and transcribe an entire TTY session? C&P without an xsession is not possible. I appreciate your position, but at least make it a reasonable one.

https://wiki.archlinux.org/index.php/Li … in_clients

Roken wrote:

Now, since you are sure I have a broken session, clues as to why (i.e. where to look) would be more helpful.

https://wiki.archlinux.org/index.php/Ge … ermissions

You have to simplify your issue: a display manager is adding more complexity, not less. Just get startx working with an active session and then build up from there.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#19 2016-10-12 20:17:24

seth
Member
Registered: 2012-09-03
Posts: 51,029

Re: I want to say solved, but [FIXED] PolicyKit woes

startx 2>&1 | tee starx.log

Error: Error opening directory '/home/steve/>': No such file or directory

WTF?
There seems to be quite some errors the way devmon in invoked, so this is likely not related.


Ok, so you have a session for user "steve" on set0, but the session info you posted before is broken (the session isn't tied to the user or seat)
Anyone taking bets on dbus-launch?

It will likely be called in startxfce4? ("which" it and compare that to the package installation - in case there's some shadow in $PATH)
For another cause, also check the xfce4 entry in /usr/share/xsessions.

Offline

#20 2016-10-13 18:22:44

Roken
Member
From: South Wales, UK
Registered: 2012-01-16
Posts: 1,253

Re: I want to say solved, but [FIXED] PolicyKit woes

seth wrote:
startx 2>&1 | tee starx.log

It will likely be called in startxfce4? ("which" it and compare that to the package installation - in case there's some shadow in $PATH)
For another cause, also check the xfce4 entry in /usr/share/xsessions.

OK, you may be on to something, though the problem is far from being solved.

There's no shadow in $PATH

However, swapping out startxfce4 for xfce4-session in /usr/sharr/xsessions then gets me two entries for xfce when I ps -ef, one is xfce4-session from xsessions, and one is still dbus-launch. If I kill the dbus-launch session I'm left with an (unusuable) xfce desktop. If I then kill that, it throws me back to the lightdm login, and logging in again gets me back to a full xfce desktop, except there's now only one process and it's not the dbus-launch one. A quick check with a DVD and it now automounts. Going to check a reboot in a mo and see if that asks for authentication (it shouldn't).

Now, my problem remains, I have no idea what is launching xfce4-session with dbus-launch, and a full filesystem check cannot find dbus-launch for xfce4 anywhere that should be used (there is still a reference in /etx/xdg/xfce4/xinitrc, but where it appears should not be called. Even when I comment out in those, I still get a dbus-launch, anyway.

Having got a "normal" xfce session, I have a similar problem with pulseaudio, with multiple processes, one being pulseaudio --start. Killing pulseaudio (across the board) and then restarting with pulseaudio-x11 gets it working normally again. Again, dbus-launch is to blame.

Perhaps another walk of the filesystem looking for startxfce4, xfce4-session and pulseaudio will get me closer (my previous walk searched for dbus-launch, but I'm thinking it's started by a binary now). Something to leave my computer doing tonight whilst I sleep.

EDIT: For xfce I can simply kill xfce4-session (sans dbus-launch) which gets me back to the lightdm login. Login and there's only one xfce4 process.

Last edited by Roken (2016-10-13 18:39:58)


Ryzen 5900X 12 core/24 thread - RTX 3090 FE 24 Gb, Asus Prime B450 Plus, 32Gb Corsair DDR4, Cooler Master N300 chassis, 5 HD (1 NvME PCI, 4SSD) + 1 x optical.
Linux user #545703

Offline

#21 2016-10-13 20:50:20

seth
Member
Registered: 2012-09-03
Posts: 51,029

Re: I want to say solved, but [FIXED] PolicyKit woes

Did you try to skip the ck-launch-session branch in /etc/xdg/xfce/xinitrc ?

Offline

#22 2016-10-14 05:38:01

Roken
Member
From: South Wales, UK
Registered: 2012-01-16
Posts: 1,253

Re: I want to say solved, but [FIXED] PolicyKit woes

seth wrote:

Did you try to skip the ck-launch-session branch in /etc/xdg/xfce/xinitrc ?

Yep. Doesn't make a difference. It seems dbus-launch may be hard coded in xfce4-session

https://bugs.debian.org/cgi-bin/bugrepo … bug=836061


Ryzen 5900X 12 core/24 thread - RTX 3090 FE 24 Gb, Asus Prime B450 Plus, 32Gb Corsair DDR4, Cooler Master N300 chassis, 5 HD (1 NvME PCI, 4SSD) + 1 x optical.
Linux user #545703

Offline

#23 2016-10-14 11:37:02

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,412
Website

Re: I want to say solved, but [FIXED] PolicyKit woes

Knowing XFCE, it will take them 1 year to respond and two more to get it fixed. So until then you can try:

1. Find out why DBUS_SESSION_BUS_ADDRESS is not set when xfce4-session is launched;
2. Try "dbus-run-session xfce4-session";
3. Get rid of xfce4-session and replace it with your own launcher: considering session management never worked in XFCE anyway, the only downside I'm aware of is that you need to read accessibility settings by hand (e.g., using xmlstarlet) and set GTK_MODULES accordingly;
4. Rebuild dbus with autolaunch support.

Last edited by Alad (2016-10-14 11:43:26)


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

#24 2016-10-14 13:38:56

toz
Member
Registered: 2011-10-28
Posts: 497

Re: I want to say solved, but [FIXED] PolicyKit woes

As a sanity check, I have a number of Xfce on Arch installs and have not run into this issue on any of them. No DM, start X via "startx" with ~/.xinitrc first sourcing files in /etc/X11/xinit/xinitrc.d, then running startxfce4. DBUS_SESSION_BUS_ADDRESS is set properly and policy kit works fine (can log reboot and restart without any password prompting) with polkit-gnome.

My results from "loginctl show-session $XDG_SESSION_ID" are different though:

$ loginctl show-session $XDG_SESSION_ID
Id=c1
User=1000
Name=toz
Timestamp=Mon 2016-10-10 20:51:45 EDT
TimestampMonotonic=13903086
VTNr=1
Seat=seat0
TTY=tty1
Remote=no
Service=login
Scope=session-c1.scope
Leader=321
Audit=0
Type=tty
Class=user
Active=yes
State=active
IdleHint=yes
IdleSinceHint=1476147105698201
IdleSinceHintMonotonic=0
LockedHint=no

...is your $XDG_SESSION_ID environment variable being set?

$ env | grep XDG
XDG_VTNR=1
XDG_SESSION_ID=c1
XDG_MENU_PREFIX=xfce-
XDG_CONFIG_DIRS=/etc/xdg
XDG_SEAT=seat0
XDG_DATA_DIRS=/usr/local/share:/usr/share
XDG_RUNTIME_DIR=/run/user/1000
XDG_CURRENT_DESKTOP=XFCE

Online

#25 2016-10-14 20:12:16

Roken
Member
From: South Wales, UK
Registered: 2012-01-16
Posts: 1,253

Re: I want to say solved, but [FIXED] PolicyKit woes

OK. I'm starting to lose patience.

I tried it Toz's way. Disabled the DM, and stripped ~/.xinitrc to the bare minimum (/etc/X11/xinit/xinitrc.d and startxfce4), then rebooted and started with startx. I get the desktop, and ps -ef | grep xfce4-session still has the dbus-launch session. I replaced startxfce4 with xfce-session. Same result.

XDG_SESSION_ID is being set (differs from yours because I'm back to lightdm now, but it IS being set).

I still have the situation that killing the non dbus-session send me back to the lighdm login, which then starts xfce4 without dbus-launch, so I'm veering away from lightdm being the problem.

Now, maybe related, but whether starting the desktop, or disabling the DM and logging in at TTY, the login takes an unusual length of time on the first login (10 - 15 seconds). After the first login, it's instant (even on a different TTY), which suggests something else PAM related may be getting in the way. Now, whilst I've been around linux a long time, debugging this is out of my experience. I hadn't really noticed until I started playing with manually starting up (I usually power up and go put the kettle on), but watching now, the startup from TTY to desktop has certainly gained an extra 15 seconds.

For completeness, having killed the offending sessions and re-logged in:

$ loginctl show-session $XDG_SESSION_ID
Id=c3
User=1000
Name=steve
Timestamp=Fri 2016-10-14 20:59:35 BST
TimestampMonotonic=63069833
VTNr=7
Seat=seat0
Display=:0
Remote=no
Service=lightdm
Desktop=xfce
Scope=session-c3.scope
Leader=7057
Audit=0
Type=x11
Class=user
Active=yes
State=active
IdleHint=no
IdleSinceHint=0
IdleSinceHintMonotonic=0
LockedHint=no
$ env | grep XDG
XDG_VTNR=7
XDG_SESSION_ID=c3
XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/steve
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session1
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
XDG_SESSION_TYPE=x11
XDG_SEAT=seat0
XDG_SESSION_DESKTOP=xfce
XDG_RUNTIME_DIR=/run/user/1000
XDG_CURRENT_DESKTOP=XFCE

Ryzen 5900X 12 core/24 thread - RTX 3090 FE 24 Gb, Asus Prime B450 Plus, 32Gb Corsair DDR4, Cooler Master N300 chassis, 5 HD (1 NvME PCI, 4SSD) + 1 x optical.
Linux user #545703

Offline

Board footer

Powered by FluxBB