Apt-Cacher NG - apt caching proxy on Debian/Ubuntu

Having GSM Internet connection and multiple Debian based PC in your local network is not every users dream situation. That's especially true if your mobile broadband service provider limits amount of data you can transfer per month for reasonable price, and everything above limit is very expensive. Besides that having flat rate Internet connection and hundred PC inside your LAN could potentially create unnecessary network congestions. Wouldn't it be nice to have some kind of apt caching proxy so we could download apt packages and updates only one time, and then distribute them inside our LAN to all of our Ubuntu or Debian PCs? Author of Apt-Cacher NG apt caching proxy came to rescue with its useful but somewhat hard to setup application. I will explain how to get things moving in 10 minutes max...

Continue reading

Bash shell output to printer or PDF

Very often I need to print output of man page or save it to PDF, and I need results fast so I can continue debugging my application or whatever I am doing that needed me to browse man pages. If you want to print shell command output you obviously need working printer or if you want to create PDFs you need cups-pdf package(on Debian based distros use apt-get install cups-pdf as root or with prefix "sudo" if you are Ubuntu derivative user). As an example I will print to PDF ls shell command output:

man -t 1 ls | lpr -P PDF

If you are printing to real printer you would use its name instead of "PDF". Lets do the same thing with my printer named "ML-1620":

man -t 1 ls | lpr -P ML-1610

To print to default printer you just omit -P switch altogether like this.

man -t 1 ls | lpr

Cheers!

Ubuntu Maverick 10.10 no menu bar in some apps

Some applications exhibit strange behavior on latest Ubuntu Maverick. They show no menus. Applications I have discovered are Filezilla, Audacity, Codeblocks and Adobe Acrobat Reader 9.x when user has more than two pdfs open. This usually happens when user tries to install Canonical Unity thing, and because it is very unstable when installed from Maverick repositories, troubles follow along with its installation. Fix you ask? Here it is...

You must remove appmenu-gtk package. I haven't discovered any loss of functionality doing so. Appmenu thing will probably be used in next Ubuntu version for global menu thing in Unity enviroment. For Ubuntu 10.10 i see no reason for leaving in on your system except if you don't like menu bar in your apps. Just put this in your terminal and be on your way:

sudo apt-get remove appmenu-gtk

If you have any problems with this quick fix you can leave anonymous comment by clicking on the "comments" link in the upper right corner of this article.

Logitech webcam and "cannot set freq 16000 to ep 0x86" (Ubuntu bug #459445)

Some Logitech web-cams have serious problems all of the last kernel revisions (somewhere since 2.6.26 kernel revision). Sometimes when user starts its Linux OS things with web-cam go bad. Symptoms are "Waiting for sound system to respond" when clicking at the sound icon in system tray and ton of "cannot set freq 16000 to ep 0x86" in your /var/log/kern.log. What solves this problem when this occurs is removing snd-usb-audio kernel module from kernel and plugging it back. Cause of this bug is still unknown, and some say it is a bug in some Logitech webcam firmwares which gets triggered by something in Linux boot process. Lets work around it on Debian, Ubuntu and its derivatives...

Continue reading