LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices

Reply
 
Search this Thread
Old 08-15-2004, 06:11 PM   #1
scottlinux
LQ Newbie
 
Registered: Aug 2004
Location: NC
Distribution: Mandriva
Posts: 11

Rep: Reputation: 0
help with changing to different networks


Hey guys what is the best way to change to a different ssid/renew ip address etc from the command line?

I tried doing
$ iwconfig eth1 essid <new ssid>
and then
$ ifconfig eth1
and that seem to work, but I'm not sure if that's the best way to do it.

I seem to also be having host and display problems also when I switched to a new network:

stmiller@stm0103:~> mozilla
DISPLAY empty or unusable
DISPLAY=:0.0

I couldn't open mozilla or gaim. The browser program Links worked fine from the terminal, had an ip address and everything.

I tried setting
$ DISPLAY=<ipaddress>
and
$ DISPLAY=<stm0103>

but nothing seemed to work. Tried as root and not as root.

Any help is greatly appreciated. Thanks!

Using Suse 9.1
 
Old 08-17-2004, 08:07 AM   #2
nickI-S
Member
 
Registered: Aug 2004
Location: Bristol UK
Distribution: SuSE 5.4 to 9.2, RedHat 7.3
Posts: 57

Rep: Reputation: 15
I am new Linux WiFi too, (but not to Linux and networking)

I think simplest robust approach is something like:

ifconfig eth1 down # maybe not necessary but should tell DHCP to undo anything
# it did for old nework
iwconfig eth1 essid newssid # Wireless bit to "link" to new network
ifconfig eth1 up # Trigger DHCP negotiate on new network.

The ifconfig steps may be unnecessary (or perhaps too strong), as DHCP may
renegotiate as link comes/goes as a result of iwconfig step.

Your DISPLAY stuff is a different class of problem.
Should really be in an XFree86 thread rather than here, but ...

Local display is usually via a UNIX domain socket which is unaffected by network.
So normaly you have

export DISPLAY=:0

The "nothing" before the colon is the UNIX domain.

If you want to connect via TCP/IP socket then put an address before the :
Something like:

export DISPLAY=192.168.0.42:0
or
export DISPLAY=hostname:0

The thing after the colon is the display number - if you have only one
graphics card then you usually only have one and it is number 0.

But note X is session based - so if network goes down / changes address
X session is lost.
 
Old 08-17-2004, 10:11 AM   #3
scottlinux
LQ Newbie
 
Registered: Aug 2004
Location: NC
Distribution: Mandriva
Posts: 11

Original Poster
Rep: Reputation: 0
Thank you for all your help!

Doing $ export DISPLAY=<newhostname>:0

works, but I have to restart the X server as everything seems to freeze if I don't. Kind of a pain, but oh well.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
apps for changing networks... pAn1k Linux - Wireless Networking 5 12-05-2004 09:18 PM
Changing Wireless Networks Rv5 Linux - General 2 01-07-2004 07:53 PM
Use two networks? trees Linux - Networking 7 12-24-2003 11:01 AM
wifi and changing networks yukaputzer Linux - Newbie 1 12-18-2003 04:23 PM
Changing Wireless Networks? Rv5 Red Hat 1 12-06-2003 07:38 PM


All times are GMT -5. The time now is 10:00 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration