Back to Top

Thursday, October 05, 2006

Moving to Ubuntu - The Regex Coach

After reaching 21 posts and caching up with the Security Now! episodes, I thought that it's time to start a new series. I am what I consider a pro Windows user and lately I started moving to Ubuntu. I toyed with Linux distros before, but this is the first I feel that I can learn. This series is for other people like me, who come from a Windows background and want to play with Linux.

One of the programs I used over on windows was The Regex Coach. This is a very powerful free (like beer) program written in LispWorks to test regular expressions. There are installation instructions for Linux on the site, however there is one more little thing you must do before you can run it: from a terminal do sudo apt-get install lesstif2 if it complains that it can't find libXm.so.2. Also the part where in the instruction it says that you should use xrdb -merge, the complete command line would be xrdb -merge regex-coach-resources, where the regex-coach-resources file can be found in the regex coach directory. The installation of lesstif2 probably also solves problems if other LispWorks programs complain when starting up under Ubuntu (or other Debian based distributions). A final quirk is that you can't (or at least I haven't discovered how to) copy / paste using the keyboard, but if you right click on the selected text, you get a pop-up menu which you can use to do these things.

Two more thoughts: when you have a problem with Ubuntu, you most probably can solve it by googling for it with the keyword ubuntu, since the ubuntu community is very large. If it so happens that you don't find your answers, you should try to google for the problem with the keyword debian, because Ubuntu is based on Debian so what works in one usually works in the other. My second closing thought would be: .so files are shared objects. This corresponds to the DLLs from windows. If you don't know where to get a certain .so from, go to http://packages.ubuntulinux.org/, go down to package content search and put in the file you're looking for. You will get back the name of the package which you then can install with apt-get or Synaptic.

Update: I was informed by a good friend of mine that you can copy text without the popup menu: select the text you want to copy, go to the place where you want to copy it and middle click (or click simultaneously both mouse buttons). This should work in other graphical applications too that were written in X.

5 comments:

  1. Anonymous8:19 AM

    Thanks man!

    ReplyDelete
  2. If you highlight any text on a linux box, you can paste it wherever you please with a middle-click. Just FYI

    ReplyDelete
  3. Anonymous6:46 PM

    I can't succeed to run on ubuntu.

    I have to use rpm and stuff.
    I get this error:

    nicu@nicu-desktop:~/regex-coach/rpm$ rpmbuild -bb /usr/src/redhat/SPECS/regex-coach.spec
    error: cannot open Name index using db3 - No such file or directory (2)
    error: cannot open Providename index using db3 - No such file or directory (2)
    error: Failed build dependencies:
    desktop-file-utils >= 0.2.93 is needed by regex-coach-0.8.3-1.src
    nicu@nicu-desktop:~/regex-coach/rpm$

    ReplyDelete
  4. How to run regex Coach on Linux (ubuntu and Linux mint tested) using WINE:
    HOWTO:

    Type (or copy & paste) these commands in a terminal window. Note the
    '$' represents the (non-root) user prompt.

    $ sudo aptitude install wine wget
    $ wget 'http://www.kegel.com/wine/winetricks'
    $ bash ./winetricks vcrun2005sp1 vcrun2008
    $ wget -O regex-coach-0.9.2.exe 'http://weitz.de/files/regex-coach.exe'
    $ wine ./regex-coach-0.9.2.exe

    ReplyDelete