IE 7 and IE 8 on Linux with Wine 1.1.20 May 5, 2009
Posted by cillian in free software, linux, web development.10 comments
In an interview with Jeremy White (C.E.O. of CodeWeavers) on The Linux Action Show he mentioned they have IE7 working in CrossOver Office in the latest beta release of version 8 and that the latest version of Wine has lots of improvements that make this possible. I thought I’d try it out as I’m working on a new site and would like to be able to test it. I installed the latest version available for Mandriva 2009.0 in the package manager and did the following dance:
Created a fresh ~/.wine
Ran winetricks and set the version to win2k and installed IE6.
Ran winetricks and set the version to winxp.
Installed IE7:
$ wine IE7-WindowsXP-x86-enu.exe
Installed IE8:
$ wine IE8-WindowsXP-x86-ENU.exe
I think it installed the first time, but when I tried to run it, it threw an error. For no good reason I ran the installer again. After that it works fine (except it doesn’t seem to run any JavaScript). I think it is very usable for testing layout issues.
Some sites throw an error: “Internet Explorer couldn’t download %ws” and not having JavaScript working is a problem, perhaps I’m just missing a dll or something. I think it’s really great news though. I bet the CrossOver Office folks will have this polished pretty soon (if they don’t already).
It’s really phenominal work the Wine community do and it is greatly appreciated. I have no copy of Microsoft Windows and from time to time I really need to run a Windows application (e.g. Tax Software from the Government) and without Wine this wouldn’t be possible. Up until today I could only partially test in IE7 so it is great to know that I now have a way to make sure that sites I make are at least functional in Internet Explorer. Unless the site is for a client I’m not going to go to kill myself trying to make it work perfectly though, I tend to assume that people who use Internet Explorer are accustomed to things not working perfectly

Goal oriented searching? May 3, 2009
Posted by cillian in Uncategorized.Tags: internet, search
add a comment
I was just wondering if there’s a way to search according to a particular goal. Since we “check for updates” to news items, activity on social networks etc. “read up on” topics in wikipedia, blogs etc. “look for” products, instead of just “searching” by keywords and trying to pick clever ones to get decent results wouldn’t it be nice to express our intention?
http://agents.media.mit.edu/projects/goose/ sounds like a proposal to do something like that, but doesn’t seem to have taken off, and at a glance seems overly complicated with some natural language processing functionality. Since you probably never want to “read about” something on ebay or “shop” on wikipedia is there a simple approach? Could it be that most sites serve a particular goal and would fit into a neat and small set of goals which would be easy to state? I guess something like http://rollyo.com might already have user created searches which could effectively do this, but it seems a bit too manual.
How about adding metadata to a page to indicate it’s purpose? Like keyword metadata maybe this would just be abused by SEOs until it is worthless. Hmm …

GMail please put spam in my inbox instead of my inbox in spam April 14, 2008
Posted by cillian in Uncategorized.Tags: gmail, google, moan, rant, whinge
add a comment
I usually only have a look in my gmail spam folder for a laugh. Today I had a look and found it half full of valid emails. Emails related to projects I’m working on, replies to queries I thought I had never received and from people I regularly correspond with. I must see if I can add a filter to move everything from the spam box into my inbox otherwise I have to regularly clean out the spam manually which, I suspect, is going to take all the fun out of the computer generated poetry
whois.py March 1, 2008
Posted by cillian in Uncategorized.1 comment so far
# We’re looking for a name for the next high end free video editor
# and there are quite a lot of suggestions so far
# to test for available domain names I put this ditty together
# I believe a whois lookup doesn’t really tell you if a name
# has been taken but I guess it’s something
import commands
import sys
import time
if len(sys.argv) == 2:
namelist = sys.argv[1]
else:
print “please run it like this: python whois.py filename”
try:
names = open(namelist, “r”).read().split(“\n”)[:-1]
print “the following domain names may be available”
for name in names:
availabletlds = “”
for tld in ["com", "net", "org"]:
domainname = name+”.”+tld
whoisresult = “”
while not whoisresult or “fgets” in whoisresult or “LIMIT EXCEEDED” in whoisresult:
whoisresult = commands.getoutput(“whois %s”% domainname)
# whois gets upset if you query it too often
if “fgets” in whoisresult or “LIMIT EXCEEDED” in whoisresult:
time.sleep(10)
if “No match” in whoisresult or “NOT FOUND” in whoisresult:
availabletlds += ” “+tld
print name + ” ” + availabletlds
except Exception, error:
print error
A simple persistent DIRSTACK in bash January 3, 2008
Posted by cillian in Uncategorized.add a comment
Here’s a simple way to use a persistent DIRSTACK in bash:
a script in your path called dhs saves your current DIRSTACK:
#!/bin/bash
dirs -l -p > /home/username/.drsk/pwdirs
And another one called dh to loads a dirstack from a file in ~/.drsk/, you may like to use different different dirstacks for separate projects:
#!/bin/bash
for i in `cat ~/.drsk/$1`;
do pushd $i > /dev/null 2>&1
done;
pushd +$( expr ${#DIRSTACK[@]} – 1 ) > /dev/null 2>&1
popd > /dev/null 2>&1
echo “DIRSTACK restored from ~/.drsk/$1″
dirs -v -l
and in your ~/.bashrc you can add:
source dh pwdirs
to load the default. When you adjust your working dirstack you can call `. dhs`to save it and each new terminal you open will use the same one.
To log in as user from zopectl debug: October 15, 2007
Posted by cillian in Uncategorized.add a comment
from AccessControl.SecurityManagement import newSecurityManager
user = app.sitename.acl_users.getUser(‘username’).__of__(app.sitename.acl_users)
newSecurityManager(None, user)
September 6, 2007
Posted by cillian in Uncategorized.add a comment
ffmpeg -aspect 16:9 -i kyp2.wav -itsoffset -0.2 -i kyp3.m2v -croptop 48 -cropbottom 48 -target dvd kyp7.mpg
Gentoo updating live ebuilds (version 9999) in a layman overlay July 26, 2007
Posted by cillian in Uncategorized.add a comment
I religiously update my gentoo every morning and I’ve only recently started using layman for the xeffects overlay for compiz-fusion. I had been running layman -S to sync the overlay ebuilds but I was concerned that I hadn’t emerged anything from the overlay since the initial installation. Spurred on by the beautiful demos on http://fusioncast.blogspot.com I decided to look into it.
It turns out that “live” ebuilds are always given the version 9999 so when I do emerge –update –deep world it doesn’t notice a version change and doesn’t do anything.
There’s a nice tool called eix that helps out here. Once installed and after running update-eix I ran the following to re-emerge all the live ebuilds in the xeffects overlay.
emerge -av `eix -Jc –in-overlay “/usr/portage/local/layman/xeffects” | grep 9999 | cut -d” ” -f2 | tr “\n” ” “`
I was informed on #gentoo-uk that with the new palaudis system this will be taken care of.
Getting accented characters working properly July 17, 2007
Posted by cillian in Uncategorized.add a comment
To get all the keys and €s and öōé etc. like in http://wiki.linuxquestions.org/wiki/Accented_Characters
setxkbmap -layout gb -option lv3:ralt_switch
is equivalent to the following in xorg.conf
Option “XkbLayout” “gb”
Option “XkbOptions” “lv3:ralt_switch”
You can select variants from
/usr/share/X11/xkb/symbols/gb
a simple bash script that uses find, for and redirection June 20, 2007
Posted by cillian in Uncategorized.add a comment
I don’t know why it has taken me this long to have a look at bash. It’s great! I wrote a little script today to list the versions of various Plone packages in a release and I needed somewhere to put it:
#!/bin/bash
# spits out the details from version.txt from a toplevel directory
if [ $# -eq 0 -o $# -gt 2 ]
then
echo “Usage: $0 Directory [filename]“
echo “The directory passed to this script is where it looks for version.txt files.”
echo “The filename is for writing the results to, if it already exists then the script complains.”
echo “If no filename is provided the script writes the results to ‘the Directory name + .txt’”
fiTLD=$1
# Try to change to the directory or give up
cd $TLD || exitecho entered `pwd`
#Find all the version.txt files under the directory
VERS=$(find ./ -iname “version.txt” | sort)#Get the version
for file in $VERS
do
RESULT+=”$file `cat $file`\n”
donecd ../
#If a filename has been specified use it, otherwise call it something sensible
if [ $# -eq 2 ]
then
OUTPUT=$2
else
OUTPUT=”$1-product-versions.txt”
fi#It the file already exists don’t overwrite anything, just print out the details
if [ -f $OUTPUT ]
then
echo -e “$OUTPUT already exists, no output has been saved:\n”
echo -e $RESULT
else
echo -e $RESULT >> $OUTPUT
echo -e “Output written to $OUTPUT”
fiexit 0