I have put together a script file to automate the process of removing the files used by KNetworkManager/KWallet as recommended by knurpht here in one of his very fine messages. I have used this on two different Laptops who’s wireless did work with ifup, but not with KNetworkManager. I followed the suggestions by knurpht and low and behold, KNetworkManager started working. Since these commands were so successful, I decided they should be placed into a script file for all to use. Here is the output of the script file text.
Kde NetworkManager Fixer - Version 1.00 - Removes all KNetworkManager Settings
Desktop Loaded: KDE4 KNetworkManager Running: Yes KWalletManager Loaded: Yes
knetfix will run the following Terminal Commands:
sudo /etc/init.d/network stop, requires root password
sudo killall -9 kwalletemanager, if running
sudo killall -9 knetworkmanager, if running
rm -rf ~/.kde4/share/config/networkmanagementrc
rm -rf ~/.kde4/share/apps/networkmanagement
rm -rf ~/.kde4/share/config/kwalletrc
rm -rf ~/.kde4/share/apps/kwallet
You should reboot your computer when complete, then…
Load Required Programs using: YaST for KNetworkManager & KDE menu for Kwallet
You Must run: YaST / Network Devices / Network Settings / Global Options Tab
and select the bullet option for: User Controlled with NetworkManager
To use Kwallet open: KDE Menu / System / Desktop Applet / KwalletManager
If You Can Not get your wireless connection working using the ‘Traditional
Method with ifup’, it is very likely this Knetfix script file will not help
you out. Make sure that your wireless hardware is working first.
Do you wish to perform the above commands? (y/N)
To create knetfix, copy and past the text in the code window below as the text file knetfix in your home area bin folder (~/bin/knetfix).
#!/bin/bash
#: Title : /home/james/bin/knetfix
#: Date Created: Sun Nov 28 10:18:13 CST 2010
#: Last Edit : Sun Nov 28 10:18:13 CST 2010
#: Author : J. McDaniel
#: Version : 1.00
#: Description :
#: Options :
TITLE="Kde NetworkManager Fixer - Version 1.00 - Removes all KNetworkManager Settings"
#
# Section 1, Function Code Blocks go here *************************************
#
#
#Display One or More Line(s) with different foreground and background colors
# $1=foreground color $2=background color
# $3=Number of Lines to Display
# $4 and higher are lines text to display
# * 0: Black
# * 1: Blue
# * 2: Green
# * 3: Cyan
# * 4: Red
# * 5: Magenta
# * 6: Yellow
# * 7: White
#
function print_color {
fgrd=$1
bgrd=$2
maxnum=$3
counter=1
while $(( counter )) -lt $(( maxnum + 1 )) ] ; do
tput bold
tput setf $(( fgrd ))
tput setb $(( bgrd ))
echo "$4$(tput sgr0)"
let counter=counter+1
shift
done
}
#
# Prompt for user input in bold while, set $CHOICE for use if needed
#
function enter_prompt {
echo
tput bold
tput setf 7
echo -n "$1$(tput sgr0)"
read CHOICE
echo
}
if "$DESKTOP_SESSION" != "kde4" ] ; then
echo "knetfix only works with KDE4, Sorry!"
exit 1
else
KDE="KDE4"
fi
kwallet="$(pidof kwalletmanager)"
knetwork="$(pidof knetworkmanager)"
if "$kwallet" == "" ] ; then
kwalletloaded="No "
else
kwalletloaded="Yes"
fi
if "$knetwork" == "" ] ; then
knetworkloaded="No "
else
knetworkloaded="Yes"
fi
tput clear
print_color 7 2 1 "$TITLE"
l1="Desktop Loaded: $KDE KNetworkManager Running: $knetworkloaded KWalletManager Loaded: $kwalletloaded"
l2=""
print_color 7 2 2 "$l1" "$l2"
print_color 7 1 1 "knetfix will run the following Terminal Commands: "
l1=" sudo /etc/init.d/network stop, requires root password "
l2=" sudo killall -9 kwalletemanager, if running "
l3=" sudo killall -9 knetworkmanager, if running "
l4=" rm -rf ~/.kde4/share/config/networkmanagementrc "
l5=" rm -rf ~/.kde4/share/apps/networkmanagement "
l6=" rm -rf ~/.kde4/share/config/kwalletrc "
l7=" rm -rf ~/.kde4/share/apps/kwallet "
print_color 7 0 7 "$l1" "$l2" "$l3" "$l4" "$l5" "$l6" "$l7"
print_color 7 1 2 " You should reboot your computer when complete, then..." ""
l1="Load Required Programs using: YaST for KNetworkManager & KDE menu for Kwallet "
l2=""
print_color 7 0 2 "$l1" "$l2"
l1=" You Must run: YaST / Network Devices / Network Settings / Global Options Tab "
l2=" and select the bullet option for: User Controlled with NetworkManager "
l3=" To use Kwallet open: KDE Menu / System / Desktop Applet / KwalletManager "
l4=""
print_color 7 1 4 "$l1" "$l2" "$l3" "$l4"
l1=" If You Can Not get your wireless connection working using the 'Traditional "
l2=" Method with ifup', it is very likely this Knetfix script file will not help "
l3=" you out. Make sure that your wireless hardware is working first. "
print_color 7 4 3 "$l1" "$l2" "$l3"
#
# Determine if you wish to perform the listed commands
#
enter_prompt "Do you wish to perform the above commands? (y/N)"
if "$CHOICE" == "y" ] || "$CHOICE" == "Y" ] ; then
sudo /etc/init.d/network stop
if "$kwallet" != "" ] ; then
sudo killall -9 kwalletmanager
fi
if "$knetwork" != "" ] ; then
sudo killall -9 knetworkmanager
fi
rm -rf ~/.kde4/share/config/networkmanagementrc
rm -rf ~/.kde4/share/apps/networkmanagement
rm -rf ~/.kde4/share/config/kwalletrc
rm -rf ~/.kde4/share/apps/kwallet
print_color 7 4 2 " The Commands as listed above were performed, please restart openSUSE now!" ""
else
print_color 7 4 2 " As Requested, No Changes Were made to your KNetworkManager Settings. " ""
fi
exit 0
# End Of Script
knetfix must be marked executable to be used. Open up a terminal session and run the following command:
chmod +x ~/bin/knetfix
To use knetfix, open another terminal session and run the terminal command:
knetfix
knetfix requires that you be running KDE4, that you already know your wireless hardware works in ifup and that for what ever reason, you can not get your wireless working in KNetworkManager.
Thank You,