This documents my maintenance routines and personal configurations of Debian and other software for my Debian laptop. Useful web documents are listed in each section, and additional information is available in the main reference and other support documents.
Specific softwares (R, Python, LaTex, etc.) have thier own pages in the notebook.
- Ref manual: http://www.debian.org/doc/manuals/debian-reference/index.en.html
- Debian FAQ: http://www.debian.org/doc/FAQ
- Debian wiki: http://wiki.debian.org
- Index of other support: http://www.debian.org/support
Currently tracking testing. Not using the name (jessie)
Other entries in sources.list:
# The liquorix kernel deb http://liquorix.net/debian sid main - for liquorix kernel # The experimental debian repo - used for a few packages deb http://ftp.debian.org/debian/ experimental main contrib non-free
REMEMBER: After updating sources.list, run
KERNELS, LIQUORIX and others
Excellent resources for Debian Kernels:
- http://wiki.debian.org/KernelFAQ - for general info
The kernel installed by default in the netinst installation is a somewhat generic(not optimized) kernel, so it may be useful to replace it. Though the debian installer installed the correct kernel for my architecture, in some cases one may want to look at other options in the repositiories.
apt-cache search linux-image (or
-headers) should list the available kernels for your achitecture, as well as additional kernels with special featuresets. Install both the linux-headers and the linux-image package you desire.
The Debian kernel was replaced with the "high performance" liquorix kernel package. Liquorix is a Debian repository for Zen-kernel builds.
deb http://liquorix.net/debian/ sid mainin sources.list
apt-get updateand install liquorix-keyrings package.
- Look at current kernel version:
- To find newer liquorix kernel:
apt-cache search liquorix
- Install headers and image for 2.6.xx-0.dmz-liquorix-amd64 (should take a while).
The first time I did this binutils, gcc, and a couple of libs were pulled in.
Liquorix kernels can also be installed and upgraded with the smxi script (smxi.org)
Kernels from Debian or other repos can be customised using the kernel-package program. See http://www.debian.org/doc/FAQ/ch-kernel.en.html
OpenConnect is the open source project allowing connection to Cisco AnyConnect networks, but there are other vpn options. Installing the package below installes the openconnect package and should make it available in the NetworkManager plugin applet.
apt-get install network-manager-openconnect-gnome
You can also use openconnect on the commandline, for example:
Upon startup, UDEV detects hardware and loads needed modules into the kernel. These loaded modules can be viewed with
lsmod and loaded manually (removed) with "modprobe (-r)"
It is possible to force or prevent the loading of a module by listing the name of these modules in one of these files:
- /etc/modules-version (version is the kernel version)
- /etc/modules-major (major is the major kernel version - 2.6)
Modules can also have parameters and arguments passed to them with these files. The SMXI script also has a procedure for adding and removing particular modules.
INSTALLED KERNEL MODULES:
hdaps - advanced harddrive protection for thinkpads.
(tp-smapi no longer supported by new thinkpads, see: http://www.thinkwiki.org/wiki/Tp_smapi)
Liquorix kernels come with
Load now with
modprobe -a tp_smapi hdaps, OR
$echo 'tp_smapi' >> /etc/modules $echo 'hdaps' >> /etc/modules
Add these lines to /etc/modprobe.conf/local.conf
options thinkpad_ec force_io=1 options hdaps invert=1
Set charging threshholds,
$ apt-get install sysfsutils
AND add these lines to sysfs.conf:
devices/platform/smapi/BAT0/start_charge_thresh = 30 devices/platform/smapi/BAT0/stop_charge_thresh = 85
Also install hdapsd to run HDAPS from userspace. This will pull in
dkms(debian versions of these modules), but I subsequently removed
UPDATES and UPGRADES
Generally, use apt:
apt update apt upgrade # OR dist-upgrade (same as full-upgrade)
The reference suggests that apt dist-upgrade may be more suited to major upgrades (between releases, stable to testing, etc) http://www.debian.org/doc/FAQ/ch-uptodate.en.html
Use the drive package here: https://github.com/odeke-em/drive
Someone has made a Debian package for this, see: https://github.com/odeke-em/drive/blob/master/platform_packages.md
SMXI.org MAINTENANCE SCRIPTS
See SMXI.org and http://techpatterns.com/forums/forum-34.html
Install scripts using:
cd /usr/local/bin && wget -Nc smxi.org/smxi.zip && unzip smxi.zip && smxi
Upon installing and running the script it asks a bunch of configuration questions. Add these options:
- Use liquorix kernel
- Use apt-get
- Set distribution to testing
- Use full-upgrade instead of safe
These options can be reset by erasing
Upon reaching the main menu (after upgrades), there are several options:
- Install packages (non-free stuff, large packages, etc)
- Remove packages (remove unneeded packages - bluetooth, gnomemeeting, etc)
- Clean up stuff
- Miscellaneous tweaks (tweaks to mozilla, change script config, etc)
- Virtual machine installer
- Kernel options (install new kernels, add/remove modules)
- Continue to graphics installer
- Restart X/desktop
- Stop Script
So far have done these actions:
- apt cleanups
- removed unneeded xorg modules
- installed google-earth
Sudo is installed by default. Privileges are granted through the
/etc/sudoers file, which must be edited with visudo. I added these lines to the sudoers file:
User_Alias ADMINS = greg # Under 'User alias specification' ADMINS ALL = ALL # Under 'User privilege specification'
To create a list of administrator accounts and grant myself sudo access to all commands.
- Aliases to individual commands can be added with
Cmnd_Aliasstatements and these can be added to User privilege specifications also (instead of ALL)
To maintian syntax highlighting when using sudo from the terminal I used 2 approaches:
Add these to sudoers file (with visudo):
Defaults env_keep += "HOME COLORFGBG LS_COLORS" Defaults env_reset
.bash_aliasesfile and add
alias sudo='sudo 'to it.
CONNECT TO DATA PARTITION (sda5)
Add this line to fstab:
# mount /dev/sda5 as /home/greg/data UUID=79faee16-4164-4fcc-b19c-499084c3764f /home/greg/data ext4 defaults 0 2
CONNECT TO NETWORK DRIVE (NAS)
A NAS drive can be browsed and edited a variety of ways. Note that there are a number of users using the
This command (as root) should mount the drive:
mount -t cifs //<ip-address>/<share-name> /media/<mntpt-name> -o nounix,user=greg,file_mode=0777,dir_mode=0777
There is a script (
~scripts/mount_nas.sh) that can be run with sudo to mount the drive.
sudo umount /<mntpt-name>/
This drive is also available by ssh using:
ssh -l <username> <ip-address>
Network drives can also be mounted with gvfs, as long as
installed (this contains a gvfs-smb package).
Rsyncs to this drive can be done through ssh for backups.
PRINTING to NETWORK PRINTERS
- Install cups, cups-client, and foomatic printer driver packages (these should most likely already be here)
- Start cups with
Navigate to http://localhost:631/
There should be a web interface to cups here where it should be possible to add a printer.
- Administration(login as root)-->Add Printer-->
- HP LaserJets are usually on AppSocket protocol using port 9100, so select this option from the bottom of this list (below network printers).
socket://<ip-address>:9100/for the URI connection
- Name the printer with human readable identifiers.
- Select make and driver (HP LaserJet4250 Foomatic/Postscript for BowlingLJ).
- Add printer.
- Set Default options (two sided, etc)
- You can now set this printer as default if desired.
openssh-client should be installed for ssh access to remote hosts. For added security, it is best to use public/private keys during ssh sessions. To do this:
Generate a public/private ssh key pair with
ssh-keygen -t rsa -b 4096 -C "email address"
This will put a public/private key pair in the
~/.sshdirectory. You will be asked for a passphrase, which will be needed when sending the public key to a host computer.
Copy the public key to a remote host using
ssh-copy-id user@hostid, or by manually appending the public key to the hosts
cat ~/.ssh/id_rsa.pub | ssh user@server 'cat >> .ssh/authorized_keys'
ssh-agentcan save the passphrase for your public key, just use
ssh-add ~/.ssh/id_rsa. Ive never gotten this to work in XFCE. Needs to be done at the creation of the desktop or bash session, but I'm not sure how this works. Try using
seahorse, etc for this. Or read this -> https://wiki.archlinux.org/index.php/SSH_Keys or the GitHub tutorial.
Make a list of hostnames and ips in
/etc/hostsfor easier access to frequenly accessed hosts.
- Install thunderbird
icedove -profilemanager, create a profile and point it to the profile in
- alternatively, just move the profile folder into
~/.thunderbirdand edit the
profiles.inifile to point to that folder (pu3xvoh.default)
- alternatively, just move the profile folder into
May be required for rgdal and other stuff (qgis should bring this in I think).
sudo apt-get install libproj-dev libgdal-dev
- Need iwlwifi modlule loaded into kernel
This requires firmware (non-free package is
firmware-iwlwifi) to be installed
- Also install
- Verify device is accessible with
- Raise interface with
ifconfig wlan0 up
- Configure wireless interface with network-manager or wicd
- Be sure to point wicd to wlan0
There are a couple ways to install it - covered here: https://wiki.debian.org/VirtualBox
I use the oracle ppa, and add it to /etc/apt/sources.list.d/virtualbox.list
- Stop console beeps while in X with (as root)
xset b off
Stop console beep on gdm login screen using
set bell-style nonein
/etc/inputrcfor a permanent solution in consoles.
OR blacklist the kernel module by adding `blacklist pcspkr" to /etc/modprobe.d/blacklist.conf
arandr provides screen management (frontend for `xrandr" commands). VGA 1 is the VGA port on the side of the laptop, LVDS1 is the laptop's screen
URXVT and other X configs
Setting preferences for X and X applications can be done using .Xdefaults and .Xresources files. See https://wiki.archlinux.org/indes.php/Xdefaults. After adding something to these files use `xrdb -merge ~/.Xdefaults/Xresources".
urxvt is a nice light terminal to replace xterm, but it pays to configure its default colors:
Create ~/.Xdefaults Add a bunch of lines with color definitions and other URxvt config options I used the wiki at http://crunchbanglinux.org/wiki/urxvt Also see wiki.archlinux.org/index.php/Rxvt-unicode
Installed vim with vim-gtk3 Configured in .vimrc using the Brad Moolenar example from vim website Added `set nobackup" to keep annoying backup files (file.txt~) away.
- Download binary from http://labs.bittorrent.com/experiments/sync.html
- Extract binary and move to desired folder (probably /usr/local/installed)
- Run with './btsync'
- Access user interface at http://localhost:8888/gui/
May want to autostart this
I installed Shotwell as a photo organizer This relies on libgphoto2 to communicate with my Canon cameras, it all seems to work as long as this is installed. Gphoto2 can be used to access cameras on the command line.
See here: https://wiki.debian.org/skype
There is a skype for linux deb package to download at:
https://signal.org has instructions for the desktop app
Installing .deb files: Debian packages (.deb files) can be downloaded from various sources. They can be unpacked and installed with `dpkg -i ..." If the .deb fails to install read the dependency output and install the required dependencies and then reinstall.
Getting information about packages:
apt-cache showpkg ..." gives very detailed info about packages, dependencies, etc.apt-cache policy ..." gives info about the repositories a package is in
apt-get show ..." gives general info about packages, good for prior to install"apt-cache search ..." searches for a packageapt-get install -s ..." simulates the install of a package
Viewing logs: All logs are in /var/log/. They can be viewed in a terminal using less, more, etc. `tail /var/log/..." shows the last 10 lines of a log. "tail -f /var/log/... follows the log and updates the display as it is appended.
OTHER PACKAGES to install
- zotero extension - point to ~/data/literature/zotero in prefs
- libreoffice writer, calc, impress
- libreoffice-gtk (helps with desktop integration)
- vim-gtk - set prefs with .vimrc (use moolenaar example)
- google-earth - installed with smxi
- rdesktop (remote desktop for windows access)
- mpd (music player daemon)
- gmpc (client for music player daemon)
- hpodder (podcatcher)