Sysadm:Ubuntu
From Wiki
For collecting useful tips or links about using Ubuntu with our hardware and configuration.
Generally useful links:
- Sysadm:Ubuntu-T60p
- everything you need to know about installing stuff on ubuntu ;-)
- Useful tips for sound
- Ubuntu on T42
- [http://www.tuxme.com/node/544 Ubuntu on T42 (take two)
Before installation
- Add computer to dhcpd.conf
- Add hostname to cfagent.conf (also add it to the class ubuntu)
1st steps
- After installing the base system log in as user, change to root with "sudo su" and assign a root password if you like.
- Edit /etc/apt/sources.list and uncomment to universe lines.
- Now do
apt-get update apt-get dist-upgrade apt-get install cfengine2 cvs debfoster portmap nis openssh-server apt-get install syslog-summary logcheck apt-get install thinkpad-base tpctl tpb ibm-acpi cd /var/lib rm -rf cfengine2 cvs -d :pserver:cfengine@cvs.is.informatik.uni-duisburg.de:/services/cvsroot login cvs -d :pserver:cfengine@cvs.is.informatik.uni-duisburg.de:/services/cvsroot co cfengine2 cfkey cd /var/lib/cfengine2/inputs make cfagent /usr/lib/yp/ypinit -s marcie.is.informatik.uni-duisburg.de
- Edit /etc/hosts and delete the localhost.localdomain entry, and swap the hostname with localhost, so that the first line reads:
127.0.0.1 hostname localhost
- If you need to install nis from home, so ypinit from marcie does not work, you can do the following steps:
ssh root@marcie vi /etc/ypserv.securenets uncomment line with #255.255.255.0 134.91.40.0 /etc/init.d/nis restart start vpnc /usr/lib/yp/ypinit -s marcie.is.informatik.uni-duisburg.d revers ypserv.securenets
Graphics
ATI Proprietary Driver Installation HowTo
This Section guides you through the installation of ATI's binary driver (fglrx). I will assume you are either running Ubuntu Dapper Drake (6.06 LTS) or Edgy Eft (6.10).
- At first we have to make some adjustments to /etc/X11/xorg.conf with your editor of choice. If the Section "Extensions" does not already exist add it at the end of the file
Section "Device"
Identifier "ATI Graphics Adapter 0"
Driver "fglrx"
...
EndSection
## DRI with composite doesn't work as of now
Section "Extensions"
Option "Composite" "0"
EndSection
- Ubuntu provides ATI binary drivers in their linux-restricted-modules package. Be sure to add the following line to /etc/default/linux-restricted-modules-common
DISABLED_MODULES="fglrx"
- Now make sure that your X Server is stopped and remove the fglrx module if you use are using an older version of it.
sudo -s /etc/init.d/kdm stop # Or whatever display manager you chose modprobe -r fglrx
- This is to make sure that you have all needed packages installed
apt-get install module-assistant build-essential fakeroot dh-make debconf libstdc++5
- If you use Ubuntu's kernel images you have to install the matching kernel headers. If you build your own kernel you probably know what you are doing ;)
apt-get install linux-headers-$(uname -r)
- Now remove any possible old versions of ATI's driver packages
apt-get remove xorg-driver-fglrx apt-get remove fglrx-kernel-$*
- Fetch the installer archive and let it build packages for your platform.
cd /usr/src/ wget http://a248.e.akamai.net/f/674/9206/0/www2.ati.com/drivers/linux/ati-driver-installer-8.29.6.run chmod +x ati-driver-installer-8.29.6.run ./ati-driver-installer-8.29.6.run --buildpkg Ubuntu/edgy # Or Ubunt/dapper for that matter
- Install the packages
dpkg -i xorg-driver-fglrx_8.29.6-1_i386.deb dpkg -i fglrx-kernel-source_8.29.6-1_i386.deb dpkg -i fglrx-control_8.29.6-1_i386.deb
- Now it's time to build the kernel module
m-a update m-a prepare m-a build fglrx m-a install fglrx depmod -a
- Start your X server
/etc/init.d/kdm start
- And check if it worked. The output of fglrxinfo should look something like that:
display: :0.0 screen: 0 OpenGL vendor string: ATI Technologies Inc. OpenGL renderer string: RADEON 9600 Generic OpenGL version string: 2.0.6065 (8.29.6)
- The new driver now supports Pair Mode, which means you can have 2 Monitors with different resolutions using a common framebuffer (aka BigDesktop). You can either use fglrx-control to set it up or add one of the following lines to the Device Section of your xorg.conf:
Option "DesktopSetup" "horizontal" # Screen 0 left of Screen 1 Option "DesktopSetup" "horizontal,reverse" # Screen 0 right of Screen 1 Option "DesktopSetup" "vertical" # and so forth Option "DesktopSetup" "vertical, reverse"
- A Sample xorg.conf can be watched at http://www.fiendie.net/xorg.conf
From ibm-acpi.sf.net:
Note that on many models (particularly those using Radeon graphics chips) the X driver configures the video card in a way which prevents Fn-F7 from working. This also disables the video output switching features of this driver, as it uses the same ACPI methods as Fn-F7. Video switching on the console should still work.
UPDATE: There's now a patch for the X.org Radeon driver which addresses this issue. Some people are reporting success with the patch while others are still having problems. For more information: [1]
Resolution
The new laptops have a native resolution of 1600x1200 which is really nice. However, the 19" TFT choke on that. Since I don't know any X-conf-magic I made do with specifying the following modes in xorg.conf:
Modes "1280x1024" "1600x1200"
This starts in 1280x1024 with a virtual desktop of 1600x1200. The following script has been added to my .xinitrc:
#!/bin/bash xrandr -q | grep "^[ *][0-9]" | cut --output-delimiter : -c0-3,6-16,40- | sed "s/:/\n/g" | sed "s/*/ /g" | zenity --list --column "SZ" --column "Resolution" --column "Refresh" --separator : | xargs -n1 xrandr -r 60 -s
Letting me choose between the best reslution for stand alone and docked mode.
As an alternative to this nifty script, you can install the Display Geometry Switcher applet. This will give you an applet with a drop down menu of screen resolutions.
sudo apt-get install gnome-randr-applet
After the package is installed right click the panel and choose "Add to Panel..." then select "Display Geometry Switcher".
Fluxbox
apt-get install menu fluxbox fluxconf fbpager fbdesk xfonts-artwiz eterm apt-get install xmms wmclock wmbattery wmxres wmload wmusic wmnd
- Important: switch on anti-aliasing in fluxbox configuration!
Firefox
Version Bug
Ubuntu distributed a new version of Firefox which contains the security fixes from Firefox 1.0.4, however, they did not update the version number, so we have no way to tell whether your copy of Firefox contains the security fixes or not. A request to Ubuntu to update the version number has been filed at Ubuntu Bug 10681. A workaround you can use to get access to addons.mozilla.org is given in comment 3 on that bug. Please ensure you have updated to the latest Firefox package using apt-get, Synaptic, or the Ubuntu Update Manager before trying the workaround.
Font Rendering
Font rendering in firefox was really crappy for some websites. I tried
apt-get install kcontrol gtk2-engines-gtk-qt acroread-plugins
kcontrol
--> Appearance & Themes --> GTK Styles and Fonts --> GTK Fonts
set to use another font: Bitstream Vera Sans
But apparently that didn't work. I "solved" this now by forcing websites to display with my fonts. --Sascha
- I had no trouble with andy fonts using gnome. --Claus-Peter
Plugins
To get some useful plugins (restart firefox afterwards, check with about:plugins):
apt-get install libflash-mozplugin flashplugin-nonfree sun-j2re1.5 apt-get install mplayer-386 mplayer-fonts mozilla-mplayer
We added this linking to cfagent. Please verify that it works, otherwise so this
cd /usr/lib/mozilla-firefox/plugins sudo ln -s /usr/lib/flashplugin-nonfree/libflashplayer.so . sudo ln -s /usr/lib/flashplugin-nonfree/flashplayer.xpt . sudo ln -s /usr/lib/j2re1.5-sun/plugin/i386/ns7/libjavaplugin_oji.so . sudo ln -s ../../mozilla/plugins/libmozswfdec.so sudo ln -s ../../mozilla/plugins/libflash-mozplugin.so
In /etc/mplayer/mplayer.conf change vo=x11 to vo=xv
I got the error message:
Internal Error on Browser End: No manager for initializing factory
This was due to a wrong java plugin link.
Psi
apt-get install psi kcontrol
- Change fonts for messages etc. under options to some nice ones from the ArtWiz package
- Change fonts for GUI with kcontrol
xmms
apt-get install xmms gstreamer0.8-plugins gstreamer0.8-mad gstreamer0.8-lame w32codecs
- Important: check that you have the multiverse entries in /etc/apt/sources.list
- the lame package cannot be authenticated, you'll have to live with that
- You might also want to add the following repositories to your sources.list, if you want support for alternative music formats like ape, shn, flac or mp4:
apt-get install flac xmms-flac xmms-shn xmms-shn xmms-wma ...
WLAN
apt-get install vpnc
- configure ath0 as wlan device
- copy existing vpnc.conf
ifup ath0 vpnc-connect
Acroread
apt-get install acroread
Playing DVDs
apt-get install totem totem-xine libdvdcss2 libdvdread3 regionset regionset --> set regioncode 2 (necessary before any RC DVD can be played)
The libdvdcss is not availiable as package anymore in the ubuntu distribution. It is downloadable at
http://download.videolan.org/pub/videolan/debian/pool/libdvdcss/1.2.8/
Fetch the deb package and install.
Playing Videos
Download:
http://www.mplayerhq.hu/MPlayer/releases/codecs/all-20060611.tar.bz2
Then
sudo mkdir /usr/lib/win32 cd /usr/lib/win32 sudo tar jxvf /path/to/all-20060611.tar.bz2 sudo mv all-20060611/* . sudo rm -rf all-20060611
LaTeX
apt-get install tetex-base tetex-extra tetex-bin tetex-doc gv psutils apt-get install kile lyx lmodern rsync -avz marcie:/usr/sw/tex-add /usr/sw/ cfagent -u chmod guo+x /etc/texmf chmod -R guo+r /etc/texmf
Emacs / Gnus
apt-get install ispell metamail openssl rsync -avz marcie:/usr/sw/emacs/22.0 /usr/sw/emacs/
E-Mail / Postfix
apt-get install libsasl-digestmd5 libsasl-modules-plain
Follow instructions from admdoc. Also: change myhostname in main.cf to the actual f.q. hostname instead of localhost.localdomain. The name of the relayhost and the name of the host in saslpasswd have to match ;)
Bluetooth
apt-get install bluez-utils echo enable > /proc/acpi/ibm/bluetooth
ThinkPad Buttons
The package tpb in Hoary seems to be broken:
wget http://ftp.de.debian.org/debian/pool/main/t/tpb/tpb_0.6.3-2_i386.deb dpkg -i tpb_0.6.3-2_i386.deb
Follow [2] for the rest.
Beagle
The debianized beagle package is quite sucky as it doesn't state all its dependancies. So you have to install everything manually:
apt-get install mono gtk-sharp sqlite libxss-dev libmono-dev libdbus-cil libgecko-cil
and a whole bunch of other packages which will be automatically installed as dependencies of the former. Now you can
apt-get install beagle
Follow the instructions to enable extended attributes for file
[3]
Start the beagle-daemon as user with
beagled
You can monitor the daemon activities with
beagle-status
After the daemon has indexed some stuff, you can start best (beagle's gui), which will sit in your tray until you call it (by default it's bound to F12). Issue a search and be amazed ;)
ssh/gpg
- use gpg-agent for caching gpg keys
apt-get install gnupg2 gnupg-agent pinentry-gtk2 keychain
- edit you .gnupg/gpg.conf and uncomment the line use-agent
- create a .gnupg/gpg-agent.conf
pinentry-program /usr/bin/pinentry-x11 enable-ssh-support write-env-file $HOME/.gpg-agent-info no-grab default-cache-ttl 43200
- remove all the stuff about ssh-agent from your .xinitrc, .xsession or KDE startup scripts
- add the following (of course replace the gpg key id with your own)
keychain --clear ~/.ssh/id_dsa ~/.ssh/id_rsa 786F5A89
. ~/.keychain/${HOSTNAME}-sh
. ~/.keychain/${HOSTNAME}-sh-gpg
single sign on with ssh passphrase
Note: the following doesn't really work very well with the gpg-agent setup described above. Revert those changes if you have any problems getting this to work. Unfortunately the single sign on procedure doesn't work for the GPG key.
First install libpam-ssh
sudo apt-get install libpam-ssh
Then, add two lines to /etc/pam.d/{gdm,kdm} (depending on your flavor of login manager), as well as /etc/pam.d/login, to include pam-ssh-auth and pam-ssh-session. My files look like this:
/etc/pam.d/gdm
auth requisite pam_nologin.so auth required pam_env.so @include pam-ssh-auth @include common-auth @include common-account session required pam_limits.so @include common-session @include pam-ssh-session @include common-password
/etc/pam.d/login
... # Standard Un*x authentication. @include pam-ssh-auth @include common-auth ... # Standard Un*x account and session @include common-account @include common-session @include pam-ssh-session
You may have to restart sshd, but maybe not. Restart gdm/kdm and you should be asked for your passphrase instead of a password on login. Same for console login. If you don't provide a passphrase (just hit ENTER), you will be asked for your password. If you do provide a passphrase however, the unlocked ssh key it will be fed to the agent, and you should be able to use ssh without additional hassle.
remaining problems
- fonts used in window decoration don't seem to have umlauts and other special characters
