# [SOLVED] Fluxbox Wireless



## notquiteright (Mar 21, 2011)

I'm pretty new to Linux, and I recently installed Ubuntu 11.04. Because I have older hardware (Pentium 4 1.50GHz and 1GB of 133MHz DDR RAM), I installed Fluxbox and edited the startfluxbox file to start Network Manager when I login. I used 

```
sudo gedit /usr/bin/startfluxbox
```
 to change the file. I got this error message in bash after the command

```
(gedit:3657): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory
```
 I added

```
nm-applet &
```
 in the appropriate place, but I still don't seem to have a wireless connection when I use fluxbox. 
Startfluxbox currently looks like this:

```
#!/bin/sh

command="`basename \"$0\"`"
fluxdir="$HOME/.fluxbox"
startup="$fluxdir/startup"

while [ $# -gt 0 ]; do
    case "$1" in
        -c|--config)
            if [ $# -lt 2 ]; then
                echo "$command:error, missing argument"
                exit 1
            fi
            shift
            startup=$1
        ;;
        -h|--help) cat <<EOF
Usage: $command [-h] [-c startupfile]
EOF
        exit
        ;;
    esac
    shift
done

if [ -x "$startup" ]; then
    exec "$startup"
elif [ -r "$startup" ]; then
    exec sh "$startup"
else
    if [ ! -d $fluxdir ]; then
        mkdir -p "$fluxdir/backgrounds" "$fluxdir/styles" "$fluxdir/pixmaps"
    fi
    if [ ! -r "$startup" ]; then
        ( cat << EOF
#!/bin/sh
#
# fluxbox startup-script:
#
# Lines starting with a '#' are ignored.

# Change your keymap:
xmodmap "$HOME/.Xmodmap"

# Applications you want to run with fluxbox.
# MAKE SURE THAT APPS THAT KEEP RUNNING HAVE AN ''&'' AT THE END.
#
# unclutter -idle 2 &
# wmnd &
# wmsmixer -w &
# idesk &
nm-applet &

# And last but not least we start fluxbox.
# Because it is the last app you have to run it with ''exec'' before it.

exec fluxbox
# or if you want to keep a log:
# exec fluxbox -log "$fluxdir/log"
EOF
    ) > "$startup"
    fi
    chmod 644 "$startup"
    exec sh "$startup"
fi
```


----------



## wmorri (May 29, 2008)

*Re: Fluxbox Wireless*

Hi,

Welcome to Linux, and TSF!!

What application do you use for network manager? Then we can figure out how to make it work on startup for you. Also, I would like to know if you have your wireless drivers in stalled yet?

Cheers!


----------



## hal8000 (Dec 23, 2006)

*Re: Fluxbox Wireless*

The essence of that bash script is to start fluxbox and in the background the network
manager applet.

To debug, open a terminal and post output of:

nm-applet

This should start nm-applet as long as its installed, you can ignore the other warning message, its referring to a MRU item you dont have.


----------



## notquiteright (Mar 21, 2011)

*Re: Fluxbox Wireless*

Thanks for the quick responses! I'm using the GNOME NetworkManager. I have the drivers installed, and NM works in GNOME and Unity. I was able to run nm-applet and I got this message: 
** (nm-applet:1630): DEBUG: foo_client_state_changed_cb


----------



## hal8000 (Dec 23, 2006)

*Re: Fluxbox Wireless*

Hi, you can ignore that message, extra output is generated in the terminal.

Did the network manager appear, and where you able to setup wifi ok?


----------



## notquiteright (Mar 21, 2011)

*Re: Fluxbox Wireless*

Yep, I was able to set up a connection with no problems, but I'd like to do it automatically at start up. Is there an issue with the startfluxbox script?


----------



## hal8000 (Dec 23, 2006)

*Re: Fluxbox Wireless*

No your start fluxbox script looks ok, the error was referring to a file found about gedit.

If network manager does not start, then you can start apps for any user with
the ~/.fluxbox/startup script

Just use gedit as normal user and add the following line to
~/.fluxbox/startup


nm-applet &

In case the script does not exist type:

touch ~/.fluxbox/startup


and then edit ~/.fluxbox/startup

#!/bin/sh
nm-applet &

save the file logout, login, nm-applet should start.


----------



## notquiteright (Mar 21, 2011)

*Re: Fluxbox Wireless*

Worked like a charm! Thanks so much for the help, Hal.


----------

