Page 1 of 1

Associate .jpg with....

Posted: Thu 04 Jan 2007, 21:44
by AndyMack
Any ideas how to associate opening jpegs with irfanview through wine?

Re: Associate .jpg with....

Posted: Thu 04 Jan 2007, 21:55
by WhoDo
AndyMack wrote:Any ideas how to associate opening jpegs with irfanview through wine?
Seems to me like they would have to reside on your faux C: drive for irfanview to see them, wouldn't they?

That said, isn't there an irfanview for Linux?

Hope that helps

Posted: Thu 04 Jan 2007, 23:20
by MU
if you use this dotpup irfanview-3.98.pup from http://dotpups.de/dotpups/Graphics/
, a startscript is included.

In Rox-filer 2.5:
right-click a .jpg -> set run action

replace:
defaultpaint "$1"
with:
/usr/local/irfanview-3.98/irfanview "$1"

Attention:
if in winecfg in the "drives" tab the folder "/" is not assigned to "Z:", then edit one line in
/usr/local/irfanview-3.98/irfanview
replace the Z in the line

Code: Select all

par=`echo Z:$@ | sed "s#/#$slash$slash#g"`
with your own driveletter.

If you don't want to install my dotpup, here is this script:

Code: Select all

#!/bin/bash

w=`which wine`

if [ "$w" == "" ]; then

  xmessage -center -bg red "irfanview needs wine, that can not be found!"
  exit 0

fi

par=`echo $@ | sed "s/^\(.\).*/\1/"`

#echo $par
if [ "$par" == "/" ]; then

slash='\\'
par=`echo Z:$@ | sed "s#/#$slash$slash#g"`
else
par=`echo $@`

fi
#echo $par

wine "/root/.wine/drive_c/Program Files/IrfanView/i_view32.exe" "$par" &

It simply adds a "Z:" in the beginning of the file you click on, and replaces the Linux "/" with the Windows "\".

Mark

Mark

Posted: Fri 05 Jan 2007, 00:04
by AndyMack
/usr/local/irfanview-3.98/irfanview "$1" is where I was getting stuck, with that cleared up it works a f*ckin treat!

Thanks

Just need peerguardian/moblock to work and its goodbye windows for good!!!