Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Failing LXDE + networkmanager + nm-applet [Solved]
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3644

PostPosted: Sun Feb 07, 2010 1:20 pm    Post subject: Failing LXDE + networkmanager + nm-applet [Solved] Reply with quote

Hi,
I"m a newbie to Gentoo who's trying to have a graphical support for VPN connection/disconnection within LXDE.
I've installed the required portages (LXDE, networkmanager, nm-applet) with the following settings :
Code:
emerge --info
Portage 2.1.7.16 (default/linux/x86/10.0, gcc-4.3.4, glibc-2.10.1-r1, 2.6.31-gentoo-r6 i586)
=================================================================
System uname: Linux-2.6.31-gentoo-r6-i586-AMD-K6-tm-_3D_processor-with-gentoo-1.12.13
Timestamp of tree: Sun, 31 Jan 2010 17:15:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     4.0_p35
dev-java/java-config: 2.1.10
dev-lang/python:     2.6.4
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA dlj-1.1"
CBUILD="i586-pc-linux-gnu"
CFLAGS="-O2 -march=k6-2 -pipe -mmmx -m3dnow -fomit-frame-pointer"
CHOST="i586-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=k6-2 -pipe -mmmx -m3dnow -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests ccache distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.tiscali.nl/ http://gentoo.mneisen.org/ http://de-mirror.org/distro/gentoo/"
LANG="fr_FR@euro"
LDFLAGS="-Wl,-O1"
LINGUAS="fr"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_COMPRESS="lzma"
PORTAGE_COMPRESS_FLAGS="-e"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="acl berkdb bzip2 cli cracklib crypt cups cxx dri fortran gdbm gpm iconv modules mudflap ncurses nls nptl nptlonly openmp pam pcre perl pppd python readline reflection session spl ssl sysfs tcpd unicode x86 xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="fr" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa via vmware voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
along with
Code:
cat /etc/portage/package.use
lxde-base/lxde-meta X
net-p2p/vuze cairo xulrunner
net-misc/networkmanager dbus
gnome-extra/nm-applet gnome
sys-apps/dbus X
which seems to be required minimum for a successful install as well as lack of errors while starting/stopping LXDE. Once LXDE is started I can monitor running processes as follows :
Code:
ps -A
  PID TTY          TIME CMD
    1 ?        00:00:00 init
    2 ?        00:00:00 kthreadd
    3 ?        00:00:00 ksoftirqd/0
    4 ?        00:00:00 events/0
    5 ?        00:00:00 khelper
    8 ?        00:00:00 async/mgr
  165 ?        00:00:00 kblockd/0
  168 ?        00:00:00 kacpid
  169 ?        00:00:00 kacpi_notify
  170 ?        00:00:00 kacpi_hotplug
  209 ?        00:00:00 ksuspend_usbd
  213 ?        00:00:00 khubd
  216 ?        00:00:00 kseriod
  257 ?        00:00:00 pdflush
  258 ?        00:00:00 pdflush
  259 ?        00:00:00 kswapd0
  309 ?        00:00:00 aio/0
  321 ?        00:00:00 nfsiod
  327 ?        00:00:00 cifsoplockd
  337 ?        00:00:00 crypto/0
  509 ?        00:00:00 kpsmoused
  528 ?        00:00:00 usbhid_resumer
  612 ?        00:00:00 rpciod/0
  619 ?        00:00:00 kjournald
  709 ?        00:00:00 udevd
 2370 ?        00:00:00 syslog-ng
 2371 ?        00:00:00 syslog-ng
 2431 ?        00:00:00 dbus-daemon
 2490 ?        00:00:00 gpm
 3114 ?        00:00:00 sshd
 3175 ?        00:00:00 cron
 3243 tty2     00:00:00 agetty
 3244 tty3     00:00:00 agetty
 3245 tty4     00:00:00 agetty
 3246 tty5     00:00:00 agetty
 3247 tty6     00:00:00 agetty
 3276 ?        00:00:01 sshd
 3281 pts/0    00:00:00 bash
 3334 tty1     00:00:00 login
 3335 tty1     00:00:00 bash
 3390 ?        00:00:00 nm-system-setti
 3534 tty1     00:00:00 startx
 3550 tty1     00:00:00 xinit
 3551 tty7     00:00:02 X
 3554 tty1     00:00:00 lxsession
 3555 tty1     00:00:00 openbox
 3558 tty1     00:00:01 lxpanel
 3559 tty1     00:00:00 pcmanfm
 3562 tty1     00:00:00 nm-applet
 3565 ?        00:00:00 gam_server
 3567 tty1     00:00:00 menu-cached
 3576 tty1     00:00:00 dbus-launch
 3578 ?        00:00:00 dbus-daemon
 3580 ?        00:00:00 notification-da
 3582 ?        00:00:00 gconfd-2
 3583 pts/0    00:00:00 ps
Everything runs under the root account, on a fresh installed Gentoo.
However, under LXDE I have no access to nay network related graphical interface.

Although my aim seems technically legitimate, it may not straightforwardly work out of the box. Any advice please ?

Thanks for your attention.


Last edited by CaptainBlood on Sun Feb 07, 2010 9:02 pm; edited 1 time in total
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3644

PostPosted: Sun Feb 07, 2010 2:24 pm    Post subject: Reply with quote

Self replying :
My bad, like in topic https://forums.gentoo.org/viewtopic-t-808123-highlight-networkmanager.html, I've forgot to run /etc/init.d/NetWorkManager. Now applet is available, at least. For the moment it says no connection despite I know network is up.
I'll keep you informed, and any advice is welcome still.

Bye.
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3644

PostPosted: Sun Feb 07, 2010 3:03 pm    Post subject: Reply with quote

Follow-up :
Because of nm-applet warning regarding dbus connection visible on console after LXDE logoff, I removed the dbus with
Code:
rc-update -d dbus(d) default

Consequently, mouse was not working anymore after reboot, even from gpm in text mode. Nevertheless I noticed that someone was still starting dbus and hal demon (likely NetworkManager). Reason for which I decided to
Code:
rc-update -a hald default

After a reboot, mouse was back again, nm-applet animated it-self when I requested it to connect. After 15 seconds or so, it finally came back to its original disconnected status display.

My problem is that I know from boot that network is working. Its there any way to have this boot time network status properly reported (by network manager ?) in nm-applet ?

Thanks for your attention.
Back to top
View user's profile Send private message
Rexilion
Veteran
Veteran


Joined: 17 Mar 2009
Posts: 1044

PostPosted: Sun Feb 07, 2010 3:42 pm    Post subject: Reply with quote

CaptainBlood wrote:
Follow-up :
Because of nm-applet warning regarding dbus connection visible on console after LXDE logoff, I removed the dbus with
Code:
rc-update -d dbus(d) default

Consequently, mouse was not working anymore after reboot, even from gpm in text mode. Nevertheless I noticed that someone was still starting dbus and hal demon (likely NetworkManager). Reason for which I decided to
Code:
rc-update -a hald default

After a reboot, mouse was back again, nm-applet animated it-self when I requested it to connect. After 15 seconds or so, it finally came back to its original disconnected status display.

My problem is that I know from boot that network is working. Its there any way to have this boot time network status properly reported (by network manager ?) in nm-applet ?

Thanks for your attention.


You should immediatly restore the hald and init scripts (emerge again?). These are a definite requirement for your graphical environment to work. It's not good to let some other program start these services, why? Well, because the init scripts make dbus and hal integrate better with the gentoo specific infrastructure.

About your network problem, is it wireless or wired?
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3644

PostPosted: Sun Feb 07, 2010 4:58 pm    Post subject: Reply with quote

Thks for your reply.

I've followed your advice by
Code:
rc-update -a dbus(d) default
Now (not necessary related with the above) the situation for my wired network is :

After tweaking the network connection parameter in nm-applet (causing some Gtk errors displayed in console), it seems like connection is now available upon request.

Its should be mentioned that NetworkManager is booted before net.eth0. This may be the reason why nm-applet appears disconnected at logon after booting. If NetworkManager connection is requested and achieved in LXDE, its status is maintained through a logout/ relogin procedure (as expected :wink: ).
Still I wonder how to have NetworkManager synchronized with eth0 status from the start :o .

After LXDE logoff, console reveals another problem with
Code:
** (nm-applet:3780): WARNING **: <WARN>  request_name(): Could not acquire the session service as it is already taken.  Return: 3

** (nm-applet:3780): WARNING **: <WARN>  constructor(): Couldn't initialize the D-Bus manager.
Back to top
View user's profile Send private message
Rexilion
Veteran
Veteran


Joined: 17 Mar 2009
Posts: 1044

PostPosted: Sun Feb 07, 2010 5:37 pm    Post subject: Reply with quote

Good think you mention net.eth0: DELETE IT :D . NetworkManager takes care of everything now :) . You need to delete all the net.* (except the net.lo).

About the error, no worries. Dbus uses two daemons:

- One system-wide daemon (started by the init script)
- One user-specific daemon

Many programs need dbus, so whenever a dbus is not started, a program that requires it will start it. If it's already started, then there is no problem, the program will just use the existing dbus interface (which is GOOD).
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3644

PostPosted: Sun Feb 07, 2010 6:26 pm    Post subject: Reply with quote

Talking about
Code:
 /etc/init.d/net.eth0
? I think I get the idea :roll:.
Nevertheless I remain a little reluctant to the idea; I'd rather have it automatically cancelled by a USE flags upgrade for example.
Moving it elsewhere for a try isn't that unfeasable ... :wink:

A kernel compile is in progress so I have to be patient a little :roll:


Last edited by CaptainBlood on Sun Feb 07, 2010 6:31 pm; edited 2 times in total
Back to top
View user's profile Send private message
Rexilion
Veteran
Veteran


Joined: 17 Mar 2009
Posts: 1044

PostPosted: Sun Feb 07, 2010 6:28 pm    Post subject: Reply with quote

CaptainBlood wrote:
Talking about
Code:
 /etc/init.d/net.eth0
? I think I get the idea :roll:.
Nevertheless I remain a little reluctant to the idea; I'd rather have it automatically cancelled by a USE flags upgrade for example.
Moving it elsewhere for a try isn't that unfeasable ... :wink:

A kernel compile is in progress so I have to be patient a little :roll:


Don't worry about breaking anything, /etc/init.d/net.eth0 is a symlink to /etc/init.d/net.lo (!) The scripts use the suffix as a clean way to detect the interface you want to mess with...
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3644

PostPosted: Sun Feb 07, 2010 8:52 pm    Post subject: Reply with quote

I'm back.
Instead of removing/deleting /etc/init.d/net.eth0, I decided to apply
Code:
rc-update -d net.eth0
, then rebooted, started an LXDE session and ... the nm-applet was in proper status, connected that is 8).

So I think the issue is closed, at least from my point of view, despite there's more work to do for auto reconnectable vpn.

Many thanks Rexilion :D, I looking forward to having enough knowledge like you so that I can support others :wink:.
Back to top
View user's profile Send private message
Rexilion
Veteran
Veteran


Joined: 17 Mar 2009
Posts: 1044

PostPosted: Sun Feb 07, 2010 9:14 pm    Post subject: Reply with quote

CaptainBlood wrote:
I'm back.
Instead of removing/deleting /etc/init.d/net.eth0, I decided to apply
Code:
rc-update -d net.eth0
, then rebooted, started an LXDE session and ... the nm-applet was in proper status, connected that is 8).

So I think the issue is closed, at least from my point of view, despite there's more work to do for auto reconnectable vpn.

Many thanks Rexilion :D, I looking forward to having enough knowledge like you so that I can support others :wink:.


Good good, I think I can help with openvpn too :D

If you generate a key, which I call static.key (available on client and server, generate with: openvpn --genkey --secret /etc/openvpn/static.key) then:

Alpha ~ # cat /etc/openvpn/client.conf # on the client
persist-tun
persist-key
proto tcp-client
remote 195.240.94.127 # change this to your ip
port 56202 # change this to your port opened for openvpn
dev tun
ifconfig 12.11.10.2 12.11.10.1
secret static.key
comp-lzo
route 10.1.9.0 255.255.255.0 # change 10.1.9.0 to your local network to access other computers other than the VPN

Alpha ~ # cat /etc/openvpn/server.conf # on the server
keepalive 15 30
persist-tun
persist-key
proto tcp-server
port 56302 # change this to your port opened for openvpn
dev tun
ifconfig 12.11.10.1 12.11.10.2
secret static.key
comp-lzo

Alpha ~ # cat /etc/NetworkManager/dispatcher.d/openvpn # on the client
if [ $2 = up ]; then
killall -SIGUSR1 openvpn
fi

Alpha ~ # ls -la /etc/NetworkManager/dispatcher.d/openvpn # on the client (watch the permissions and modes)
-rwx------ 1 root root 50 Feb 5 15:37 /etc/NetworkManager/dispatcher.d/openvpn

Alpha ~ # cat /etc/conf.d/local.start # on the server
iptables -t nat -A POSTROUTING -j MASQUERADE
sysctl net.ipv4.conf.all.forwarding=1

Then on the client:
ln -s /etc/init.d/openvpn /etc/init.d/openvpn.client
eselect rc add openvpn.client default

Then on the server:
ln -s /etc/init.d/openvpn /etc/init.d/openvpn.server
eselect rc add openvpn.server default

I emerged openvpn with *only* ssl and minimal useflag (if you want to go for performance):

USE="minimal ssl" emerge -pv openvpn

If you apply all this, then openvpn will try to connect every 5 seconds with it's server. I also decreased the keepalive so that it will reconnect faster upon time-out (this way, everything is handled in the background automatically). Furthermore /etc/NetworkManager/dispatcher.d/openvpn restarts openvpn in case you switch connection (openvpn client won't automatically reload then, so I do that there).

I hope this is what you are looking for!
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3644

PostPosted: Mon Feb 08, 2010 3:55 pm    Post subject: Reply with quote

Thks for all this information I should have a good use of when reaching this milestone.
Seems like title was confusing, since I was meaning VPN ISP connection.

I now face issues on this way, but I guess it would e clearer to open a new topic.
Thks for your support which has been more than appreciated 8)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum