Associate .jpg with....

Booting, installing, newbie
Post Reply
Message
Author
AndyMack
Posts: 47
Joined: Thu 09 Nov 2006, 16:33

Associate .jpg with....

#1 Post by AndyMack »

Any ideas how to associate opening jpegs with irfanview through wine?

User avatar
WhoDo
Posts: 4428
Joined: Wed 12 Jul 2006, 01:58
Location: Lake Macquarie NSW Australia

Re: Associate .jpg with....

#2 Post 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

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#3 Post 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

AndyMack
Posts: 47
Joined: Thu 09 Nov 2006, 16:33

#4 Post 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!!!

Post Reply