openSUSE Forums > Network/Internet » How to use NetworkManager in console?

Go Back   openSUSE Forums > Network/Internet
Forums FAQ Members List Search Today's Posts Mark Forums Read


Network/Internet Questions about internet applications, network configuration, usage (SAMBA, network printing, NFS)

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-Jan-2009, 04:11
Student Penguin
 
Join Date: Jan 2009
Posts: 58
silentstone hasn't been rated much yet
Question How to use NetworkManager in console?

Messed up installing the proprietary ATI graphics driver on openSUSE 11.1 (GNOME), and reboot drops me to console login. X won't start, so I'd like to reinstall some packages from the console. However, the network connection is disconnected. It was set to use NetworkManager (which is running), and I don't know how to manipulate NetworkManager on the cli. After checking that the interface was up (ifconfig), and no DHCP clients were running, I tried this as root:
Code:
iwconfig wlan0 essid "my-essid" key my-key open
iwconfig wlan0 enc on
iwconfig wlan0 essid "my-essid" key "my-key" open
iwconfig
dhcpcd wlan0
dhcpcd times out. Wifi card and connection were working flawlessly before, so the hardware is compatible. Only after the botched driver compile/install + reboot did the connection problem occur.

I tried to use yast2 to configure network (and X, but this fails and fails), but got a warning that it wouldn't work because of NetworkManager, and to disable NetworkManager if I'd like to configure through yast. What would be the cons of disabling NetworkManager? I like the unified configuration tool of yast, so wonder why, after much effort was apparently put into that tool, another tool is preferred for this task.

Perhaps I'm missing something? I am new to SUSE, or any rpm-based distro. Going slowly to avoid distro-shock.
Reply With Quote
  #2 (permalink)  
Old 04-Jan-2009, 04:53
Busy Penguin
 
Join Date: Jun 2008
Location: Berlin, Germany
Posts: 284
supertimorplusfort hasn't been rated much yet
Default Re: How to use NetworkManager in console?

Quote:
Originally Posted by silentstone View Post
reboot drops me to console login. X won't start
Hi. Try to replace the proprietary fglrx driver with the opensource drivers, maybe that works:
Code:
 sax2 -r -m 0=radeonhd
Then you should be able to login into X.
As far as I know there are no commandline options for NetworkManager. To connect to your wlan try "dhclient wlan0" instead of "dhcpd wlan0", because the dhcp server should be running on your wireless router.
Quote:
What would be the cons of disabling NetworkManager?
You would have to use the cli everytime you want to connect to a new network or vpn. Therefore, I prefer NetworkManager. Of course, you can disable NetworkManager now and reenable it later.
Reply With Quote
  #3 (permalink)  
Old 04-Jan-2009, 08:02
Student Penguin
 
Join Date: Jan 2009
Posts: 58
silentstone hasn't been rated much yet
Default Re: How to use NetworkManager in console?

Quote:
Originally Posted by supertimorplusfort View Post
Hi. Try to replace the proprietary fglrx driver with the opensource drivers, maybe that works:
Code:
 sax2 -r -m 0=radeonhd
Then you should be able to login into X.
Thanks, I'll try this. It would be nice to be able to reclaim the nicely working, original GUI.

Quote:
As far as I know there are no commandline options for NetworkManager. To connect to your wlan try "dhclient wlan0" instead of "dhcpd wlan0", because the dhcp server should be running on your wireless router.
Ah, I was confused by having both of them--didn't realize there was a distinction.

Quote:
you can disable NetworkManager now and reenable it later.
How can NetworkManager be disabled and reenabled? The yast -> network... didn't provide any hints, just the warning about them being mutually exclusive. No help in man -k networkmanager, either.
Reply With Quote
  #4 (permalink)  
Old 04-Jan-2009, 08:18
Busy Penguin
 
Join Date: Jun 2008
Location: Berlin, Germany
Posts: 284
supertimorplusfort hasn't been rated much yet
Default Re: How to use NetworkManager in console?

Quote:
Originally Posted by silentstone View Post
How can NetworkManager be disabled and reenabled? The yast -> network... didn't provide any hints
yast → network devices → network settings → global options
Reply With Quote
  #5 (permalink)  
Old 04-Jan-2009, 14:56
Student Penguin
 
Join Date: Jan 2009
Posts: 58
silentstone hasn't been rated much yet
Default Re: How to use NetworkManager in console?

Thanks!

Neither dhclient nor dhcpcd got an IP, so I just disabled NetworkManager as suggested. Once that was done, yast configuration of the wireless connection got me online in console. This became moot, however, once a working GUI was achieved by running sax2-vesa. I found this command after failing with suggested sax2 -r -m 0=radeonhd. Useful fallback.

Anyway, thanks again for all the help!
Reply With Quote
  #6 (permalink)  
Old 07-Feb-2009, 16:24
Student Penguin
 
Join Date: Jan 2009
Posts: 58
silentstone hasn't been rated much yet
Thumbs up Re: How to use NetworkManager in console?

Hello, there is a console program in the repo for manipulating NetworkManager: cnetworkmanager. Here's some more info:

Code:
user@compy:~> zypper if cnetworkmanager
Loading repository data...
Reading installed packages...


Information for package cnetworkmanager:

Repository: @System
Name: cnetworkmanager
Version: 0.8-2.5
Arch: noarch
Vendor: openSUSE
Installed: Yes
Status: up-to-date
Installed Size: 65.0 K
Summary: Command-line client for NetworkManager
Description: 
Cnetworkmanager is a command-line client for NetworkManager, intended
to supplement and replace the GUI applets

user2compy:~> cnetworkmanager --help
cnetworkmanager 0.8 - Command Line Interface for NetworkManager
Usage: cnetworkmanager [options]

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -d, --dev             list devices
  -c, --actcon          list active connections
  -u, --usrcon          list user connection settings (can CRASH nm-applet)
  -s, --syscon          list system connection settings
  -a, --ap              list found access points
  -n, --nets            list found wireless networks
  -w BOOL, --wifi=BOOL  enable or disable wireless
  -o BOOL, --online=BOOL
                        enable or disable network at all
  -C NET, --connect=NET
                        connect to a wireless network NET (using
                        knetworkmanagerrc or the key options below)
  --unprotected         network does not require a key
  --wep-hex=KEY         use this WEP key of 26 hex digits
  --wep-pass=KEY        use this WEP passphrase
  --wpa-psk-hex=KEY     use this WPA key of 64 hex digits
  -m, --monitor         loop to show dbus signals
Reply With Quote
Reply

Bookmarks

Tags
console, network manager, software


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




 

Search Engine Friendly URLs by vBSEO 3.3.0 RC2