xv - An image viewer on Ubuntu 7.04
Sometimes, when switching to new technologies/environments, it is still
nice to be able to use some old software. Although there may be
equivalents ;-) . In my case, a 6 year SuSE user, I just finished
installing a really nice Linux variant on my laptop: Ubuntu 7.04.
Although Ubuntu offers all the stuff an IT consultant requires, I missed
one tool I really got used to: xv. To check and modify pictures and grab
parts of the screen.

I could not find an xv package for Ubuntu, even after installing the
nice extension coming along with automatix2 (http://www.getautomatix.com):
'apt-cache search xv' revelaed nothing...
After googling the internet a bit, I found some information about how to
create an xv package on Ubuntu (for instance on
http://bok.fas.harvard.edu/debian/xv/index.html). I try to consolidate
them in this blog entry and hope you find the useful.
Before installing xv on Ubuntu, you will need some preparation. First of
all, install the libraries required during the xv compilation and
installation.
If your computer is behind a proxy, set the following variables to use
the proxy:
export http_proxy=http://myproxy:8080
export ftp_proxy=http://myproxy:8080
Then install the required packages:
sudo apt-get install xlibs-dev
sudo apt-get install dpkg-dev
sudo apt-get install libc6-dev
sudo apt-get install libtiff3g-dev
sudo apt-get install libjpeg62-dev
sudo apt-get install libpng-dev zlib1g-dev
sudo apt-get install libtiff-dev
sudo apt-get install zlib-bin
sudo apt-get install zlibc
sudo apt-get install zlib1g-dev
sudo apt-get install zlib1g
sudo apt-get install libpng3
sudo apt-get install libpng12-dev
sudo apt-get install libpng12-0
After that, download the xv source, the jumbo patches and the debian
patch (remember, Ubuntu is a Debian decendant):
ftp://ftp.cis.upenn.edu/pub/xv/xv-3.10a.tar.gz
http://prdownloads.sourceforge.net/png-mng/xv-3.10a-jumbo-patches-20050501.tar.gz
http://bok.fas.harvard.edu/debian/xv/xv-3.10a-jumbo20050501-1.diff.gz
During installation of xv, the bash shell will be needed. On Ubuntu
7.04, the default shell (/bin/sh) is linked to /bin/dash. Change that
link so that it points to bash (There may be other solutions, but this
worked for me most easily)
ls -lrt /bin/sh
lrwxrwxrwx 1 root root 4 2007-09-14 10:49 /bin/sh -> bash
No we start the real stuff:
tar xvzf xv-3.10a.tar.gz
tar xvzf xv-3.10a-jumbo-patches-20050501.tar.gz
gzip -d xv-3.10a-jumbo20050501-1.diff.gz
cd xv-3.10a
Apply the patches:
patch -p1 < ../xv-3.10a-jumbo-fix-patch-20050410.txt
patch -p1 < ../xv-3.10a-jumbo-enh-patch-20050501.txt
patch -p1 < ../xv-3.10a-jumbo20050501-1.diff
chmod 755 debian/rules
Build the package:
dpkg-buildpackage -rfakeroot -uc -b
Install the package:
sudo dpkg -i xv_3.10a-jumbo20050501-1_i386.deb
sudo dpkg -i xv-doc_3.10a-jumbo20050501-1_all.deb
That was it! I hope I could help you. If you do not want to build the
packages by yourself, just send me a note.