You are not logged in.

#1 2012-01-04 13:18:52

matty32669
Member
Registered: 2012-01-04
Posts: 6

[solved] Networkmanager issues with i3

Hi,

I am running 64-bit arch. I'm receiving the infamous  nm-applet message:

 
WARNING **: Failed to add/activate connection: (32) Insufficient privileges.

I am running the i3 window manager. Here is my .xinitrc:

#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)

if [ -d /etc/X11/xinit/xinitrc.d ]; then
  for f in /etc/X11/xinit/xinitrc.d/*; do
    [ -x "$f" ] && . "$f"
  done
  unset f
fi

/usr/bin/xscreensaver -no-splash &

# Re-map the keyboard
xmodmap .xmodmap

#set the wallpaper.
feh --bg-fill /usr/share/archwall/Arch-Space3.jpg

#Set the keymap
setxkbmap gb


# exec gnome-session
# exec startkde
# exec startxfce4
exec ck-launch-session i3
# ...or the Window Manager of your choice

I am sure that I'm running a console-kit session, here is the output of ck-list-sessions:

Session1:
        unix-user = '1000'
        realname = 'Matthew Leach'
        seat = 'Seat1'
        session-type = ''
        active = FALSE
        x11-display = ''
        x11-display-device = ''
        display-device = '/dev/tty1'
        remote-host-name = ''
        is-local = TRUE
        on-since = '2012-01-04T12:01:30.756826Z'
        login-session-id = '2'
        idle-since-hint = '2012-01-04T12:02:02.649990Z'
Session2:
        unix-user = '1000'
        realname = 'Matthew Leach'
        seat = 'Seat1'
        session-type = ''
        active = TRUE
        x11-display = ':0'
        x11-display-device = '/dev/tty7'
        display-device = '/dev/tty1'
        remote-host-name = ''
        is-local = TRUE
        on-since = '2012-01-04T12:01:35.895430Z'
        login-session-id = '2'

I'm at a bit of a loss as to what I've setup wrong. Any help would be appreciated.

Last edited by matty32669 (2012-01-04 20:17:01)

Offline

#2 2012-01-04 14:28:31

matty32669
Member
Registered: 2012-01-04
Posts: 6

Re: [solved] Networkmanager issues with i3

I've not managed to change the error message slightly to:

WARNING **: Failed to add/activate connection: (32) Not authorized to control networking.

I noticed that when logging in through tty1, this was starting a console kit session (see above), To test that this is not the problem, I logged in on tty1 and then restarted the dbus daemon

sudo /etc/rc.d/dbus restart

after running startx and i3 loading, I took a look at ck-list-sessions:

Session1:
        unix-user = '1000'
        realname = 'Matthew Leach'
        seat = 'Seat2'
        session-type = ''
        active = FALSE
        x11-display = ':0'
        x11-display-device = '/dev/tty7'
        display-device = '/dev/tty1'
        remote-host-name = ''
        is-local = FALSE
        on-since = '2012-01-04T14:23:27.380928Z'
        login-session-id = '5'

I'm not sure if a tty login should start a console kit session? If not how do I prevent it?

I'm also still receiving an error from nm-applet. Any ideas?

Offline

#3 2012-01-04 14:36:29

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: [solved] Networkmanager issues with i3

try to comment out the if/for block and use exec ck-launch-session dbus-launch i3


Give what you have. To someone, it may be better than you dare to think.

Offline

#4 2012-01-04 14:45:20

matty32669
Member
Registered: 2012-01-04
Posts: 6

Re: [solved] Networkmanager issues with i3

Thanks for the suggestion. Unfortunately, that didn't make any difference, I still receive the error:

WARNING **: Failed to add/activate connection: (32) Not authorized to control networking.

Offline

#5 2012-01-04 14:53:25

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: [solved] Networkmanager issues with i3

the idea is that your ck-list-sessions should return active and is-local TRUE, but yours is FALSE.

this can happen because:
1) dbus not started
2) different kernel that doesn't have the right facility
3) wrong way to start i3


Give what you have. To someone, it may be better than you dare to think.

Offline

#6 2012-01-04 15:10:41

matty32669
Member
Registered: 2012-01-04
Posts: 6

Re: [solved] Networkmanager issues with i3

thanks for the advice.

Hmmm, when I don't restart dbus, but just login and startx, I get:

Session3:
        unix-user = '1000'
        realname = 'Matthew Leach'
        seat = 'Seat1'
        session-type = ''
        active = FALSE
        x11-display = ''
        x11-display-device = ''
        display-device = '/dev/tty1'
        remote-host-name = ''
        is-local = TRUE
        on-since = '2012-01-04T15:06:15.105177Z'
        login-session-id = '3'
Session4:
        unix-user = '1000'
        realname = 'Matthew Leach'
        seat = 'Seat1'
        session-type = ''
        active = TRUE
        x11-display = ':0'
        x11-display-device = '/dev/tty7'
        display-device = '/dev/tty1'
        remote-host-name = ''
        is-local = TRUE
        on-since = '2012-01-04T15:06:23.753545Z'

Session 4's active and is-local are both true, however is the problem caused by having two sessions?

Should logging-in on a tty start a new session?

Also I don't appear to have a polkit agent running, output of 'ps aux | grep pol':

root       921  0.0  0.1 123240  5896 ?        Sl   14:42   0:00 /usr/lib/polkit-1/polkitd --no-debug
matthew   2411  0.0  0.0   8536  1048 pts/1    S+   15:19   0:00 grep --color=auto pol

I do have polkit-gnome installed. do i need to start it in my .xinitrc? If so, how do I do it? (I can't seem to find how to do it on the wiki).

Last edited by matty32669 (2012-01-04 15:21:41)

Offline

#7 2012-01-04 17:46:24

matty32669
Member
Registered: 2012-01-04
Posts: 6

Re: [solved] Networkmanager issues with i3

Ok, I manged to get this working. I'm not sure if this is the 'correct' way of doing it, but here it goes:

The .xinitrc should look like this:

#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)

#if [ -d /etc/X11/xinit/xinitrc.d ]; then
#  for f in /etc/X11/xinit/xinitrc.d/*; do
#    [ -x "$f" ] && . "$f"
#  done
#  unset f
#fi

/usr/bin/xscreensaver -no-splash &

#set the wallpaper.
feh --bg-fill /usr/share/archwall/Arch-Black.png

#Set the keymap
setxkbmap gb

# Re-map the keyboard
xmodmap .xmodmap

# exec gnome-session
# exec startkde
# exec startxfce4
exec ck-launch-session dbus-launch i3
# ...or the Window Manager of your choice

I actually got i3 to start nm-applet and the gnome-polkit agent once the ck-launch-session has been ran. To do this I just added these lines to my .i3/config

exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec --no-startup-id nm-applet

As I say, it seems like a bit of a 'hack' but I think it works. Also, not sure if this should happen, but nm-applet requires me to enter my password to perform an operation?

Offline

#8 2012-01-04 17:50:02

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: [solved] Networkmanager issues with i3

perfect, i forgot to mention about polkit-gnome

yes, it requires your password, if your username is in wheel group, or root pasword if not. That's how the upstream rules are but you can change that if you don't like it


Give what you have. To someone, it may be better than you dare to think.

Offline

#9 2012-01-04 20:16:26

matty32669
Member
Registered: 2012-01-04
Posts: 6

Re: [solved] Networkmanager issues with i3

Great! Thanks for the help!

Offline

Board footer

Powered by FluxBB