SEARCH
TOOLBOX
LANGUAGES
Computers-laptop

Computers-laptop

From Hugme.org

Jump to: navigation, search

This is a page I've put together for the installation of FreeBSD on my laptop. It's a Sony Vaio VGN-FW390JAS

Contents

Set Up

Network Card

  • The drivers are finally in the default kernel!! no more having to hack a similar kernel module in order for your network card to start working! I'm so happy I'm going to do a little dance now <dance>(insert dance here)</dance>

Wireless Card

I finally got my wireless card working YAY!! the drivers for it are only in the development stages but they do work. I'm using it to write this now. Here is how I did it:

  1. compile your kernel how you want it, DO NOT compile in "device iwn"
  2. cd /sys
  3. now get the development code (you have to have an internet connection to do this)
    svn co http://svn.techwires.net/svn/projects/freebsd
  4. cd freebsd/sys/modules/iwnfw
  5. make
  6. make install
  7. cd ../iwn
  8. env CFLAGS=-I$PWD/../../ make
  9. make install
    You have just replaced the modules with the development ones. DO NOT rebuild the kernel or you will wipe them out (I made this mistake more than once)
  10. kldload iwn5000fw
  11. kldload if_iwn
  12. ifconfig wlan0 create wlandev iwn0
  13. ifconfig iwn0 up
  14. ifconfig wlan0 up
  15. ifconfig wlan0 scan

This should now scan for your AP's, set up the wireless from here as you normally would and use dhclient to retrieve your IP address.

SD Card reader

I just got this working with kldload modules... however you will more than likely want to write it into the kernel...

  1. kldload mmc
  2. kldload mmcsd
  3. kldload sdhci
    now you can mount the file system when you're ready. I'm creating /mount/sd but you can mount it where ever you would like.
  4. mkdir -p /mount/sd
  5. mount_msdosfs /dev/mmcsd0s1 /mount/sd

TouchPad

You may notice your touchpad is acting a little strange out of the box. it's because you have it set up as a mouse. It's pretty easy to fix.

  • rc.conf
    moused_enable=no # A touchpad works better when controlled by xorg not moused
  • /etc/X11/XF86Conf
    • in the section "ServerLayout" comment out your mouse and add your touchpad
      #InputDevice "Mouse0" "CorePointer"
      InputDevice "Touchpad0" "CorePointer"
    • Add this new section!
      Section "InputDevice"
      Identifier "Touchpad0"
      Driver "synaptics"
      Option "Device" "/dev/psm0"
      Option "Protocol" "alps"
      Option "SHMConfig" "on"
      Option "LeftEdge" "130"
      Option "RightEdge" "840"
      Option "TopEdge" "130"
      Option "BottomEdge" "640"
      Option "FingerLow" "7"
      Option "FingerHigh" "8"
      Option "MaxTapTime" "180"
      Option "MinTapTime" "110"
      Option "ClickTime" "0"
      Option "EmulateMidButtonTime" "75"
      Option "VertScrollDelta" "20"
      Option "HorizScrollDelta" "20"
      Option "MinSpeed" "0.40"
      Option "MaxSpeed" "0.65"
      Option "AccelFactor" "0.030"
      Option "EdgeMotionMinSpeed" "200"
      Option "EdgeMotionMaxSpeed" "200"
      Option "UpDownScrolling" "1"
      Option "CircularScrolling" "1"
      Option "CircScrollDelta" "0.1"
      Option "CircScrollTrigger" "3"
      Option "VertEdgeScroll" "on"
      Option "Emulate3Buttons" "on"
      EndSection

Video and xorg

Pretty general setup and will take most of the defaults
  • as root run `X -configure`
  • `mv xorg.conf.new /etc/X11/XF86Config`
  • This is one of the stupidest things I think the X project has ever done in it's entire history, honestly. There is a 'make it work' switch.. no, I'm not kidding. You will need to add this line to the section marked ServerLayout:
    option "AllowEmptyInput" "false"

Sound Card

  • Add this to your kernel
    # Enable the sound device
    device sound
    device snd_hda
  • once you have rebuilt your kernel and rebooted you will notice the sound seems to work but nothing comes out. The default sound should be 0, however the mixer took that slot, your sound is in slot 1. change it like this:
    sysctl hw.snd.default_unit=1
  • then to make it stick on boot add this line to /etc/sysctl.conf
    hw.snd.default_unit=1

firewall

flash

The flash player is one of the best parts about FreeBSD 8.0 you will now be able to run flash 10!! yes 10!! but it's going to take a little work on your part.You will have to use the linux emulator. here we go!

  • Set up linux to run by default, with the linux file system and kernel module
    /etc/rc.conf
    enable_linux="YES"
    /etc/make.conf
    OVERRIDE_LINUX_BASE_PORT=f10
    /etc/fstab
    linproc /usr/compat/linux/proc linprocfs rw 0 0
  • Now start up the services that need it
    kldload linux
    sysctl compat.linux.osrelease=2.6.16
    mount /usr/compat/linux/proc
  • Install the ports you will need
    emulators/linux_base-f10
    www/linux-f10-flashplugin-10.0r32
    www/nspluginwrapper
  • now link in the player
    cd /usr/local/lib/browser_plugins
    ln -s /usr/local/lib/npapi/linux-f10-flashplugin/libflashplayer.so .
  • Run the wrapper module (as the user you want to use flash)
    nspluginwrapper -v -a -i
  • restart firefox and you should be working. you can check by going to this url:
    about:plugins

Set up

Basics

  • passwd root
    Do this, I'm not kidding DO THIS!!!!
  • cat /dev/null > /etc/motd
  • /etc/rc.conf
    hostname="[your hostname]"
    ifconfig_msk0="dhcp"
  • Set up battery monitoring
    • kernel change
      device apm
    • rc.conf
      apm_enable="yes"

Connecting to servers

  • send ssh identity keys to servers (I should write a page on how this works at some point)

Software -- expect a LOT more here soon!

Basic stuff

  • shells/bash - duh...
  • ftp/lftp - lots of neat commands the stock ftp does not have
  • ports-mgmt/portupdate - great way to update all your software quickly

Security

  • net/wireshark
  • x11/xlockmore
  • x11/xautolock

X-Windows, or Xorg or whatever

With version 8 you are going to have to install Xorg manually
  • x11/xorg - this is your x server
  • x11/xdm - This is the login for your X server
Now that all the boring stuff is out of the way, the more fun/interesting things:
  • x11-wm/windowmaker
    • x11-clocks/wmitime
    • x11/wmcliphist
    • audio/wmfmixer
    • deskutils/wmpinboard
    • math/wmcalc
    • misc/wmweather
    • astro/wmmoonclock
    • astro/wmsolar
    • net/wmnet
    • sysutils/wmbattery
    • sysutils/wmbluecpu
    • sysutils/wmflame
    • sysutils/wmtop
  • x11/eterm
  • net/rdesktop - Allows you to connect to windows desktops

Browsers

  • www/firefox35
  • www/opera

Multimedia

  • multimedia/xmms - for sound
  • multimedia/vlc - for video
  • graphics/gimp
  • graphics/Imagemagic
  • graphics/cbview
  • graphics/xpdf

networking stuff

  • net/samba - allow you to mount your unix box as a windows share

Internet Goodies

  • net-im/pidgin - use this to connect to almost every type of Instant messenger
  • net-im/farsight2 - instant messenger that supports your webcam