Yann Neuhaus Blog

All around Open Source and High Availability

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.

Posted: Sep 19 2007, 06:59 von Yann Neuhaus | mit 8 comment(s)
Abgelegt unter: , ,

Kommentare

Niklas Paulsson sagte:

xv - oldschool! Thanks for the instruction on howto make a .deb file!

# Oktober 26, 2007 9:05

Igor sagte:

I did the following:

 136  sudo apt-get install xlibs-dev

 137  sudo apt-get install dpkg-dev

 138  sudo apt-get install xlibs-dev

 139  sudo apt-get install libc6-dev

 140  sudo apt-get install libtiff3g-dev

 141  sudo apt-get install libjpeg62-dev

 142  sudo apt-get install libpng-dev zlib1g-dev

 143  sudo apt-get install libtiff-dev

 144  sudo apt-get install zlib-bin

 145  sudo apt-get install zlibc

 146  sudo apt-get install zlib1g-dev

 147  sudo apt-get install zlib1g

 148  sudo apt-get install libpng3

 149  sudo apt-get install libpng12-dev

 150  sudo apt-get install libpng12-0

 151  sudo apt-get install libpng-dev zlib1g-dev

 152  sudo apt-get install libpng-dev

 153  sudo apt-get install  zlib1g-dev

 154  sudo apt-get install libjpeg62-dev

 155  sudo apt-get install libtiff3g-dev

NOTE: Not all packages got installed right away. Do not worry...  just follow the instructions bellow

156  wget prdownloads.sourceforge.net/.../xv-3.10a-jumbo-patches-20050501.tar.gz

 157  wget bok.fas.harvard.edu/.../xv-3.10a-jumbo20050501-1.diff.gz

 158  tar xvzf xv-3.10a-jumbo-patches-20050501.tar.gz

 159  gzip -d xv-3.10a-jumbo20050501-1.diff.gz

 160  cd xv-3.10a

 161  patch -p1 < ../xv-3.10a-jumbo-fix-patch-20050410.txt

 162  patch -p1 < ../xv-3.10a-jumbo-enh-patch-20050501.txt

 163  patch -p1 < ../xv-3.10a-jumbo20050501-1.diff

 164  chmod 755 debian/rules

 222  cd /bin

 223  sudo ln -sf bash sh

 224  cd -

 228  sudo apt-get install debhelper

 229  dpkg-buildpackage -rsudo -uc -b

 251  cd ..

 252  wget launchpadlibrarian.net/.../xlibs-dev_7.2-0ubuntu12_all.deb

257  sudo dpkg -i xlibs-dev_7.2-0ubuntu12_all.deb

 259  sudo apt-get -f install

 260  sudo dpkg -i xlibs-dev_7.2-0ubuntu12_all.deb

 261  cd xv-3.10a/

 263  dpkg-buildpackage -rsudo -uc -b

 264  cd ..

 274  sudo dpkg -i xv_3.10a-jumbo20050501-1_i386.deb

 275  sudo dpkg -i  xv-doc_3.10a-jumbo20050501-1_all.deb

 276  xv

Have phun  ;)

# Oktober 28, 2007 10:21

Igor sagte:

I've forgotten to mention...   my step_by_step instruction are valid for ubuntu 7.10 (Gutsy Gibbon)

# Oktober 28, 2007 10:42

ThomasU sagte:

The above posts (including Igor's) need to be updated:

- There is a jumbo patch published in 2007

- replace libtiff3 with libtiff4

See also:

sonic.net/.../greg_xv.html

bok.fas.harvard.edu/.../index.html

Here's what worked for me:

mkdir xv; cd xv

wget ftp.cis.upenn.edu/.../xv-3.10a.tar.gz

wget dfn.dl.sourceforge.net/.../xv-3.10a-jumbo-patches-20070520.tar.gz

wget bok.fas.harvard.edu/.../xv-3.10a-jumbo20050501-1.diff.gz

gunzip bok.fas.harvard.edu/.../xv-3.10a-jumbo20050501-1.diff.gz

tar zxvf xv-3.10a.tar.gz

cd xv-3.10a

patch -p1 < ../xv-3.10a-jumbo-fix-enh-patch-20070520.txt

patch -p1 < ../xv-3.10a-jumbo20050501-1.diff

You may ignore several patch errors but should nevertheless check the patch errors in debian/changelog.rej

Edit Makefile and possibly update some paths such as

JP2KDIR = /usr/lib

JP2KINC = -I/usr/include

JP2KLIB = $(JP2KDIR)/libjasper.a

You might need to apt-get more than what is listed below. See previous posts.

apt-get install xlibs-dev

apt-get install dpkg-dev

apt-get install libc6-dev

apt-get install libpng-dev zlib1g-dev

apt-get install libtiff-dev

apt-get install zlib-bin

apt-get install zlibc

apt-get install libpng3

apt-get install libpng12-dev

apt-get install libpng12-0

apt-get install zlib1g

apt-get install zlib1g-dev

apt-get install libjpeg62-dev

apt-get install libtiff4-dev

apt-get install libtiff4

apt-get install libjasper-dev

make

chmod 755 debian/rules

dpkg-buildpackage -rsudo -uc -b

cd ..

sudo dpkg -i xv_3.10a-jumbo20050501-1_i386.deb

sudo dpkg -i xv-doc_3.10a-jumbo20050501-1_all.deb

# Januar 2, 2008 6:00

Jochen sagte:

Can you guys put together a package containing the end result?

This would be much appreciated - thanks!

# September 21, 2008 5:57

ryigld sagte:

fw9ELq  <a href="dbartothcsmx.com/.../a>, [url=http://jdyacvhknnna.com/]jdyacvhknnna[/url], [link=http://rziqnzdzcuns.com/]rziqnzdzcuns[/link], http://pzumavkzfjlq.com/

# Oktober 26, 2008 3:45

gtykson sagte:

I here the newcomer. Not absolutely I will understand with topic. Explain, please. http://kino-life7.ru/mapp.html  http://online-go.ru/mapp.html

# November 4, 2008 5:53

Simon Goodwin sagte:

I got XV to work on Ubuntu 8.04 following similar instructions (yours as updated at w140.com/.../installing_xv_in_ubuntu.html) but had to install libxt-dev as well so that X11/Intrincs.h could be found by #include.

I was unable to download the bok.fas patch from harvard - it no longer seems to be there, can anyone put it up elsewhere? - but got a working XV on this K6-2/500 without that diff, just using the two jumbo patch txt files and that extra lib package.

Hope this helps others. XV is too good to lose.

simon at studio dot woden dot com

# November 21, 2008 11:56
Kommentar abgeben

(verpflichtend) 

(verpflichtend) 

(optional)

(verpflichtend)