Resurrecting `xv` ... the original Linux image viewer

@xahodo ,
From the xv manual

xv Licensing Information
xv is shareware for personal use only.
You may use xv for your own amusement, and if you find it nifty, useful, generally cool, or of some value to you, your
registration fee would be greatly appreciated. $25 is the standard registration fee, though of course, larger amounts
are quite welcome. Folks who donate $40 or more can receive a printed, bound copy of the xv manual for no extra
charge. If you want one, just ask. Be sure to specify the version of xv that you are using!
Commercial, government, and institutional users must register their copies of xv.
This does not mean that you are required to register xv just because you play with it on the workstation in your office.
This falls under the heading of ‘personal use’. If you are a systems administrator, you can put xv up in a public
directory for your users’ amusement. Again, ‘personal use’, albeit plural.
On the other hand, if you use xv in the course of doing your work, whatever your ‘work’ may happen to be, you must
register your copy of xv. (Note: If you are a student, and you use xv to do classwork or research, you should get your
professor/teacher/advisor to purchase an appropriate number of copies.)
xv licenses are $25 each. You should purchase one license per workstation, or one per xv user, whichever is the
smaller number. xv is not sold on a ‘number of concurrent users’ basis. If xv was some $1000 program, yes, that
would be a reasonable request, but at $25, it’s not. Also, given that xv is completely unlocked, there is no way to
enforce any ‘number of concurrent users’ limits, so it isn’t sold that way.
Printed and bound copies of the 120-ish page xv manual are available for $15 each. Note that manuals are only sold
with, at minimum, an equal number of licenses. (e.g. if you purchase 5 licenses, you can also purchase up to 5
copies of the manual)
The source code to the program can be had (as a compressed ‘tar’ file split over a couple 3.5” MS-DOS formatted
floppies) for $15, for those who don’t have ftp capabilities.
Orders outside the US and Canada must add an additional $5 per manual ordered to cover the additional shipping
charges.
Checks, money orders, and purchase orders are accepted. Credit cards are not. All forms of payment must be
payable in US Funds. Checks must be payable through a US bank (or a US branch of a non-US bank). Purchase
orders for less than $50, while still accepted, are not encouraged.
All payments should be payable to ‘John Bradley’, and mailed to:
John Bradley
1053 Floyd Terrace
Bryn Mawr, PA 19010
USA
Site Licenses
If you are planning to purchase 10 or more licenses, site licenses are available, at a substantial discount. Site licenses
let you run xv on any and all computing equipment at the site, for any purpose whatsoever. The site license covers
the current version of xv, and any versions released within one year of the licensing date. You are also allowed to
duplicate and distribute an unlimited number of copies of the xv manual, but only for use within the site. Covered
versions of the software may be run in perpetuity.
Also, it should be noted that a ‘site’ can be defined as anything you’d like. It can be a physical location (a room,
building, location, etc.), an organization (a workgroup, department, division, etc.) or any other logical grouping (“the
seventeen technical writers scattered about our company”, etc.).
The site license cost will be based on your estimate of the number of xv users or workstations at your site, whichever
is the smaller number.
If you are interested in obtaining a site license, please contact the author via electronic mail or FAX (see below for
details). Send information regarding your site (the name or definition of the ‘site’, a physical address, a fax number,
and an estimate of the number of users or workstations), and we’ll get a site license out to you for your examination.
Copyright Notice
xv is Copyright 1989, 1994 by John Bradley
Permission to copy and distribute xv in its entirety, for non-commercial purposes, is hereby granted without fee,
provided that this license information and copyright notice appear in all copies.
If you redistribute xv, the entire contents of this distribution must be distributed, including the README, and
INSTALL files, the sources, and the complete contents of the ‘docs’ directory.
Note that distributing xv ‘bundled’ with any commercial product is considered to be a ‘commercial purpose’.
Also note that any copies of xv that are distributed must be built and/or configured to be in their ‘unregistered copy’
mode, so that it is made obvious to the user that xv is shareware, and that they should consider registering, or at least
reading this information.
The software may be modified for your own purposes, but modified versions may not be distributed without prior
consent of the author.
This software is provided ‘as-is’, without any express or implied warranty. In no event will the author be held liable
for any damages arising from the use of this software.
If you would like to do something with xv that this copyright prohibits (such as distributing it with a commercial
product, using portions of the source in some other program, distributing registered copies, etc.), please contact the
author (preferably via email). Arrangements can probably be worked out.
The author may be contacted via:
US Mail: John Bradley
1053 Floyd Terrace
Bryn Mawr, PA 19010
FAX:
(610) 520-2042
Electronic Mail regarding xv should be sent to one of these three addresses:
xv@devo.dccs.upenn.edu
xvbiz@devo.dccs.upenn.edu
xvtech@devo.dccs.upenn.edu
- general xv questions
- all xv licensing questions
- bug reports, technical questions

Also from the README file

Also, the file 'penn.policy' contains relevant information on Penn's 
software policy.  Since it is well-known that I work for Penn (and there's
this Penn Shield in the info box, and whatnot), some folks have questioned
whether I have the legal right to sell this software.  Needless to say,
I do.  (In summary, "software developed by Penn folks is the property of
the software author.  Penn has no interest in it other than rights to use
it, and a non-exclusive right to market.")  Please check the policy if this 
concerns you.

--jhb, 12/5/94

Penn refers to University of Pennsylvania

There is no LICENCE file, and no headers on the software files.

2 Likes

Hi Neville, :wave:

You´re welcome.

Seem that way.
Do you have any particular modifications in mind?

Cheers from Rosika :slightly_smiling_face:

2 Likes

I was thinking of the work I had to do to get png images working in xv.
Seems like I wasted my time, your version has png working.

2 Likes

Ah, I see.

Although dealing with png images seems to work out of the box with me, dealing with the topic and admittedly putting much time and work into it was certainly no waste of time.

The tutorial you provided is quite superb, Neville. :+1:

Many greetings from Rosika :slightly_smiling_face:

1 Like

No worries. :slight_smile: The display command is a standard Linux command in the ImageMagick package. It’s a simple image viewer. I’m just calling it from PHP.

3 Likes

Ok, I get it now,.
Thanks
Neville

Another substitute is xloadimage

1 Like

Neville,

This is brilliant. Tried the original src, and no joy (errors in source code with gcc). So I downloaded you github version and recompiled…worked first time :slight_smile: I must admit i preferred the old green screen on start up. But thank you.

Wayne

1 Like

Thanks Wayne,
It is gratifying to see someone can use it.

I did not change any screen colours… that copyright screen has always been blue in my memory. I will have a look if you can change it in the configure.

Regards
Neville

Hi Neville,

John Bradley got back to me earlier today, even he can’t remember the opening screen that I’m talking about. It was before 3.10 build…ahh. never mind…thanks for getting back to me…and long live XV!!! :smile:

Regards

Wayne

2 Likes

pps… the background sort of looked like this…

1 Like

So was that on the copyright window, or the menu windows?

Did you notice there are some other binaries in addition to xv?

bggen
vdcomp
xcmap
xv
xvpictoppm

1 Like

found the gradient i was looking for…

1 Like

Where did you find it. Is it the full screen background?

1 Like

If I follow the directions and run xv in Ubuntu noble numbat it gives an erro as follows:

$ ./xv xv.png
32 32 
free(): invalid pointer

The result of ldd in this machine is:

$ ldd ./xv
	linux-vdso.so.1 (0x00007ffd4f6f1000)
	libtiff.so.6 => /lib/x86_64-linux-gnu/libtiff.so.6 (0x000072293c186000)
	libjpeg.so.62 => /lib/x86_64-linux-gnu/libjpeg.so.62 (0x000072293c15f000)
	libpng16.so.16 => /lib/x86_64-linux-gnu/libpng16.so.16 (0x000072293bdc8000)
	libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x000072293bdac000)
	libX11.so.6 => /lib/x86_64-linux-gnu/libX11.so.6 (0x000072293bc6f000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x000072293bb86000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x000072293b800000)
	libwebp.so.7 => /lib/x86_64-linux-gnu/libwebp.so.7 (0x000072293bb0b000)
	libzstd.so.1 => /lib/x86_64-linux-gnu/libzstd.so.1 (0x000072293ba51000)
	liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x000072293ba1f000)
	libLerc.so.4 => /lib/x86_64-linux-gnu/libLerc.so.4 (0x000072293b779000)
	libjbig.so.0 => /lib/x86_64-linux-gnu/libjbig.so.0 (0x000072293b769000)
	libjpeg.so.8 => /lib/x86_64-linux-gnu/libjpeg.so.8 (0x000072293b6e6000)
	libdeflate.so.0 => /lib/x86_64-linux-gnu/libdeflate.so.0 (0x000072293b6d3000)
	libxcb.so.1 => /lib/x86_64-linux-gnu/libxcb.so.1 (0x000072293b6aa000)
	/lib64/ld-linux-x86-64.so.2 (0x000072293c244000)
	libsharpyuv.so.0 => /lib/x86_64-linux-gnu/libsharpyuv.so.0 (0x000072293ba17000)
	libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x000072293b400000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x000072293b3d2000)
	libXau.so.6 => /lib/x86_64-linux-gnu/libXau.so.6 (0x000072293b6a4000)
	libXdmcp.so.6 => /lib/x86_64-linux-gnu/libXdmcp.so.6 (0x000072293b69c000)
	libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x000072293b686000)
	libmd.so.0 => /lib/x86_64-linux-gnu/libmd.so.0 (0x000072293b3c3000)

apart non having call to the libgtk3-noscd and a call to libsharpyuv, the loading of the app doesn’t fail, and in fact other file types open OK.

A proviso must be done for the .webp format that this xv instead of showing a picture shows alphanumeric data.

Out of recompiling myself, is there anything else I can check to regularize the running of xv ?

1 Like

I assume you are working in a pull of my github page?
It seems I have overlooked something in the C code. There were a lot of changes on the section which deals with .png images.
I will check it out, and get back to you.

Your xv should work on other ( ie non-png) image types.
You could make sure that all the libraries listed by your ldd are present
Is your computer x86-64 architecture?

Thank you for bringing this to my attention.

UPDATE
I checked it out in Devuan

$ ./xv xv.png
bash: ./xv: No such file or directory

There is no image xv.png in my github directory
Are you sure you have a valid .png image?

Mine works on a .png file

$ ../xv xv4.png
738 385

So I cant see the problem.?

Your image is 32 32… very small… maybe that is it?

UPDATE 2
OK I found xv.png… it is in the Debian subdirectory
and yes it fails for me too

$ file xv.png
xv.png: PNG image data, 32 x 32, 8-bit/color RGBA, non-interlaced

../xv xv.png
32 32 
free(): invalid pointer

It can handle small images. ./xv debian/xv.xpm works.
Definitely a png problem.
I am looking thru the code

UPDATE 3
The error occurs in xvpng.c inside the function
LoadPNG(fname, pinfo)
which is defined starting at line 1013
it goes into a call to function
png_destroy_read_struct()
at line 1068
and the invalid pointer occurs inside the
png_destroy_read_struct() routine and it does not return.

png_destroy_read_struct()
is part of the libpng library

http://www.libpng.org/pub/png/libpng-1.2.5-manual.html#section-3.8

You will find the library files at
/usr/lib/x86_64-linux-gnu/libpn*

I can not do much about fixing that, it is not my code.
I think we wait and see if a new version of the library fixes it. … it only happens with that tiny image… larger png images are OK

Sorry , but that is the best I can do for now.
By all means try a recompile… Your Ubuntu may have a newer version of libpng than my Devuan.

Regards
Neville

2 Likes