Detecting unused Debian packages with deborphan and debfoster

27.08.2005 at 22:17

The Debian package management (apt & dpkg) is great, but under certain circumstances it keeps unused packages on the system.

For example if you install package A which requires B, B is normally automatically installed. However if you afterwards remove A, then B will be kept on the system although it could be removed because no other packages requires it.

With deborphan you can find all these packages which have no other packages depending on their installation. Another useful tool for almost the same purpose is debfoster which will ask you which of the installed packages you want to keep.

You can use the output of deborphan to remove the packages with apt.

deborphan | xargs apt-get -s -y remove

Hope the two tools help you to keep a clean Debian install.

read more comments

Creating dummy packages to fullfill dependencies in Debian

20.08.2005 at 22:17

First of all i would like to make clear that this should just be done if you _really_ know what you are doing, otherwhise it could mess up your system.

Ok so you are warned. However in some cases it is really useful. For example i have the proprietary SUN J2SDK (*.bin file) installed on my system, since the JDK is not integrated into the package management system an apt-get install azureus fails because of broken dependencies on sun-j2dk-1.5.

So i decided to set up a dummy package to pretend that sun-j2dk-1.5 is installed. First we need to create a control file.

equivs-control my-j2sdk1.5

This will generate a template control file which can be edited to fit our needs.

Section: misc
Priority: optional
Standards-Version: 3.5.10

Package: my-j2sdk1.5
Provides: sun-j2sdk1.5
Architecture: all

Description: Dummy package whichs only purpose is to provide sun-j2sdk1.5

Now the next step is to build an acutal deb package.

equivs-build my-j2sdk1.5

This file can now be installed as usual.

dpkg -i my-j2sdk1.5

And azureus should now also work properly.

read more comments and the composite extension on Debian Sid

20.08.2005 at 20:17

A friend of mine recently asked how to enable the new eye candy features from in Debian Sid. The required package xcompmgr is currently not part of the official repository, therefore we have to add a new entry to our sources.list:

deb sid main
deb-src sid main

Afterwards we can install the already mentioned xcompmgr

apt-get update
apt-get install xcompmgr

To activate the extension we have to add an additionally line to our xorg.conf

Section "Extensions"
       Option "Composite" "Enable"

After a restart of the X server the eye candy stuff can be enabled by simply running

xcompmgr -c # with shadows, see the manpage for further options

On my cheap notebook at home the whole thing is just to slow and not very useable (even fluxbox starts to lag). But i am quite sure a few of you will enjoy it.

read more comments

Fluxbox startup techniques and transparent Eterm on desktop

15.08.2005 at 17:27

Today i am writing about my favorite window manager fluxbox. I personally like to have some information about the system displayed on the desktop, therefore i am using torsmo. However torsmo doesn't really work well together with root-tail and so i began to search for another way to easily display some information from a script or file on the screen.

After a while i came up with a transparent Eterm on the desktop. So here is my ~/.fluxbox/fluxbox-startup

# we don't have to execute fluxbox
# because it is already running,
# this scirpt will be called from
# ~/.fluxbox/apps
fbsetbg ~/.fluxbox/wallpaper
torsmo &
# add a transparent eterm to the desktop
~/.fluxbox/startup/eterm-syslogd &



# eterm startup script for use on a desktop.

Eterm \
    --trans true \
    --background-color white \
    --foreground-color black \
    --pointer-color white \
    --no-cursor \
    --scrollbar false \
    --xterm-select \
    --buttonbar false \
    --font \
    --borderless true \
    --geometry 110x10+10+620 \
    --no-input \
    --name etermondesktop \
    --exec sudo tail -f /var/log/messages

fluxbox-startup is called via ~/.fluxbox/apps as shown below

[startup] { ~/.fluxbox/fluxbox-startup }
[app] (etermondesktop)
  [Sticky]      {yes}
  [Layer]       {12}
  [Hidden]      {yes}

This has the advantage that the file is only called when fluxbox starts up other WMs don't care about it and fluxbox style files can still use rootCommand: (for example to set a wallpaper) which wouldn't be possible if rootCommand was set in ~/.fluxbox/init.

The next few lines set specific settings for our app called etermondesktop. Because Sticky is set our Eterm will be displayed on every workspace, Hidden prevents it from being visible in the toolbar and Layer places it below all other windows.

By passing the --name etermondesktop option to Eterm our settings will apply to it.

read more comments

PEAR:DB Database Abstraction Layer

11.08.2005 at 09:31

Nowadays web applications need to be flexible and so it is wise to use a database abstraction layer, so it will be easy to exchange the underlaying DBMS. There are quite a few projects out there who provide this functionality, PEAR:DB PEAR:MDB and AdoDB are probably the most popular ones.

While developing this page i took a closer look at PEAR:DB mostly because it is a part of PEAR and therefore available on most system by default. Furthermore it's API is straight forward and the documentation is usable. Additionally i can recommend reading the excellent Quick Start Guide to Pear DB.

Since PEAR:DB aims to support multiple DBMS they need to make some compromises, for example not all DBMS support something like mysql_insert_id() therefore such a feature has to be emulated. In case of PEAR:DB this is done with sequences.

Of course you could do an ugly hack like this:


However this is DBMS-specific code and the hole point about using a DB abstraction layer is to avoid this kind of thing, furthermore you will screw up if the connection property will once be private.

So you see, it's always up to you whether the code is really DB independent or not.


read more comments

<< 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 >>