# New to FreeBSD



## TroN-0074 (Dec 19, 2011)

Hi FreeBSD users, I just started using FreeBSD on an IBM Thinkpad T41, Pentium M. I chose KDE as desktop manager and I have some questions, hopefully somebody can advice on what to do.

The first issue is with the wireless, at home my router is set up WPA-PSK, so I have edited my /etc/wpa_supplicant.conf and added the info for SSID and PSK, I have also edited my /etc/rc.conf file with the lines

```
wlans_ath0="wlan0"
ifconfig_wlan0="WPA DHCP"
```

I get online just fine but down the block my favorite coffee shop offers free Wi-Fi without passphrase so I connect to their router by editing the /etc/rc.conf file with the lines

```
wlans_ath0="wlan0"
ifconfig_wlan0="DHCP"
```

So I think editing this file to connect at home then to connect to a public hot spot is a lot of work, so my question is: is there a setting that will work without having to be modifying the /etc/rc/conf file?

Thank you I will appreciate all your advice.


----------



## vermaden (Dec 19, 2011)

TroN-0074 said:
			
		

> So I think editing this file to connect at home then to connect to a public hot spot is a lot of work, so my question is: is there a setting that will work without having to be modifying the /etc/rc/conf file?



Sure, from CLI, like that:

`# ifconfig wlan0 up`
`# ifconfig wlan0 ssid NETWORK`
`# dhclient wlan0`

Also, to see list of available networks:
`% ifconfig wlan0 list scan`

... and to force scan again:
`# ifconfig wlan0 scan`

You can also use GUI wpa_gui app from here: http://blog.zx2c4.com/248

Type *pkg_add -r wpa_gui* to try it 



			
				TroN-0074 said:
			
		

> My other question will be what codecs do I need to have sound in my laptop and play MP3s files and DVD movies or avi or mkv files.


Use pkg_add -r mplayer or pkg_add -r vlc, You will have all needed codecs and a nice player. You may also want to use gnome-mplayer frontend for the rather 'raw' mplayer default inferface.


----------



## TroN-0074 (Dec 19, 2011)

Thank you for editing my original post and moved it here. Also @vermaden thank you for the tip on wpa_gui I am  using it right now and is working fine, in adition I also download vnc but I havent tested it yet. I'll keep posting on that later.


----------



## phoenix (Dec 20, 2011)

I believe vermaden meant to say v*l*c, the media player.  And not v*n*c, the remote desktop software.


----------



## TroN-0074 (Dec 20, 2011)

phoenix said:
			
		

> I believe vermaden meant to say v*l*c, the media player.  And not v*n*c, the remote desktop software.



I thought about that. I install it anyway, but I will install VLC as well. However I havent been able to play videos from the web such as youtube or hulu, Neither I have been able to play online radio.

Thank you.


----------



## jrm@ (Dec 20, 2011)

The typical way to play youtube videos is to install the flash browser plugin.  The handbook has a guide: http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/desktop-browsers.html.  There are other ways such as using tools like www/youtube_dl or using a browser that can handle the html5 videos, but that likely won't help you (for now) with most sites.


----------



## vermaden (Dec 20, 2011)

phoenix said:
			
		

> I believe vermaden meant to say v*l*c, the media player.  And not v*n*c, the remote desktop software.


True, fixed


----------



## Beastie (Dec 20, 2011)

TroN-0074 said:
			
		

> I havent been able to play videos from the web such as youtube


Install any modern browser such as Firefox or the latest Opera, visit the YouTube HTML5 page and click *Join the HTML5 Trial*.


----------



## vermaden (Dec 20, 2011)

Beastie said:
			
		

> Install any modern browser such as Firefox or the latest Opera, visit the YouTube HTML5 page and click *Join the HTML5 Trial*.



If You are using Opera, then also get this extension:
https://addons.opera.com/en/addons/extensions/details/youtube-webm-plus/3.50-1/


----------



## jrm@ (Dec 20, 2011)

Beastie said:
			
		

> Install any modern browser such as Firefox or the latest Opera, visit the YouTube HTML5 page and click *Join the HTML5 Trial*.



Have you tried that with firefox?  I have and it's unusable.


----------



## adamk (Dec 20, 2011)

It's perfectly usable here with firefox 8.0.1.


----------



## jrm@ (Dec 20, 2011)

That's what I'm using as well on 8.2-STABLE/i386.  I just tried again.  When I started a video things were fine, but the voice and video quickly became out of sync.  If I paused and started again the frames wouldn't update properly (long pauses on a single frame and then very choppy).


----------



## adamk (Dec 20, 2011)

What audio and video hardware are you using?

Adam


----------



## biniar (Dec 20, 2011)

In "VLC" if you goto "Media" ---> "Open Network Stream" ---> and then you can paste in a YouTube link which will play just fine.


----------



## jrm@ (Dec 20, 2011)

`% pciconf -lv | grep -i ati`
tells me

```
ATI Radeon HD 3450 (RV620 LE).
```

I see in /etc/X11/xorg.conf that I'm using the radeon driver.

`% cat /dev/sndstat`

```
FreeBSD Audio Driver (newpcm: 32bit 2009061500/i386)
Installed devices:
pcm0: <HDA ATI R6xx HDMI PCM #0 HDMI> (play)
pcm1: <HDA Realtek ALC662 PCM #0 Analog> (play/rec) default
pcm2: <HDA Realtek ALC662 PCM #1 Digital> (play)
```


----------



## Beastie (Dec 20, 2011)

vermaden said:
			
		

> If You are using Opera, then also get this extension:
> https://addons.opera.com/en/addons/extensions/details/youtube-webm-plus/3.50-1/


Indeed, but I mainly use it for the other options it provides. I keep the "HTML5 Trial" on simply by keeping the relevant part of the YouTube cookie (PREF: f2=40000000&f3=0).


----------

