network-manager-applet missing when using NX

http://ubuntuforums.org/showthread.php?t=1877692

STEP 1: Run ConsoleKit on startup

you need this line in ~/.xinitrc (that's in your home dir)

Code:

exec ck-launch-session dbus-launch gnome-session

I didn't have that file, and needed to create it.

STEP 2:
You need to tell NetworkManager and nm-applet to submit to consolekit

in /etc/dbus-1/system.d/NetworkManager.conf you need to insert the following section. Replace ###### with your username:

Code:





a similar edit is needed in /etc/dbus-1/system.d/nm-applet.conf:
Code:


STEP 4:

You now need to add this instance of nm-applet to Polkit. First off, follow the instructions in the thread referred to above.:

In my case, it's NetworkManager. After much trawling, I discovered that polkit-1 reads from /usr/share/polkit-1/actions/

in that dir, are XML files, which correspond to the program which is locked down. In my case, it was /usr/share/polkit-1/actions/org.freedesktop.network-manager-settings.system.policy


If you open this file, you will see:

Code:



NetworkManager
http://www.gnome.org/projects/NetworkManager
nm-icon


Modify system connections
System policy prevents modification of system settings

no
yes

the secret is the element. Change "no" to "yes" (there are a few instances throughout the file. I changed them all). Logout, login, and presto ! the "Edit" button is now active. Now I imagine using one of the "auth_admin" type values would be a better idea. But since I can't find a definitive explanation of what they do, I am leaving it as that. And if some wiseass dares to reply "It's obvious, dimwit", I'll just question the wisdom of playing around with such a sensitive part of the system on intuition.



STEP 5:

then, you need to create a file:

/etc/polkit-1/localauthority/50-local.d/10-org-freedesktop-network-manager-settings.pkla

and add the following, again ###### = your user name:
Code:

Identity=unix-user:######
Action=org.freedesktop.network-manager-settings.system.modify
ResultAny=yes
ResultInactive=yes
ResultActive=yes

logout, login, and you'll find the nm-applet is there *AND* you can edit connections.