You are not logged in.

#1 2010-04-25 01:32:12

uzi304
Member
From: New Jersey, USA
Registered: 2009-06-16
Posts: 29

[SOLVED]Network not working when using startx

Up until recently I've been using Fluxbox through GDM and everythings been perfect. Today, however, I tried using Xmonad and I launched it through GDM and network was find in that too when I launched nm-applet. In Xmonad however I need to put startup programs in ~/.xinitrc so I have to use the startx command but when I do use it network doesn't work. Nm-applet says I don't have permission to run it and even when I try to connect manually with ipwconfig, wpa_supplicant, etc. It isn't just Xmonad either, I ran Fluxbox through startx and network didn't work in that either. Any help would be appreciated.

Oh and here is my ~/.xinitrc:

#!/bin/sh
# $Xorg: xinitrc.cpp,v 1.3 2000/08/17 19:54:30 cpqbld Exp $

#userresources=$HOME/.Xresources
#usermodmap=$HOME/.Xmodmap
#sysresources=/etc/X11/xinit/.Xresources
#sysmodmap=/etc/X11/xinit/.Xmodmap

# merge in defaults and keymaps

#if [ -f $sysresources ]; then







#    xrdb -merge $sysresources

#fi

#if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
#fi

#if [ -f "$userresources" ]; then







#    xrdb -merge "$userresources"

#fi

#if [ -f "$usermodmap" ]; then
#    xmodmap "$usermodmap"
#fi

# start some nice programs

xsetroot -cursor_name left_ptr &
feh --bg-scale ~/Pictures/ornament.jpg &
gnome-power-manager &
xmobar &
gnome-keyring-daemon &
nm-applet &
exec xmonad

Last edited by uzi304 (2010-04-25 03:08:34)

Offline

#2 2010-04-25 02:18:28

chpln
Member
From: Australia
Registered: 2009-09-17
Posts: 361

Re: [SOLVED]Network not working when using startx

I believe you will need to invoke dbus-launch prior to attempting to use nm-applet.  So, your .xinitrc should read:

[...]
exec dbus-launch xmonad

That said, I hate NetworkManager and would swap it for netcfg or wicd in an instant.

Offline

#3 2010-04-25 02:28:20

uzi304
Member
From: New Jersey, USA
Registered: 2009-06-16
Posts: 29

Re: [SOLVED]Network not working when using startx

Thanks for trying to help but that didn't change anything. If I were to use wicd insteak of NetworkManager, would that fix my problem? Also, why don't you like NetworkManager?

Offline

#4 2010-04-25 03:08:16

uzi304
Member
From: New Jersey, USA
Registered: 2009-06-16
Posts: 29

Re: [SOLVED]Network not working when using startx

Sorry for the double post but I found the solution. I have to end ~/.xinitrc with

exec ck-launch-session xmonad

for some reason. If anyone could explain why I have to do that then that'd be great cuz I'm interested.

Offline

#5 2010-04-25 03:14:09

chpln
Member
From: Australia
Registered: 2009-09-17
Posts: 361

Re: [SOLVED]Network not working when using startx

I use netcfg, though I'm unable to see any reason why wicd would cause any headaches -- it should just be a matter of following the wiki.  Of course, in that regard it should be no different to NetworkManager: someone more familiar with this might be able to point you in the right direction.

As for my dislike for NetworkManager: I've found NM to only add another layer of complexity; you are not only managing your network settings, but also battling with the manager itself.  I've not used NM for years, though at the time it felt to be very much a bloated, inflexible, all-or-nothing 'solution' (which is exactly the software I've been trying to avoid).  The fact it was packed peculiarities (read: design decisions I could make no sense of) didn't help much either.

Maybe things have changed over time, but I've had no reason to go back and find out.  netcfg is brilliant and my experiences with wicd have been perfectly trouble-free.

EDIT: Beaten.  Glad to hear you found a solution, though I'm familiar with how NM integrates with ConsoleKit.

Last edited by chpln (2010-04-25 03:16:36)

Offline

Board footer

Powered by FluxBB