Ubuntu notes
Boot process
- What are the stages of the boot process?
- BIOS
- Master Boot Record
- Bootloader (LILO, GRUB)
- Kernel
- init
- Run Levels
- Where is the GRUB menu list?
/boot/grub/menu.lst
- How do I get rid of Ubuntu splash screen / progress bar and show scrolling text?
Removequietandsplashfrom "kernel" line in/boot/grub/menu.lst
http://en.wikipedia.org/wiki/Linux_startup_process
http://www.debianhelp.co.uk/boot.htm
Run levels
- What are the run levels for Ubuntu?
1: single user
2: default
3-5: same as 2
6: reboot
- Where can I find the default startup programs for run level 2?
/etc/rc2.d
- How do I update the symbolic links in
/etc/rc?.d?
Useupdate-rc.d. For help,man update-rc.d.
- Where is the default run level set in Ubuntu?
/etc/event.d/rc-default
Xsessions
- Where is another location for startup programs?
/etc/X11/Xsession.d
Restarting
- What are some alternatives to rebooting?
- Restart the display manager, gdm
sudo /etc/init.d/gdm restartorCTRL+ALT+BACKSPACE - Switch to runlevel 1 then back to runlevel 2
sudo telinit 1thentelinit 2(this didn't work for me; I wasn't able to get to runlevel 1.) - This article has a lot of good tips including Alt+SysReq+"Raising Skinny Elephants Is Utterly Boring" - http://www.linuxclues.com/articles/09.htm
- Restart the display manager, gdm
- How can I reboot?
rebootorCTRL+ALT+DEL
Keeping Ubuntu time up to date
I would think Ubuntu would install something to keep the system clock from
drifting, but it seems they haven't. There are at least 2 options: ntpdate and
ntpd. Ntpdate is used from a cron script to sync the time once a day. Ntpd runs
as a daemon and ajusts the time continually but it costs resources. On my machine,
using ps -e -O rss | grep ntpd, I got 1.3 MB of memory use.
Here is how to install ntpd:
sudo apt-get install ntp
The ntp config file is located at: /etc/ntp.conf
Reference: https://help.ubuntu.com/9.04/serverguide/C/NTP.html
My /etc/apt/sources.list
This sources.list includes security, updates, and proposed (but not backports) and source for the main, restricted, universe, and multiverse repositories.
deb http://archive.ubuntu.com/ubuntu/ jaunty main restricted universe multiverse deb-src http://archive.ubuntu.com/ubuntu/ jaunty main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu/ jaunty-security main restricted universe multiverse deb-src http://archive.ubuntu.com/ubuntu/ jaunty-security main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu/ jaunty-updates restricted main universe multiverse deb-src http://archive.ubuntu.com/ubuntu/ jaunty-updates restricted main universe multiverse deb http://archive.ubuntu.com/ubuntu/ jaunty-proposed restricted main multiverse universe deb-src http://archive.ubuntu.com/ubuntu/ jaunty-proposed restricted main multiverse universe
My filesystem changes
- For wmii:
sudo ln -s /usr/include/freetype2/freetype /usr/include/freetype
System config file changes:
These changes apply to Ubuntu Karmic
- Disable xsplash before session load:
Comment out the following from
/etc/gdm/PreSession/Default:if [ -x '/usr/bin/xsplash' ]; then /usr/bin/xsplash --daemon fi - To run ~/.xsession from gdm: Create a '.desktop' file in '/usr/share/xsessions' [owned by root:root with permissions 644] whose 'Exec' entry is '/etc/X11/Xsession'.
How to show what you've installed with apt-get
Haven't found a way that I'm happy with yet. Here are some options:
sudo apt-get install apt-show-versions apt-show-versions
dpkg --get-selections
dpkg -l
-
cat /var/log/dpkg.log | grep installed
Sound troubleshooting
- Make sure speakers are plugged in / power strip on. (For some reason, the power to my speakers keeps going out.
- Run gnome-volume-control. Make sure volume is up and not muted. (For some reason on Karmic this resets to mute on restart.)
Skype microphone troubleshooting
Running Skype 2.1.0.47-1 on Ubuntu Karmic
- Run gnome-volume-control. Select Microphone 1. Raise the volume up to almost Max.
- (Testing can be done with gnome-sound-recorder.)
Flash
- Karmic w/ Firefox 3.5.5
Can't click in Flash - http://ubuntuforums.org/showthread.php?t=1314910
Emacs keybindings
Copy /usr/share/themes/Emacs/gtk-2.0-key/gtkrc to ~/.gtkrc-2.0. Edit as necessary.
(Hardware) System Information
sudo apt-get install sysinfo
custom xsession
Edit /usr/share/xsessions/user.desktop
[Desktop Entry] Name=~/.xsession Comment=User's .xsession Exec=/etc/X11/Xsession TryExec=/etc/X11/Xsession Icon= Type=Application
Can't create test file error
Trying to move datadir from /var/lib/mysql to /mnt/mysql-data on EC2
http://ubuntuforums.org/showthread.php?t=782224
Had to edit /etc/apparmor.d/usr.sbin.mysqld
Troubleshooting X freezes
- Troubleshooting X freezes, hangs, and lockups
- Troubleshooting keyboard and mouse failure due to HAL breakage
Thinkpad W510 suspend
http://math.umons.ac.be/an/W510/#ACPIhttps://bugs.launchpad.net/ubuntu/+source/linux/+bug/522998
For Ubuntu 10.10:
/etc/pm/config.d/unload_modulesSUSPEND_MODULES="xhci_hcd"
Note: in 10.04, I had "xhci" instead of "xhci_hcd"
Cisco VPN¶
$ sudo apt-get install network-manager-vpnc
- Click on network manager icon in gnome-panel
- VPN Connections -> Cofigure VPN...
- Import
- Select file from my company
- Set user name
- Apply
- Close
- Restart newtork-manager
$ sudo /etc/init.d/network-manager restart - Click on network manager icon in gnome-panel
- VPN Connections -> My Company
- Enter password
- Done
VPN change to gain access to important stuff on our network¶
- click network icon - "VPN Connections" > "Configure VPN..." - highlight "My Company VPN" - "Edit" - "IPv4 Settings" tab - "Routes..." - uncheck "Use this connection only for resources on its network" - "OK" - "Apply" - "Close"
When the above vpn setup didn't work with my Verizon mifi¶
...using vpnc from the command line worked:
http://www.debuntu.org/how-to-connect-to-a-cisco-vpn-using-vpnc
See also: http://www.chicagotech.net/routingissuesonvpn.htm.
Set the timezone on a server¶
run as root
# dpkg-reconfigure tzdata
Set the hostname on a server¶
run as root
# echo "plato" > /etc/hostname
# hostname -F /etc/hostname
Edit /etc/hosts:
127.0.0.1 localhost.localdomain localhost 12.34.56.78 plato.example.com plato
HTML messages in Claws Mail¶
- Install extra plugins
$ sudo apt-get install claws-mail-extra-plugins - Load the Fancy HTML plugin
Configuration -> Plugins.. -> Load... -> fancy.so - Configure preferences
Configuration -> Preferences... -> Message View/Text Options, under "HTML messages", uncheck the first box and check the second and third boxes.
Configuration -> Preferences... -> Plugins/Fance, check "Auto-Load images" and uncheck "Block external content"
How to set the folders for Sent, Drafts, and Trash¶
- Configuration -> Preferences for current account... -> Advanced
- Select the appropriate folders
- OK
Post a comment
About
I'm Eliot and this is my notepad for programming topics such as Python, Django, Ubuntu, Emacs, etc... more »
Search Blog
Tags
-
algorithms
(5)
-
aws
(9)
-
blogproject
(20)
-
c_cplusplus
(12)
-
cardstore
(8)
-
colinux
(2)
-
concurrency
(13)
-
conkeror
(2)
-
core
(2)
-
cygwin
(17)
-
datastructures
(14)
-
datetime
(4)
-
decorators
(4)
-
django
(40)
-
emacs
(22)
-
files_directories
(11)
-
git
(5)
-
hardware
(5)
-
install_setup
(8)
-
javascript
(3)
-
keyboard
(9)
-
matplotlib
(5)
-
mercurial
(4)
-
nginx
(2)
-
persistence
(5)
-
preferences
(7)
-
processes
(4)
-
pyqt
(18)
-
python
(144)
-
ratpoison
(3)
-
regexes
(6)
-
rsync
(3)
-
softwaretools
(17)
-
sql
(14)
-
ssh
(10)
-
subversion
(6)
-
twisted
(7)
-
ubuntu
(65)
-
urxvt
(5)
-
vxworks
(25)
-
webdev
(5)
-
wmii
(7)
Blogroll
- Adam Gomaa
- Alex Clemesha
- Amir Salihefendic
- Armin Ronacher
- David Beazley
- David Ziegler
- Duncan McGreggor
- Gareth Rushgrave
- Glyph Lefkowitz
- Guido van Rossum
- Ian Bicking
- Jacob Kaplan-Moss
- James Bennett
- James Tauber
- Jesper Noehr
- Marty Alchin
- Matt Harrison
- Nikolay Kolev
- Parand Darugar
- Peter Baumgartner
- Peter Bengtsson
- Rob Hudson
- Simon Willison
- Will McGugan