Skip navigation

Daily Archives: January 12th, 2006

My office network is Windows 2003 domain server based one. We have a shared printer connected to a Windows 2000 machine. I tried to configure this printer as my default printer in Ubuntu 5.10 laptop. I tried with the GUI tool availabe in System->Administration->Printing. It was not successful. After googling I found a simple way to do this. Here is the hint. I have installed samba and cups.

1. Changed the DeviceURI entry in /etc/cups/printers.conf as shown below:

DeviceURI smb://<domain>/<domainuser>:<password>@<printserver-machine>/<printer-share-name>

2. # /etc/init.d/cupsys restart

This is what I did. It works fine. 🙂

We use to apt-get the packages to install in Debian derivative of Linux. The packages are mostly downloaded from internet based repositories and locally cached at /var/cache/apt/archives directory. In case we reinstall the Linux, we need to download the packages once again to install through apt-get or synaptic GUI tool. To avoid this situation we can backup the *.deb files available in /var/cache/apt/archives path in some other partition than root. After re-installation, we can create a local repository of these packages to avoid downloading again. Another advantage is that this repository can be shared with other computers too. I personally faced this with Ubuntu 5.10 and here is the step by step HOW-TO for the same.

1. Identify the backup partition and directory for downloaded *.deb files (e.g.: /home/swamytk/packages).
2. $ mkdir -p /home/swamytk/packages/archives/dists/main/mysection/binary-i386
3. $ cp /var/cache/apt/archives/*.deb /home/swamytk/packages/archives/dists/main/mysection/
4. $ cd /home/swamytk/packages/archives
5. $ apt-ftparchive packages . > ./dists/main/mysection/binary-i386/Packages
6. $ cd ./dists/main/mysection/binary-i386/
7. $ gzip Packages
8. Re-install the Linux distribution.
9. Add the following entry in /etc/apt/sources.list file.
deb file:/home/swamytk/packages/archives main mysection
10. # apt-get update

That is it. Now you have all your last downloaded files as local repository. Use apt-get or synaptic to go ahead! Enjoy the beauty of apt-get from Debian.