This page contains personal notes regarding installation and use of Debian or Ubuntu systems.
It's possible to boot on the CD using a specific kernel (in particular a 2.6 kernel). Check out options. To select all packages one by one: /usr/sbin/base-config
Before you struggle opening the box or finding the adequate screwdriver, you can try out the following:
I have an ATI Radeon X1250 (X1200 Series). aticonfig (aticonfig –initial -f), log file in /usr/share/ati
The installation should automatically update /etc/X11/xorg.conf. In particular,
Section "ServerLayout" Identifier "Default Layout" Screen 0 "aticonfig-Screen[0]" 0 0 InputDevice "Generic Keyboard" InputDevice "Configured Mouse" InputDevice "stylus" "SendCoreEvents" InputDevice "eraser" "SendCoreEvents" InputDevice "cursor" "SendCoreEvents" InputDevice "pad" Option "BlankTime" "10" Option "StandbyTime" "20" Option "SuspendTime" "30" Option "OffTime" "40" EndSection Section "Device" Identifier "aticonfig-Device[0]" Driver "fglrx" Option "UseInternalAGPGART" "no" EndSection Section "Screen" Identifier "aticonfig-Screen[0]" Device "aticonfig-Device[0]" Monitor "LCD" DefaultDepth 24 SubSection "Display" Viewport 0 0 Depth 24 Modes "1024x768_60.00" EndSubSection EndSection
# fglrxinfo display: :0.0 screen: 0 OpenGL vendor string: ATI Technologies Inc. OpenGL renderer string: ATI Radeon X1200 Series OpenGL version string: 1.2 (2.0.6958 Release)
Run fglrx-uninstall.sh
The best refresh rate for this monitor is definetely 60Mhz (though it supports 75Mhz).
In /etc/X11/xorg.conf:
Section "Monitor" Identifier "LCD" Option "VendorName" "PHILIPS" Option "ModelName" "150S" HorizSync 30 - 61 VertRefresh 60 Option "DPMS" EndSection
I am the happy owner of a Wacom Graphire input tablet. It turned out to be very simple to get it to work on Debian etch, because the default tablet already provides the necessary kernel module (name: wacom).
I had to modify /etc/X11/xorg.conf as follows:
Section "InputDevice" Driver "wacom" Identifier "stylus" Option "Device" "/dev/input/wacom" # USB ONLY Option "Type" "stylus" Option "USB" "on" # USB ONLY EndSection Section "InputDevice" Driver "wacom" Identifier "eraser" Option "Device" "/dev/input/wacom" # USB ONLY Option "Type" "eraser" Option "USB" "on" # USB ONLY EndSection Section "InputDevice" Driver "wacom" Identifier "cursor" Option "Device" "/dev/input/wacom" # USB ONLY Option "Type" "cursor" Option "USB" "on" # USB ONLY EndSection # This section is for Intuos3, Cintiq 21UX, Graphire4, or Bamboo Section "InputDevice" Driver "wacom" Identifier "pad" Option "Device" "/dev/input/wacom" # USB ONLY Option "Type" "pad" Option "USB" "on" # USB ONLY EndSection Section "ServerLayout" Identifier "Default Layout" Screen "Default Screen" InputDevice "Generic Keyboard" InputDevice "Configured Mouse" InputDevice "stylus" "SendCoreEvents" InputDevice "eraser" "SendCoreEvents" InputDevice "cursor" "SendCoreEvents" InputDevice "pad" EndSection
In GIMP, it must be configured too: Preferences → Input Devices → Configure Extended Input Devices and put all pad, stylus, eraser to “screen” (this is so that the tablet maps the entire screen, which is the way I want to behave).
I have an old Mustek scanner, on the parallel port. I managed to install it on my Debian without too much trouble, except my scanner is probably broken (hardware!) but that's another issue
To install it, you need SANE and the Mustek backend.
Then, it /etc/sane.d/dll.conf: leave net and mustek_pp. You can erase everything else… In /etc/sane.d/mustek_pp.conf : put the following configuration:
scanner mustek-6000P * ccd300 option top 56 option wait-lamp 15 option niceload
The options are recommended options I have found on the web, I am not so sure they are really necessary. The top option will ignore a few lines at the top of the page, the wait-lamp is some kind of pre-heating for the scanner, and the niceload option actually makes the scan slower.
You should now be able to scan, using xscanimage or xsane. At least as root. If the scanner is on parallel port, you need libieee1284 to use it as a normal user. Then set adequate permissions to /dev/parport0 (chgrp users /dev/parport0)
Finally, to debug, try out those settings:
SANE_DEBUG_MUSTEK_PP=1 scanimage -L or even SANE_DEBUG_MUSTEK_PP=128 scanimage -L
To re-install GRUB:
root (hd0,1) or find /boot/grub/stage1 setup (hd0) quit
The setup line actually resets the MBR. Of course, another way to do that is to copy back the MBR (using dd).
To list partitions of your disk:
fdisk /dev/sda (or hda... or something that matches your disk)
or cat /proc/partitions.
Windows is unable to format FAT 32 partitions bigger than 32Go, but Linux can do it (and then Windows can access those partitions):
mkfs -t vfat -F 32 /dev/sda3
Mounting Windows partitions under a given identity with a given mask
mount -t vfat -o rw,user,gid=users,dmask=0000,fmask=0111 /dev/hda... /mntpoint
Beware, NTFS partitions in RW is still really experimental for 2.6 kernels (possible to modify existing files, but not to create new ones !)
To list all mounted systems, use mount or cat /proc/mounts.
Restart: kill -SIGNAL `cat /var/run/syslogd.pid` with signal=SIGHUP
To set (or reset) the locale, do :
dpkg-recondigure locales
To know which distribution you are using (works for Ubuntu):
lsb_release -rd
or read /etc/lsb-release.
Modify /etc/hostname and /etc/hosts. Reboot.
To set up a static IP address:
iface eth1 inet static address <your IP address, e.g 192.168.x.y> netmask <your mask, e.g 255.255.255.0> gateway <your gateway, e.g 192.168.x.254>
* set up the route: route add default gw <your gateway>
Make sure package dhcp-client is installed.
To set up DHCP for a client:
auto eth0 iface eth0 inet dhcp
To check a network configuration:
export http_proxy=http://server:port export ftp_proxy=ftp://server:port
Don't forget the “http:” or “ftp:”
For apt-get, if you need a proxy, add the following line to apt's configuration:
Acquire::http::Proxy "http://server:port";
To deny an IP address put it in /etc/hosts.deny
Postfix is the default MTA for Ubuntu. It does not include a POP3 or IMAP server (see dovecot) Its main configuration files are located in /etc/postfix (main.cf). Use postconf for configuration.
To start, reload or stop postfix: /etc/init.d/postfix start (reload…). Be sure that sendmail is not running: /etc/init.d/sendmail stop
To use SSH:
Concerning one of the latest OpenSSL PRNG bugs, see here.
To reconfigure SSH (and regenerate keys):
rm /etc/ssh/ssh_host_* dpkg-reconfigure openssh-server
To share a directory with NFS
Make sure the following options are set in your kernel: CONFIG_NFS_FS, CONFIG_NFS_V3, CONFIG_NFSD and CONFIG_NFSD. Also set CONFIG_NFS_FS=m
CONFIG_NFS_V3=y # CONFIG_NFS_V3_ACL is not set CONFIG_NFS_V4=y CONFIG_NFS_DIRECTIO=y CONFIG_NFSD=m CONFIG_NFSD_V3=y # CONFIG_NFSD_V3_ACL is not set CONFIG_NFSD_V4=y CONFIG_NFSD_TCP=y CONFIG_NFS_COMMON=y
Get the necessary packages:
apt-get install nfs-kernel-server
Set up file systems to export : /etc/exportsex: /mnt/mydir 192.168.128.0/24(rw,mp=/mntpoint,async) mp: makes sure specified mount point is mounted
Update using command : exportfs -r
Check NFS is launched: rpcinfo -p: one must see statd, mountd & portmap. Otherwise, relaunch the nfs server daemon. To allow acces to the system:
/etc/hosts.allow portmap : 192.168.0.0/255.255.255.0 : allow portmap : ALL : deny
apt-get install nfs-common portmap
try to mount the file system manually:
mount 192.168.0.2:/home /mnt/nfs
If it works, put it in /etc/fstab
[share] ... guest ok = Yes ... [global] read only = No security = SHARE
To set up multiple web servers on a same host, listening on different ports, set the Apache configuration as follows:
<VirtualHost IP address:8000> Port 8000 </VirtualHost>
To support PHP5 on Apache, do the following:
# aptitude install apache php5 libapache-mod-php5 # dpkg-reconfigure apache # aptitude install php5-sqlite
An alternative to installing Apache, PHP, MySQL (etc) consists in using XAMPP, an all-in-one preconfigured package. XAMPP for Linux is typically installed in /opt/lampp and the daemon can be controlled using the command ./lampp (lampp start, stop, security…).
Configuration of the Apache, ProFTPD (etc) servers are in etc. To authorize web pages for users, use mod_userdir.
Xorg.conf needs to be configured in the following situations:
It's usually nice to install x-window-system-core and x-window-system to set up X Window. Then, configure it using :
dpkg-reconfigure xserver-xfree86
Also check the file /etc/X11/XF86Config-4
To make sure XDM or KDM are not loaded at boot: remove files S99xdm and S99kdm in /etc/rc?.d
Run gdmsetup (as root) or in /etc/gdm/gdm.conf:
AutomaticLoginEnable=true AutomaticLogin=username
In .xinitrc, put:
xterm & fvwm
To enable Window Manager Tweaks:
mousepad ~/.config/xfce4/mcs_settings/wmtweaks.xml
Then, in Applications/ Settings/ Settings Manager, find “Window Manager Tweaks”.
To lock the screen, XFCE4 relies on xscreensaver. If you want to use something else, modify the script /usr/bin/xflock4. For example, to use xlock:
xlock $*
A very common situation consists in logging on a distant host D from your local host L, using ssh. To get windows of D displayed on L is usually one of the first things you learn at school but it turns out sometimes it's more tricky.
Using SSH, this is how to do it:
edit /etc/ssh/ssh_config (or your own ssh config in ~/.ssh) and set
ForwardX11 no ForwardX11Trusted yes
Then, from the prompt on L, do the following:
xhost + (or the host you want to allow) ssh -X <address or name of D> -l <yourloginname>
That's all ! You do not need to set your display. All of this is explained here, with nice hints to help you debug relunctant situations.
I had awful fonts at first when going to my DokuWiki website. This has been easily fixed by installing new (and nice) fonts: the DebianFonts wiki explains it all (I'm copying what I did below, just in case their site disappears, but really, it's better to read their wiki !).
Section "Files" FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType" FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/CID" FontPath "/usr/share/fonts/truetype" FontPath "/usr/local/share/fonts/truetype" FontPath "/usr/lib/X11/fonts/CID" FontPath "/usr/lib/X11/fonts/Speedo" FontPath "/usr/lib/X11/fonts/misc" FontPath "/usr/lib/X11/fonts/cyrillic" FontPath "/usr/lib/X11/fonts/100dpi:unscaled" FontPath "/usr/lib/X11/fonts/75dpi:unscaled" FontPath "/usr/lib/X11/fonts/Type1" EndSection
<?xml version="1.0"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <!-- /etc/fonts/local.conf file to configure system font access --> <fontconfig> <dir>/usr/local/share/fonts</dir> </fontconfig>
# apt-get install xfonts-100dpi xfonts-100dpi-transcoded \ xfonts-75dpi xfonts-75dpi-transcoded \ xfonts-base xfonts-base-transcoded # apt-get install ttf-bitstream-vera msttcorefonts ttf-junicode ttf-kochi-gothic ttf-kochi-mincho # wget http://orwell.ru.nyud.net:8090/download/aruniupd.exe # cabextract aruniupd.exe # mkdir -p /usr/local/share/fonts/truetype/ # cp Arialuni.TTF /usr/local/share/fonts/truetype/ # wget http://www.languagegeek.com/font/absans.zip # for font in *.zip; do unzip $font; done # cp *.ttf /usr/local/share/fonts/truetype/ # cd /usr/local/share/fonts/truetype/ # mkfontscale # mkfontdir
Finding the appropriate package that contains a given file: go to the Debian website and use the search engine.
Desktop → Administration → Synaptic Package Manager apt-get mustn't be running.
A neat /etc/apt/sources.list:
# CDrom deb cdrom:[Debian GNU/Linux 4.0 r1 _Etch_ - Official amd64 NETINST Binary-1 2007 0820-20:16]/ etch contrib main # Standard deb http://ftp.fr.debian.org/debian/ stable main contrib non-free # Uncomment this to get packages from the testing distrib #deb http://ftp.fr.debian.org/debian/ testing main contrib non-free # Security deb http://security.debian.org/ stable/updates main contrib # Uncomment if you want the apt-get source function to work #deb-src http://security.debian.org/ etch/updates main contrib
If you get the error “The following signatures couldn't be verified because the public key is not available”, then you should add the corresponding GPG key:
Aptitude is said to resolve conflicts better than apt-get. My own experience is insufficient on that behalf. Any way, aptitude's commands are very similar to apt-get: aptitude install pack*, aptitude update, aptitude upgrade, aptitude dist-upgrade…
o Sukria
o [[http://www.debian.org/doc/debian-policy/ch-archive.html#s-sections|Debian policy]] o [[http://www.debian.org/doc/manuals/maint-guide/ch-dother.en.html#s-docs|Debian maintenance manuals]] o [[http://linuxdevices.com/articles/AT8047723203.html|Linux Devices]]
Reading recommendations of the Debian web site are a good start. Here is how I managed to upgrade from Sarge to Etch:
Beware: I managed to upgrade that way, but there are several other recommendations on Debian's official web site. They may apply to your case.
To synchronize music with the HTC Touch,
Afterstep terminal. Debian package: aterm. To launch a nice transparent terminal, try
aterm -tr -trsb -bg black -fg white -sh 40 -fade 25
EncFS is a nice userland encrypted 'filesystem'. Although its security might not suit all cases, it is pretty handy is several situations.
To install it,
apt-get install fuse-utils encfs
To create or open an encrypted disk:
encfs <encrypted path> <mountpoint>
To unmount an encrypted disk:
fusermount -u <mountpoint>
For more information regarding installation on Ubuntu, follow this link.
To install a flash player plugin on iceweasel, on a 64-bit architecture:
On a 32-bit architecture, it works just straight-away by following the links Firefox displays
To install a screenlet, install the screenlet package:
sudo apt-get install screenlets screenlets-manager &
In particular, I like the window list screenlet.
To install Java (in /usr/lib/jvm/java-6-sun-1.6.0.07)
sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts
To configure the java plugin in Opera, locate libjava.so and put this path in Tools → Preferences → Advanced → Content → Java options.
References: Java on Debian (obsolete ? )
Synchronizes your Palm with Kpilot, and Korganizer but only if it is open. If the Palm is connected to a serial port, try /dev/ttyS0 or /dev/ttyS1.
To update Perl:
sudo perl -MCPAN -e shell
Take a screenshot
$ xwd -root -out scrdump
View a screenshot
$ xwud -in scrdump
Ubuntu makes big use of sudo. There's a neat information page there. For instance, opening a terminal with superuser privileges is possible using the option -s: sudo -s and exit to leave that mode.
download the dynamic binary from Skype's website. It requires Qt 3.2, but works fine.
To be able to launch VirtualBox, make sure to add your users to the vboxusers group.
VMware is typically installed in /usr/bin. To uninstall it, run /usr/bin/vmware-uninstall.pl
Once installed, to get rid of GCC not found complaints:
sudo cp /usr/lib/libpng12.so.0 /usr/lib/vmware/lib/libpng12.so.0/ sudo cp /usr/lib/gcc/i486-linux-gnu/4.2.3/libgcc_s.so /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1
/Old: apt-get install linux-headers-2.6.18-5-amd64: needed to be able to rebuild a vmmon kernel module
aspirer un site:
wget -m -k -p http://lesite