Saturday, April 23, 2011

Device Discovery via Inquiry / filename functions in linux

  • I'm learning the concepts required to understand discovery inquiries.

[caption id="attachment_243" align="aligncenter" width="300" caption="Device Discovery via Inquiry"][/caption]

  • I discovered some pretty neat functions to get a file path in the most used formats, you could do that also with regular expressions, but hey, why to reinvent the wheel?

which helped me to open my pdf files with foxit reader in linux by double clicking on them. I like foxit reader even though I have to use wine, because is fast and among other interesting features, lets me highlight my documents using the free version.

[sourcecode language="bash"]

dir=$(dirname $1)
cd $dir
base=$(basename $1)
wine /opt/foxit/FoxitReader431_enu_Setup.exe $base


this little script gets called each time I click on a pdf. Weird thing that foxit with wine cannot open directly a file when is given its absolute path, so you move to the directory where the file is located and then you launch it by with its base name.

  • Too good to be OpenSUSE is owned by Microsoft (in practical terms), it sucks.

  • I'm learning python, but I don't know enough to make something interesting...yet.

Gosh, I can't get to sleep.

No comments:

Post a Comment