You are not logged in.

#26 2012-09-06 07:57:27

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 849

Re: How to replace Consolekit with systemd-loginctl

Well, i guess polkit will be upgraded when systemd will be our default init systemd. So, polkit should remain the same for a long (short? let's hope) time.
Gdm and gnome-session will be upgraded soon, when 3.6 comes out...

Offline

#27 2012-09-08 06:48:02

d3Xt3r
Member
Registered: 2012-09-08
Posts: 19

Re: How to replace Consolekit with systemd-loginctl

Hi all, I'm in the same situation as Unia:

- Pure systemd setup, done exactly as per instructions in wiki
- Rebuilt polkit with systemd enabled
- Removed ConsoleKit

But I still get prompted for a password when mounting external drives, connecting to the network, and shutdown/reboot/suspend. I'm not using any DE (just Openbox) nor any DM (had issues with LXDM after systemd so uninstalled it), and I'm starting X from a tty using exec startx --vt  $(fgconsole)

Any ideas how to make this loginctl stuff work? I've even tried tomegun's polkit with no luck (back to rebuilt polkit now).

Last edited by d3Xt3r (2012-09-08 06:52:29)

Offline

#28 2012-09-08 07:21:55

Runiq
Member
From: Germany
Registered: 2008-10-29
Posts: 1,053

Re: How to replace Consolekit with systemd-loginctl

I'm currently using gdm to login I don't have any ideas at the moment, but I'll see if I can get mounting to work without a DM in the evening.

Offline

#29 2012-09-08 16:53:19

jouke
Member
Registered: 2009-10-14
Posts: 72

Re: How to replace Consolekit with systemd-loginctl

It looks like we're trying to do similar things: Automatic X login without a DM. Those scripts might be useful to some of you.

Offline

#30 2012-09-08 18:27:22

ratcheer
Member
Registered: 2011-10-09
Posts: 924

Re: How to replace Consolekit with systemd-loginctl

Alucryd wrote:

Getting rid of console-kit seems much of a hassle indeed, I guess I can live with it for now.

I got rid of consolekit this morning. I'm having at least a couple of problems. One is trivial. I can no longer reboot from my normal id, I have to use sudo. I understand that and can live with it.

The other one is not so easy to live with, although I think it may be for the same reason. nm-applet "thinks" there are no valid active connections, even though the network is working just fine. If I kill it and start it manually as root, it works correctly. But I've tried adding it to the system wide Openbox startup (/etc/xdg/openbox/sutostart) and then it starts two instances, neither of which see the network connections. Any suggestions?

Tim

Offline

#31 2012-09-08 18:29:13

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: How to replace Consolekit with systemd-loginctl

ratcheer wrote:

The other one is not so easy to live with, although I think it may be for the same reason. nm-applet "thinks" there are no valid active connections, even though the network is working just fine. If I kill it and start it manually as root, it works correctly. But I've tried adding it to the system wide Openbox startup (/etc/xdg/openbox/sutostart) and then it starts two instances, neither of which see the network connections. Any suggestions?

Tim

Rebuild it with systemd support.


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#32 2012-09-08 18:47:56

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 849

Re: How to replace Consolekit with systemd-loginctl

@ratcheer: i guess you're not starting a user session: post the output of

loginctl

and

systemd-cgls systemd:/user

Offline

#33 2012-09-09 10:32:49

d3Xt3r
Member
Registered: 2012-09-08
Posts: 19

Re: How to replace Consolekit with systemd-loginctl

nierro wrote:

@ratcheer: i guess you're not starting a user session: post the output of

loginctl

and

systemd-cgls systemd:/user
dexter@Inspiron-1122 ~ % loginctl
   SESSION        UID USER             SEAT            
         1       1000 dexter           seat0           

1 sessions listed.


dexter@Inspiron-1122 ~ % systemd-cgls systemd:/user
systemd:/user:
<E2><94><94> dexter
  <E2><94><94> 1
    <E2><94><9C>  310 login -- dexter
    <E2><94><9C>  327 /bin/sh /usr/bin/startx --vt 1
    <E2><94><9C>  383 xinit xterm --vt 1 -- /etc/X11/xinit/xserverrc :0 -auth /tmp/serverauth.W2gb73NZLO
    <E2><94><9C>  384 /usr/bin/X -nolisten tcp :0 -auth /tmp/serverauth.W2gb73NZLO
    <E2><94><9C>  387 /usr/bin/openbox --startup /usr/lib/openbox/openbox-autostart OPENBOX
    <E2><94><9C>  392 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
    <E2><94><9C>  401 compton -fFb -i 0.8
    <E2><94><9C>  403 tint2
    <E2><94><9C>  404 python2 /usr/bin/guake
    <E2><94><9C>  405 sh /home/dexter/.config/openbox/autostart
    <E2><94><9C>  406 volumeicon -b
    <E2><94><9C>  411 synapse --startup
    <E2><94><9C>  414 /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
    <E2><94><9C>  415 zeitgeist-datahub
    <E2><94><9C>  423 /usr/bin/zeitgeist-daemon
    <E2><94><9C>  467 /usr/bin/nm-applet --sm-disable

Last edited by d3Xt3r (2012-09-09 10:33:42)

Offline

#34 2012-09-09 10:38:47

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 849

Re: How to replace Consolekit with systemd-loginctl

Uhm strange, because i was having the same problems(nm-applet and sudo for hibernate,reboot and poweroff), while i was starting xfce from a .service, that was ran as root. So i did not have the right pam session for my user.

Offline

#35 2012-09-10 02:15:12

czubek
Banned
Registered: 2012-03-08
Posts: 141

Re: How to replace Consolekit with systemd-loginctl

Rebuilt polkit with systemd support and no longer need sudo prior to systemctl {reboot or poweroff}. Trying to rebuild networkmanager with systemd enabled results in persistent failures, excerpt below.

In file included from nm-enum-types.c:94:0:
../../src/wimax/iwmxsdk.h:25:29: fatal error: wimax/WiMaxType.h: No such file or directory
compilation terminated.
make[5]: *** [libnm_generated_la-nm-enum-types.lo] Error 1
make[5]: Leaving directory `/home/chris/ABS/networkmanager/src/NetworkManager-0.9.4.0/src/generated'
make[4]: *** [all] Error 2
make[4]: Leaving directory `/home/chris/ABS/networkmanager/src/NetworkManager-0.9.4.0/src/generated'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/chris/ABS/networkmanager/src/NetworkManager-0.9.4.0/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/chris/ABS/networkmanager/src/NetworkManager-0.9.4.0/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/chris/ABS/networkmanager/src/NetworkManager-0.9.4.0'
make: *** [all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...

My situation is same as ratcheer, and my only solution is to put sudo before nm-applet launch in autostart.

Offline

#36 2012-09-10 14:37:57

bwat47
Member
Registered: 2009-10-07
Posts: 638

Re: How to replace Consolekit with systemd-loginctl

i'm having networkmanager issues too. I was able to sucessfully compile it with --enable-systemd (also compiled gdm/gnome-session/and polkit with systemd support). After doing that and removing consolekit networkmanager will still connect to networks, but it shows the wrong icon in gnome-shell and the advanced options button in network settings is greyed out.

Offline

#37 2012-09-11 00:45:08

czubek
Banned
Registered: 2012-03-08
Posts: 141

Re: How to replace Consolekit with systemd-loginctl

I re-built polkit w/systemd, I did polkit pkla files, I followed start x at login, I followed autologin to VC w/systemd but the only solution that enabled me to manipulate nm-applet and accordingly networkmanager was to put sudo before the nm-applet command in openbox autostart.

Offline

#38 2012-09-11 01:53:23

ratcheer
Member
Registered: 2011-10-09
Posts: 924

Re: How to replace Consolekit with systemd-loginctl

I gave up and just put consolekit back. My system is working normally again.

Tim

Offline

#39 2012-09-11 09:03:27

d3Xt3r
Member
Registered: 2012-09-08
Posts: 19

Re: How to replace Consolekit with systemd-loginctl

czubek wrote:

I re-built polkit w/systemd, I did polkit pkla files, I followed start x at login, I followed autologin to VC w/systemd but the only solution that enabled me to manipulate nm-applet and accordingly networkmanager was to put sudo before the nm-applet command in openbox autostart.

What about mounting/unmounting drives from the file manager?

Offline

#40 2012-09-11 11:01:31

czubek
Banned
Registered: 2012-03-08
Posts: 141

Re: How to replace Consolekit with systemd-loginctl

@d3xt3r,

I inserted a pkla file incorporating udisk2.

/etc/polkit-1/localauthority/50-local.d/org.freedesktop.udisks2.pkla
-------------------------------------------------------
[Storage Permissions]
Identity=unix-group:storage
Action=org.freedesktop.udisks2.filesystem-mount;org.freedesktop.udisks2.modify-device
ResultAny=yes
ResultInactive=yes
ResultActive=yes

I believe that's right, (I'm at work on my PC not at home). I got the pkla from the polkit wiki. I am able to mount the USB sticks, USB CDReader, sony-ericsson cellphone and read/manipulate them. The eject option is available in pcmanfm but the mount option is greyed out. Regardless, they work. I eject the device when done, (probably wrong). I will confirm if there was more that I did but that problem was quick work compared to networkmanager.

One thing I noticed. I inadvertently reinstalled polkit w/o systemd enabled and my systemctl {reboot & poweroff} would not work. It needed sudo before the commands again. I re-built polkit w/systemd and enabled systemctl polkitd.service and they now work w/o sudo. Alas, not networkmanager.

Check the pcmanfm wiki. That storage pkla seems better. I plan to try tonight. Pcmanfm wiki makes several references to consolekit but none to systemd.

I require gvfs and gvfs-smb to access my ubuntu server and udisks2 requires the same. Pcmanfm requires libfm which is also required by udisks2. So I have both installed and bot have the pkla files indicated in pcmanfm wiki. pcmanfm mount usb drive is still greyed out, network mwnwger still needs sudo before nm-applet in autostart and this is supposed to be simple. i'M ready to reinstall consolekit, but I'll hang on for a few more weeks. If it looks like it will get fixed, then I simply do a wipe and re-do.

Last edited by czubek (2012-09-11 21:50:42)

Offline

#41 2012-09-12 09:46:47

d3Xt3r
Member
Registered: 2012-09-08
Posts: 19

Re: How to replace Consolekit with systemd-loginctl

czubek wrote:

@d3xt3r,

I inserted a pkla file incorporating udisk2.

/etc/polkit-1/localauthority/50-local.d/org.freedesktop.udisks2.pkla
-------------------------------------------------------
[Storage Permissions]
Identity=unix-group:storage
Action=org.freedesktop.udisks2.filesystem-mount;org.freedesktop.udisks2.modify-device
ResultAny=yes
ResultInactive=yes
ResultActive=yes

I believe that's right, (I'm at work on my PC not at home). I got the pkla from the polkit wiki. I am able to mount the USB sticks, USB CDReader, sony-ericsson cellphone and read/manipulate them. The eject option is available in pcmanfm but the mount option is greyed out. Regardless, they work. I eject the device when done, (probably wrong). I will confirm if there was more that I did but that problem was quick work compared to networkmanager.

One thing I noticed. I inadvertently reinstalled polkit w/o systemd enabled and my systemctl {reboot & poweroff} would not work. It needed sudo before the commands again. I re-built polkit w/systemd and enabled systemctl polkitd.service and they now work w/o sudo. Alas, not networkmanager.

Check the pcmanfm wiki. That storage pkla seems better. I plan to try tonight. Pcmanfm wiki makes several references to consolekit but none to systemd.

I require gvfs and gvfs-smb to access my ubuntu server and udisks2 requires the same. Pcmanfm requires libfm which is also required by udisks2. So I have both installed and bot have the pkla files indicated in pcmanfm wiki. pcmanfm mount usb drive is still greyed out, network mwnwger still needs sudo before nm-applet in autostart and this is supposed to be simple. i'M ready to reinstall consolekit, but I'll hang on for a few more weeks. If it looks like it will get fixed, then I simply do a wipe and re-do.


Thanks a ton! I deleted the 55-myconf.pkla I had and created the pkla you mentioned. Then I rebuilt ABS polkit to be on the safe side. I also updated my system, and noticed that there were new updates for NetworkManager. So as a final result, I'm able to connect to networks without a password, and also mount/unmount removables without a password!

Unfortunately, reboot/suspend still needs sudo to work. Yes, I'm a member of the 'power' group. Would be great if the last piece of this puzzle fell into place.. smile

Here's my pkla:

/etc/polkit-1/localauthority/org.freedesktop.upower.pkla:
-------------------------------------------------------
[Suspend/hibernate permissions]
Identity=unix-group:power
Action=org.freedesktop.upower.hibernate;org.freedesktop.upower.suspend
ResultAny=yes
ResultInactive=yes
ResultActive=yes

Last edited by d3Xt3r (2012-09-12 09:49:00)

Offline

#42 2012-09-12 10:41:37

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 849

Re: How to replace Consolekit with systemd-loginctl

When you're prompted with the password request, check if org.freedesktop.upower.* is the right action. (may be it is org.freedesktop.UPower.* ).
EDIT: yes, i'm pretty sure it is, so change your .pkla in this way:

[Suspend/hibernate permissions]
Identity=unix-group:power
Action=org.freedesktop.UPower.*;
ResultAny=yes
ResultInactive=yes
ResultActive=yes

Last edited by nierro (2012-09-12 10:43:05)

Offline

#43 2012-09-12 14:51:53

czubek
Banned
Registered: 2012-03-08
Posts: 141

Re: How to replace Consolekit with systemd-loginctl

@d3Xt3r

My level of knowledge of linux pretty much equates to stumbling around in the dark. I would hate for you to do damage to your system based on advise I may provide. Please double-check.

czubek

Offline

#44 2012-09-13 08:32:45

d3Xt3r
Member
Registered: 2012-09-08
Posts: 19

Re: How to replace Consolekit with systemd-loginctl

nierro wrote:

When you're prompted with the password request, check if org.freedesktop.upower.* is the right action. (may be it is org.freedesktop.UPower.* ).
EDIT: yes, i'm pretty sure it is, so change your .pkla in this way:

[Suspend/hibernate permissions]
Identity=unix-group:power
Action=org.freedesktop.UPower.*;
ResultAny=yes
ResultInactive=yes
ResultActive=yes

Awesome, thanks for the hint! Actually it was .login1.*, so I changed my pkla like this:

/etc/polkit-1/localauthority/50-local.d/org.freedesktop.login1.pkla
------------------------------------------------------------------------------------
[Suspend/hibernate permissions]
Identity=unix-group:power
Action=org.freedesktop.login1.hibernate;org.freedesktop.login1.suspend;org.freedesktop.login1.reboot;org.freedesktop.login1.power-off
ResultAny=yes
ResultInactive=yes
ResultActive=yes

And now I'm able to suspend/reboot without a password and without sudo too!

Thanks everyone for your help! Life is back to normal again. smile

Last edited by d3Xt3r (2012-09-13 08:34:34)

Offline

#45 2012-09-13 16:10:54

engelus
Member
From: Salta - Argentina
Registered: 2011-06-11
Posts: 46

Re: How to replace Consolekit with systemd-loginctl

Thanks so much for this post, I was able to get rid of consolekit rebuild as you said polkit with systemd support and in my system I had to rebuild slim and oblogout without consolekit and with systemd support. In my case I didnt have to change any polkit file maybe because I am using a LM.

Offline

Board footer

Powered by FluxBB