dpkg tips
dpkg is package manager for Debian, and found in most of its derivatives. Programs such as apt and aptitude are front-ends to dpkg. Following are some handy to know dpkg commands.
Package Listing
To display all currently installed packages (including version numbers) or a specfic package:
dpkg -l [package_name] |
Package Querying
To show details about a specific package:
dpkg -p {package_name} |
To find out which files are installed by a package:
dpkg -L {package_name} |
To find out which package installs a particular file:
dpkg -S {/path/to/file | part_of_filename} |
Package Removal
To remove a package but retain the configuration files:
dpkg -r {package_name} |
To remove a package including the configuration files:
dpkg -P {package_name} |
AcerAspireOne Touchpad on Debian

When installing Debian "Testing" on the AcerAspireOne the touchpad does not register a single tap of the pad as a left mouse click. To rectify this add the following line to the file /etc/modprobe.d/psmouse.conf
options psmouse proto=imps |
According to this Ubuntu source, some setups may be better with exps instead of imps.
apt autoclean

To have apt-get/aptitude auto-clean all the downloaded .deb files after running an "update" (to keep as much free space as possible) simply add the following to /etc/apt/apt.conf.d/00autoclean
Aptitude::Autoclean-After-Update; |
ownCloud private web storage

ownCloud is a webdav based application allowing you to store files on your own personal server on the Internet and access them via http or webdav. Installation is as follows:
Ensure apache2, php and mysql are installed
$ apt-get install apache2 php5 mysql-server php5-mysql sqlite php5-sqlite |
Download the latest stable (or the experimental version via git if preferred). At time of writing, the latest stable version is stable version 1.2 and install to the webserver directory:
$ wget 'http://owncloud.org/releases/owncloud-1.2.tar.bz2' $ bunzip2 owncloud-1.2.tar.bz2 $ tar xvf owncloud-1.2.tar $ mv owncloud /var/www/ |
Appropriate permissions need to be set so that the webserver has full control of the directory. On debian or ubuntu this is:
$ chown -R www-data:www-data /var/www/owncloud |
Next you need to decide upon the database used, the administrator user and password. This is done through the "first run wizard" which will appear the first time the owncloud directory is browsed. Sqlite requires no configuration, while selecting MySQL will require additional information to build the tables.
After configuration, the standard login will be presented:
once logged in files are displayed and options to upload or create directories are available under "More Actions":
The web interface is now functioning as well as access via webdav. Since KDE supports webdav it is possible to configure access to the server storage space via the "Network" place as follows:
Select the "webdav"access method:
fill in the details, notice that the folder field is set to "/owncloud/webdav/owncloud.php" (this assumes the installation was to /var/www/owncloud on a debian or ubuntu system)
Upon saving the details a prompt for the password will appear and an option to "Remember password" so you don't have to re-enter it whenever accessing the folder:
The share will now appear in the "Network" places:
And can be used like any other folder on the system within KDE:
The files themselves are stored in a per-user directory in a sub-folder of the owncloud directory entitled "data"
GRUB2 splash image

GRUB2 supports background images being displayed during the selection phase of the boot process. A wide variety of formats are supported, including jpg, png and tga. The image size should be 640x480 pixels.
Place the image in /boot/grub and run the command update-grub, looking for the indication that the image was found:
$ update-grub Generating grub.cfg ... Found background image: splashimg.png |
The next time the system is boot the custom image will be displayed. My example image can be found below
Debian and libdvdread

In order to watch all DVDs on Debian, the libdvdcss needs to be installed. This is not distributed with Debian due to certain restrictions, however, if the restrictions do not apply to you then the following correctly installs the necessary files. First is the installation of libdvdread itself
$ apt-get install libdvdread4 |
In order to install the CSS codings it is necessary to manually obtain them. /usr/share/doc/libdvdread4/README.Debian directs downloads from http://unofficial.debian-maintainers.org/ which then has a link to http://archive.debian-maintainers.org/unofficial/packages/libdvdcss/ from here is a directory entitled "current_i386" (among others) and inside is the deb file required for download. At time of writing the full path is: http://archive.debian-maintainers.org/unofficial/packages/libdvdcss/current_i386/libdvdcss2_1.2.10-1_i386.deb (note that the dev and dbg based deb files are not required for playing DVDs)
Once downloaded the CSS must be manually installed with dpkg
$ dpkg -i libdvdcss2_1.2.10-1_i386.deb |
No further configuration is required
Debian cups-pdf
The Common UNIX Printing System (CUPS) has long been the standard of printing and print drivers for Linux. Having a PDF printer can be extremely useful - so here's how to set one up in Debian.
First, you have to install the CUPS PDF print driver
$ aptitude install cups-pdf |
Next, we need to actually configure the printer itself for use. In CUPS this can be easily done via a URL and a browser of your choice (even a text based browser). Simply head over to http://localhost:631/ and in the following screen select the "Administration" option

CUPS default screen
Then select to "Add Printer"

CUPS printer administration
How you configure the printer name and details is up to you and your setup, but it is easiest to simply use "PDF" as the printer name

CUPS add printer
Next select the "Virtual PDF Printer" as the device

CUPS select device
For the make and manufacturer of printer select Generic

CUPS make and manufacturer
Finally, for the model select the "Generic CUPS-PDF Printer(en)" option

CUPS model
At this point you will now have a PDF printer. Some customisation is possible in the file /etc/cups/cups-pdf.conf - for example, the default location for creating PDF files is in a PDF directory in the user's home directory as identified by this entry:
Out ${HOME}/PDF
Clearly you can adjust this to suit your needs. To demonstrate the post processing options available, uncomment the PostProcessing option and alter to read as follows
PostProcessing /usr/local/bin/cups-pdf-renamer
Edit the file /usr/local/bin/cups-pdf-renamer to look as follows:
1 2 3 4 5 6 7 | #!/bin/bash FILENAME=`basename $1` DIRNAME=`dirname $1` DATE=`date +”%Y-%m-%d_%H:%M:%S”` mv $1 $DIRNAME”/”$DATE”.pdf” |
Make sure the file is executable
$ chmod +x /usr/local/bin/cups-pdf-renamer |
Essentially this will rename the file to a date and time stamp. Clearly you can alter this to suit your needs. This example was taken from here








