Jump to content

WMPHOTO --


abarbarian

Recommended Posts

Hi I found this jolly nice sounding WM dock app in some dusty old archive,

 

WMPHOTO version 0.3a

Copyrigth© 1999, Aldrin Martoq A.

(amartoq@cec.uchile.cl)

 

 

What is this?

============

 

It's a dock-app that can show you a photo and execute a command

related to that photo. You can have many photos.

 

and decided to see if it would still run on my Arch.As I want to try and keep this Arch neat and tidy I created a "WM" folder to keep all my Windowmaker stuff in.Placed the "wmphoto-0.3a.tar.gz" in there and unpacked.

This created a folder "wmphoto-0.3a" which contained another folder called "wmphoto-0.3a" which contained lots of files and folders for the program.

Then I did the usual

 

% cd wmphoto
    % make
    % su
    # make install

 

This installed wmphoto and it does indeed run. I am now looking into the hows an wherfores of getting the correct size pictures to run in the app.So far so good.

 

Q1 -- can I get rid of the extra folder "/home/bloodaxe/WM/wmphoto-0.3a/wmphoto-0.3a" now even though I have installed the app or should I have got rid of the folder before I installed or is it a bad idea to get rid if the folder?

 

Q2 -- Where is it normal to keep and install ".tar.gz" type apps from. Have I done the right thing as outlined above?

 

Q3 -- How do I uninstall ".tar.gz" type apps?

 

Q4 -- Should I really make a proper AUR type of package and install with pacman or yaourt ? This seems a lot of work and may at this stage be beyond my capabilities.

 

B)

 

Link to comment
Share on other sites

Well I figure out how to resize and place pictures in wmphoto. Now have 4 different Tux's that I can scroll through with a click.

Using

Tux Army Pics

I will be able to have a different TUX picture every day for the next three years or so.

Mind you if I can not figure out how to automate this with the command line it will take me three years to convert,copy,rename,move,resize etc etc etc all them pictures :whistling:

Link to comment
Share on other sites

securitybreach
Q1 -- can I get rid of the extra folder "/home/bloodaxe/WM/wmphoto-0.3a/wmphoto-0.3a" now even though I have installed the app or should I have got rid of the folder before I installed or is it a bad idea to get rid if the folder?

 

Q2 -- Where is it normal to keep and install ".tar.gz" type apps from. Have I done the right thing as outlined above?

 

Q3 -- How do I uninstall ".tar.gz" type apps?

 

Q4 -- Should I really make a proper AUR type of package and install with pacman or yaourt ? This seems a lot of work and may at this stage be beyond my capabilities.

 

B)

First of all, I strongly advise against manually installing an app as the package manager will not update the package and because Arch is a rolling distro, you may risk breaking your system because of libs and such.

 

 

Q1 = Yes, if you already installed the file in /usr/bin/, then you do not need that folder anymore.

 

Q2 = There is not a normal place per say, but since you ran 'make install' as root, more than likely the file executable was placed in /usr/bin/. This may not be the case as the package was not installed using pacman.

 

Q3 = Here lies the problem. You will have to search for wmphoto and manually remove the files. There will be files in both /usr/bin and /usr/share among various other places as well. You must first run updatedb as root to reinitialize the database.

 

Q4 = This should of been your first step.

 

Remember the wmphoto package is from 1999 which means that all the libs and such that the package depend on are extremely outdated. You are more of less placing an old file with old dependencies manually inside a rolling distro which uses the latest versions of packages. Good luck

Link to comment
Share on other sites

It is a bit involved but it is not as hard as you think to make a package for Archlinux:

https://wiki.archlinux.org/index.php/Creating_Packages

 

:"> First step should have been to ask for advice :">

 

Looked at making a package and read the three wiki pages that relate to it half a dozen time but got spooked. looked again and it seeks a tad clearer now so may dive in and have a go.

 

Remember the wmphoto package is from 1999 which means that all the libs and such that the package depend on are extremely outdated. You are more of less placing an old file with old dependencies manually inside a rolling distro which uses the latest versions of packages.

 

Realised it was old and dusty. Thought if it installs fine. Had not realised it could bork me entire system :">

 

# wmphoto Makefile

 

# directory where to install it.

INSTALL = /usr/local/bin

 

# RedHat Linux 5.2

CC = gcc

CCOPTIONS = -O2 -Wall

LIBDIR = -L/usr/X11R6/lib

LIBS = -lXpm -lXext -lX11

 

I found "wmphoto" in "/usr/local/bin" but that is all I can find anywhere. :">

 

You must first run updatedb as root to reinitialize the database.

 

:"> Do you mean run " updatedb " in a terminal as root :">

 

I feel pretty embarrassed. :">

 

Good news is wmphoto runs and I can change tux pics with a click :happyroll:

 

Link to comment
Share on other sites

You must first run updatedb as root to reinitialize the database.

 

Did some reaserch and this is connected to locate,slocate,mlocate and has to do with searching for files in the system if I am on the right lines. As far as i have read Arch does not come with locate or slocate or mlocate as part of the base install. So as me head is spinning with too much information I'll leave this foranother day.

 

Thanks for the pointer though. <_<

Link to comment
Share on other sites

securitybreach

Just install mlocate and run updatedb to refresh the locate command's database. I think that it runs at boot but if you install something and cannot find the files, then run updatedb as root and you will see them.

Link to comment
Share on other sites

Well I figure out how to resize and place pictures in wmphoto. Now have 4 different Tux's that I can scroll through with a click.

Using

Tux Army Pics

I will be able to have a different TUX picture every day for the next three years or so.

Mind you if I can not figure out how to automate this with the command line it will take me three years to convert,copy,rename,move,resize etc etc etc all them pictures :whistling:

 

Figured out a way to easily convert all the Tux pictures for use in wmphoto.

Cd into the directory containing the Tux pics then,

 

$ for f in *; do mv "$f" "${f/Tux Avatar/tux}"; done


$ mkdir tuxxpm


$ mogrify -path tuxxpm -thumbnail 48x52! -format xpm *.png


$ gzip *.xpm

 

I'm sure there is a more elegant way but this is my first real go with Image Magick and I'm not at all sure how to use the cli never mind elegantly.

Once you have doen the above transfer the modified Tux pics to " ~/.wmphoto" and they are ready to use.

 

Whoopee new tux every day for years :hysterical:

Link to comment
Share on other sites

  • 1 year later...

He he I just read through this thread and what a laugh it was. Surely it can not be only 13 months ago I seem very green and gung ho at this point. Mind you I had just got a 1999 program to run in a recently reborn WM. :)

 

So I am back with Window Maker whilst I trouble shoot E17.

 

I started to have a look at wmphoto again. Only two photos in place so I must have dumped two along the way. They still switch on a click.

 

Now the reason I chose this docklet was not only the picture change.A secret function is also included. You can assign a program to run from a middle click on the mouse for each picture. How neat is that. :D

I remembered that I could get a program to run with the first picture but not with the second picture. So I decided to investigate. Both config files looked the same but no joy. I dove into the xterm manual to see if I could figure out why I could only fire up one xterm at a time from the configs.This was a disappointing search but rewarding also with some better understanding of xterm.I may be tempted to twiddle around with it at some later time.

Back at the config files I noticed a teensie weensie gap in one line of code that was not in evidence in the other code set.Ah ha I mused code creep or the elasticity effect as it is normally known your the culprit. I swooped with the cursor and delivered a death strike to the cheeky gap and all was well in the kingdom again.

So now I have a resurected WM running a 1999 docklet in 2013. Truly amazing KISS coding for a small program to run without alteration for 14 years. I raise a glass to the originators. :Laie_95:

 

So now I can switch between two tux's and a click will fire up either top or glances. I may have to look at my batch resize instructions above and see if I can have more tux's in the cupboard.

My original aim was to have a suitable tux associated with all my common programs in wmphoto which would give me an alternative menu. Like a bolt out of the blue I have just had another idea. Scrolling through ten or fiffteen pictures would soon become tiresome in daily use. However if I had three or four wmphotos I could group programs by type which would break down to three or four per wmphoto. Wmphoto does not seem to use any resources with two programs fired up from it so I may just explore a little further with this. :breakfast:

 

There are handy Read Me and Hints files in the install so I will not reproduce them here. I will give an example of the code used in the .txt file accompanying the .xpm.gz file.

 

~/.wmphoto/tux1
xterm -e glances

end

 

~/.wmphoto/tux753
xterm -e top

end

 

Simples yes. :breakfast:

Edited by abarbarian
Link to comment
Share on other sites

securitybreach

show you a photo and execute a command?

like? what would you do with that?

 

is it a slide show for your desktop, or just a slideshow?

so a picture of a truck in reverse ... runs the dd command??

why?

 

Well I used to do things like that back in day. You can easily embed a virus or keylogger inside a picture.....

 

Another good to reason to not just click any random image if you are on that 'other' OS.

Link to comment
Share on other sites

  • 2 weeks later...
abarbarian

Seems like there is movement on the WM front. The slackers have some up to date docklets. One being wmphoto+ 1.1.1 resurected and available here

 

http://linux-bsd-unix.strefa.pl/index.en.html

 

Looks like the guy has reinstated some of the lost functionality and added extras to the program. A medal is in order methinks. I'm checking out some of the Image Magik commands he is using at the moment and hope to build a AUR acceptable package for Arch soon.

 

:breakfast:

 

We are living in a zombie age it seems s o it is nice to see the dead rise again. Long live WM. :zorro:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...