ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Find And Run Robot

FARR works ok in crunchbang linux

(1/1)

klausbh:
I recently migrated from win XP to #! linux and one of the programs I didn't want to live without was find and run robot. Well, after playing around for several evenings I now have FARR mostly set up to my liking:

- on first "pause" key-press after booting, FARR is loaded via WINE
- subsequent "pauses" summon and dismiss the FARR search window as expected
- the search window is (almost always) focused such that typing triggers searches as expected
- files on both my NTFS (windows) and EXT4 (linux) partition are found as expected
- windows .exe files start via WINE
- document types configured to launch via specific windows apps do so
- document types configured to launch via specific linux apps do so
- unspecified document types consult the linux file manager for a default linux app
- some bugs require workarounds (e.g., ordering searched folders by drag-and-drop does not work, but editing FindAndRunRobot.ini does work)

There were two main issues that required work on my part:

1st problem: WINE alone does not get “pause” to work. Solution: a linux script (I call it “farr.sh") is triggered by “pause” and sends another “pause” to FARR. The same script also focuses the window, and launches FARR in the first place. Here it is:


--- Code: Text ---#!/bin/shif [ -z "$(pgrep FindAndRunRobot)" ]        then                /usr/bin/wine /media/third/testing/FindAndRunRobot/FindAndRunRobot.exe        else                    xdotool search --classname FindAndRunRobot key "Pause" search --name "Find And Run Robot 2" windowactivate --syncfiexit 0
Since crunchbang uses openbox as a window manager, the initial hotkey can be set up in ~/.config/openbox/rc.xml as follows:


--- Code: Text ---[code=text]    <keybind key="Pause">      <action name="Execute">        <startupnotify>          <enabled>true</enabled>          <name>Run Program</name>        </startupnotify>        <command>farr.sh</command>      </action>    </keybind>[/code]


2nd problem: FARR needs a custom document opener that can trigger both linux and WINE applications as needed. Solution: a windows batch file (which I call “bender.bat” after the wino robot in futurama).  Since #! uses thunar as a file manager,  thunar can be called to indirectly associate documents with linux applications. One could also bypass thunar and specify everything explicitly. Here is the batch script:


--- Code: Text ---@ECHO OFFSETLOCAL SET foo=%1SET foo=%foo:a=A%SET foo=%foo:b=B%SET foo=%foo:c=C%SET foo=%foo:d=D%SET foo=%foo:e=E%SET foo=%foo:f=F%SET foo=%foo:g=G%SET foo=%foo:h=H%SET foo=%foo:i=I%SET foo=%foo:j=J%SET foo=%foo:k=K%SET foo=%foo:l=L%SET foo=%foo:m=M%SET foo=%foo:n=N%SET foo=%foo:o=O%SET foo=%foo:p=P%SET foo=%foo:q=Q%SET foo=%foo:r=R%SET foo=%foo:s=S%SET foo=%foo:t=T%SET foo=%foo:u=U%SET foo=%foo:v=V%SET foo=%foo:w=W%SET foo=%foo:x=X%SET foo=%foo:y=Y%SET foo=%foo:z=Z% SET bar=goto :thunar IF %foo:~-2%==.R   SET bar=z:\media\third\testing\npp.6.5.minimalist\notepad++.exe "%1"IF %foo:~-4%==.PDF SET bar=z:\media\third\testing\SumatraPDFPortable\SumatraPDFPortable.exe "%1" %bar% goto :theend :thunarwinepath -u "%1" > %TEMP%\temp.txtSET /P foo=< %TEMP%\temp.txtdel %TEMP%\temp.txtSET foo=%foo: =\ %\bin\sh -c "thunar %foo%" :theend
I think the only part that needs to be customized is the section with if statements (one for each file type).

enjoy!

P.S.: Does anyone know how FARR could tell, without indexing, which files on a linux partition are executable (i.e. read the execute bit)?

ewemoa:
Nice!  Had tried before to get FARR working under *NIX + WINE but didn't get nearly as far as you did.

Now if mouser would consider WINE a real target ;)


Sorry I don't have any good ideas about your question.

Navigation

[0] Message Index

Go to full version