Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

2008-11-05

ubuntu installation + configuration (howto)

The following guide is suited to my personal preferences and serves as a memo how to fluently install and configure ubuntu linux system (in this case ubuntu desktop edition 8.10 Intrepid Ibex on Thinkpad X41 Tablet).

preparation

  1. backup old system (/etc, /home, export mysql databases, /usr/share/jedit, package list...)
  2. download freshest ubuntu image
  3. create ubuntu bootable cd/dvd or bootable usb flashdisk (memory stick)

installation

  1. boot from ubuntu live cd/dvd/flashdisk, choose "install ubuntu"
  2. set disk partitioner to manual, create two partitions:
    • swap (~1GB)
    • ext3 mapped to "/" (>2.2GB, which is the size of installed ubuntu 8.10 system)
  3. finish the installation, reboot and install updates

configuration

  1. terminal
    • create profile jjblack (black bg, no menu, no scrollbars)
    • keyboard shortcuts (disable F10,...)
  2. keyboard
    • add czech keyboard layout
    • import my layout from backup (/usr/share/X11/xkb/symbols/cz)
      in older versions of ubuntu: (/etc/X11/xkb/symbols/cz)
  3. firefox
    • create profile jjmini (addressbar right from menu, mini icons, no toolbars, blank start page, downloads to inbox, master password, instant search typing)
    • import bookmarks from backup (bookmarks/organize bookmarks/import and backup/restore/choose file
  4. install essential packages sudo apt-get install mc vim lynx sun-java6-bin jedit p7zip-full p7zip-rar subversion
  5. config files
    • .bashrc, .vimrc, .lynxrc, .gtk-bookmarks...
  6. customize filesystem
    • setup mountpoints (sudo gedit /etc/fstab), reboot
    • customize names of special dirs (gedit ~/.config/user-dirs.dirs)
    • rename and create home dirs (desktop, inbox, outbox, template, public, music, speech, pic, vid, temp, bin, ...) and mount dirs (/mnt/winxp, /media/lib, /media/voyager
    • import my data and settings from backup (inc. dotted files+dirs, /usr/share/jedit/jars, ...)
  7. hardware
  8. desktop
    • theme (gdm, gtk, icons, wallpaper, sounds)
    • keyboard shortcuts
    • panels
    • system/preferences, system/administration
    • compiz config manager (sudo apt-get install compizconfig-settings-manager)
  9. dev
    • apache (sudo apt-get install apache2 libapache2-mod-php5 libapache2-mod-python mysql-server mysql-client php5-mysql php5-mcrypt phpmyadmin)
    • ide (eclipse)
  10. productivity
    • drawing/sketching (xournal, gogh, tux paint, open office drawing)
    • graphics/publishing (inkscape, xara extreme, Scribus)
    • mind mapping (freemind, vue, labyrinth)
    • project manager (Project Management)
    • handwriting recognition (CellWriter)
  11. communication
  12. learning
    • japanese dictionary (gjiten)
    • flash card learning (mnemosyne)
  13. multimedia
    • audio/video codecs (gstreamer extra plugins)
    • player (mplayer)
    • audio editor (audacity)
    • character map viewer (charmap)
    • music player/scrobbler (last.fm)
    • guitar tablature player/editor (tux guitar)
  14. filesharing
    • dc++ client (DC++)
  15. performance tweaks (see also ultimate ubuntu performance tweaking)

2008-06-14

How I organized my music library

This is how i organized my music library (mp3 files):
  1. i deleted thousands of tracks and albums that don't inspire me/are not to my taste/make me feel bad/...
  2. i renamed all files to the following format: %artist - %title.mp3
  3. i moved all files to single folder named music
  4. i used utils like mp3renamer, musicbrainz tagger, etc to fetch tags from the internet and tag all the files
  5. now whenever i listen to music in amarok, i add tags to tracks i listen to. i use the comment tag to store my own tags (e.g. meditative, relaxing, flute, dreamy, ambient)
I really love the way my music is organized now. I can't wait for filesystem which will native tagging support (maybe future version of ubuntu?)

2008-05-25

Linux glossary

svn
tool to manage source code changes (version control system)
xmodmap
utility for modifying keymaps and pointer button mappings in X
bash
Bourne Again SHell, a command line environment
cron
program scheduler
daemon
service
lilo
LInux LOader, boot manager
grub
boot manager
binaries
executable programs
CLI
command line interface
gzip
file compression utility
grep
regular expression based line filter
init
first proces run after OS load
kernel
core of the os, interacts with hw, manages resources
MBR
Master Boot Record, first physical sector on a bootable disk drive
mount
identify disk drive to the file system before use
NFS
Network File System, filesystem that allows sharing of files across the network
open-source
software released with source code
OSS
Open Sound System, sound hardware driver, supports most-popular devices
pipe
|, symbol used to chain commands in shell
POSIX
Portable OS Interface for uniX
redirection
>, symbol used to send program output to a text file
script
set of commands stored in a file
session
period between login and logoff
shell
OS CLI
shell script
script designed to run automatically when a shell is started
superuser
root (admin)
syslog
system logger where all system errors/messages are stored
widget
GUI object (button...)
alias
shell command that allows user to create alias for a command
acroread
pdf viewer
802.11
wireles network (WLAN)

2008-05-21

Setting up Thinkpad X41 Tablet in Ubuntu

Fingerprint reader

  1. install thinkfinger (sudo apt-get install thinkfinger-tools libpam-thinkfinger)
  2. acquire fingerprint (sudo tf-tool --acquire)
  3. verify fingerprint (sudo tf-tool --verify)
  4. update pam config (sudo gedit /etc/pam.d/common-auth so it contains only these 2 lines: auth sufficient pam_thinkfinger.so auth required pam_unix.so try_first_pass nullok_secure
    update for ubuntu 8.10: change the according lines in this file so it looks like this: ... # here are the per-package modules (the "Primary" block) auth sufficient pam_thinkfinger.so auth [success=1 default=ignore] pam_unix.so try_first_pass nullok_secure # here's the fallback if no module succeeds ... here is fix for situation when auth won't proceed until you press enter
(thanks to wiki.ubuntu.com/ThinkFinger and thinkwiki.org/wiki/How_to_enable_the_fingerprint_reader_with_ThinkFinger)

Back/Forward keys

update for ubuntu 8.10: you can skip this step as the keys work out of the box

run sudo gedit /etc/X11/Xmodmap,

add: keycode 234 = XF86Back keycode 233 = XF86Forward
for immediate effect run xmodmap /etc/X11/Xmodmap (Note: this works in hardy, you may need to use Xmodmap instead in older versions of Ubuntu)

Trackpoint scrolling

sudo gedit /etc/X11/xorg.conf, locate section InputDevice with identifier Configured Mouse, add Option "EmulateWheel" "true" Option "EmulateWheelButton" "2"

update for ubuntu 8.10: how to enable trackpoint in ubuntu 8.10

Stylus

  1. install wacom driver (sudo apt-get install xserver-xorg-input-wacom wacom-tools)
  2. sudo gedit /etc/X11/xorg.conf, add Section "InputDevice" Identifier "stylus" Driver "wacom" Option "Device" "/dev/input/wacom" Option "Type" "stylus" Option "ForceDevice" "ISDV4" EndSection Section "InputDevice" Identifier "eraser" Driver "wacom" Option "Device" "/dev/input/wacom" Option "Type" "eraser" Option "ForceDevice" "ISDV4" EndSection Section "InputDevice" Identifier "cursor" Driver "wacom" Option "Device" "/dev/input/wacom" Option "Type" "cursor" Option "ForceDevice" "ISDV4" EndSection, locate section ServerLayout, append InputDevice "stylus" "SendCoreEvents" InputDevice "cursor" "SendCoreEvents" InputDevice "eraser" "SendCoreEvents"

    update for ubuntu 8.10: Section "InputDevice" Driver "wacom" Identifier "stylus" Option "Device" "/dev/ttyS0" # Change to /dev/input/event for USB Option "Type" "stylus" Option "ForceDevice" "ISDV4" # Tablet PC ONLY # Option "KeepShape" "on" # Option "TPCButton" "off" EndSection Section "InputDevice" Driver "wacom" Identifier "eraser" Option "Device" "/dev/ttyS0" # Change to /dev/input/eventfor USB Option "Type" "eraser" Option "ForceDevice" "ISDV4" # Tablet PC ONLY # Option "KeepShape" "on" EndSection Section "InputDevice" Driver "wacom" Identifier "cursor" Option "Device" "/dev/ttyS0" # Change to /dev/input/event for USB Option "Type" "cursor" Option "ForceDevice" "ISDV4" # Tablet PC ONLY # Option "KeepShape" "on" EndSection Section "ServerLayout" Identifier "Default Layout" Screen "Default Screen" InputDevice "stylus" "SendCoreEvents" InputDevice "cursor" "SendCoreEvents" InputDevice "eraser" "SendCoreEvents" EndSection

  3. sudo gedit /etc/acpi/resume.d/20-setserial.sh, append #!/bin/bash /bin/setserial /dev/ttyS0 port 0x0200 irq 5 autoconfig and sudo chmod +x /etc/acpi/resume.d/20-setserial.sh

Display rotation

Ubuntu Thinkpad X41 tablet screen rotation

2008-05-19

Ubuntu hotkeys

global

  • alt + F1 = open panel menu
  • alt + F2 = open panel run dialog
  • ctrl + ins = copy
  • shift + ins = paste
  • (alt) + printscreen = take (window) screenshot
  • ctrl + alt + arrow keys = switch workspace
  • ctrl + alt + tab +arrow keys = cycle between panels and desktop
  • ctrl + alt + d = desktop
  • ctrl + alt + backpace = restart session
  • shift + F10 = context menu

windows

  • alt + tab = switch windows
  • alt + F4 = close window
  • alt + F5 = unmaximize window
  • alt + F7 = move window
  • alt + F8 = resize window
  • alt + F9 = minimize window
  • alt + F10 = maximize window
  • =
  • =
  • =

2008-01-15

Starting with Ubuntu linux

Installation

  1. download image from ubuntu.com
  2. burn image to cd (using nero)
  3. boot from the cd
  4. install ubuntu
  5. download updates
  6. add essential software (see below)
  7. disable pc speaker beep sudo rmmod pcspkr
  8. enable numlock at startup: gedit /etc/gdm/Init/Default add: if [ -x /usr/bin/numlockx ]; then /usr/bin/numlockx on fi
  9. set screen resolution and refresh rate
  10. customize names of special dirs: gedit ~/.config/user-dirs.dirs (renaming/moving them in nautilus should work too)
  11. uninstall open java and install sun java instead (to solve jedit display problems)

Essential software

  • file manager: Krusader (+krename +kdiff3 +rar), Gnome Commander, Midnight Commander
  • web browser: Firefox (+firebug)
  • text editor: jEdit, vim, cream, GNU Emacs, XEmacs, Eclipse
  • media player: amarok
  • p2p: LinuxDC++, KTorrent, eDonkey 2000
  • im: Pidgin (gnome), Kopete (KDE)
  • graphic editor: GIMP
  • audio editor: Audacity
  • video editor: Kino
  • drive partitioning: GParted
  • antivirus: ClamAV
  • firewall: Firestarter
  • email: Thunderbird (sudo apt-get install mozilla-thunderbird)
  • dvd burning: K3b
  • pdf reader: KPDF, Evince, KGhostView
  • desktop: SuperKaramba (KDE only!), Beryl, Compiz
  • asio: JACK
  • daw: Ardour, Hydrogen, Rosegarden
  • games: Advanced strategy command

How to …

find a text file?
locate filename
view a text file?
more filename
edit a text file?
gedit filename
find a file containing …?
locate *.txt | grep sometext
install a package?
sudo apt-get install packagename
uninstall a package?
sudo apt-get remove packagename
define custom keyboard shortcuts?
...
mount a disk partition permanently?
sudo gedit /etc/fstab, add e.g. /dev/disk/by-label/IBM_PRELOAD /home/jj/sys_xp ntfs-3g locale=en_US.utf8,user,noauto,uid=1000,gid=1000,dmask=0000,fmask=0111,dir_umask=0000,file_umask=0111 0 0
set environment variables?
/etc/environment
edit keyboard layout?
sudo gedit /usr/share/X11/xkb/symbols/cz
set permissions recursively + conditionally?
find /home/user/demo -perm 777 -print -exec chmod 755 {} \;
make xampp start automatically after reboot?
sudo ln -s /opt/lampp/lampp /etc/init.d/lampp sudo update-rc.d -f lampp defaults
...
...

Filesystem

  • bin - essential user binaries (for use by all users)
  • dev - device files
  • etc - config files (host-specific system config, environment vars...)
  • home - home dirs of individual users
  • lib - essential system libraries and kernel modules
  • root - home dir of root user
  • sbin - essential binaries used for system administration
  • tmp - world-writable dir for temporary files
  • var - variable data files like logs
  • media - mount point for removable media
  • mnt - mount point for temporarily mounted filesystem
  • opt - add-on application sw packages
  • srv - data for services provided by this system