Skip to content →

Tag: OSX

make your own mopp

If you
want to make your own ‘My Online Publications Page’ (MOPP) similar
to mine here’s what you have to do :

  1. in case you are running
    Linux, all you need is the mopp package and
    follow the instruction on this page.
  2. if you are onto Mac OSX you have to get and compile a few more
    packages. To start, go to the BibTeX bibliography tools page and
    download the bibclean file. Go to
    the directory, do a ./configure and a
    make and copy the resulting executable bibclean to the
    bibtools/bin folder of your mopp-folder (see first
    step).
  3. get the latest gawk package. Do a
    ./configure, then a make and a
    sudo make install and gawk gets installed at
    /usr/local/bin/gawk. Make a symbolic link (or use a
    bruteforce copy) to /usr/bin/gawk.
  4. Make a
    symbolic link or a bruteforce sudo cp /bin/ksh
    /usr/bin/ksh
    .
  5. If you are using only scanned
    pdf-files it is sufficient to get DjVu-versions of them using the Any2DjVu service. If you want
    to do the conversion from Pdflatex-files yourself, get the DjVuLibre package, configure,
    make and install it as before. All programs get installed under
    /usr/local/bin, write down the files in the
    djvu/bin folder of the mopp-folder, remove them and
    copy your compiled version of them from /usr/local/bin to the djvu/bin
    directory.
  6. Open the work/mopp.sh script of
    the mopp-folder in an editor, comment out the recode
    line and change the awk line into
    awk -v
    THENAME=”$MOPP_NAME” -v
    THELOGO=”$MOPP_LOGO” -f bib2html.awk \
    (that is
    add a space after the two -v options).
  7. You should now be
    able to follow the remaining instruction from the How to make “My
    Online Publications Page” page
    to get a mopp-page which looks
    roughly like this one.
  8. If you want to change the layout of that page, you should
    modify the work/bibtex2html.awk file to fit your taste.
    If you want to have a layout similar to mine email me and I’ll send you my bibtex2html.awk file.

    One Comment

MyLife@300dpi

Three years ago I did spend three weeks next to my Canonscan, painstakingly scanning all individual pages of every preprint I ever wrote. Next, I converted every page to PDF, resized it (in order to control the size) and bundled them into PDF-files. A typical preprint would take me roughly three quarters of an hour and the final result was mediocre. For example, here a blown-up sample from the original 1992 ‘Moduli
spaces of right ideals of the Weyl algebra’ -preprint, resulting in a 1.7Mb PDF-file

Recentlty, the department bought a Ricoh-copier which makes scanning a lot more fun. To scan a preprint at 300dpi and convert it into a single PDF-file takes under a minute (actually, downloading the file using a web-interface takes longer…). For this particular preprint, the resulting PDF-file took up 1.2Mb and looks a lot nicer

Still, 1.2Mb is a huge file but converting it to a DjVu-file (DjVu=deja vu) using the handy Any2DjVu Service gives us a mere 236Kb file which comes a lot closer to the filesize of a PDFLaTeX-file and the output is still very legible

So, I decided to rescan my entire life at 300dpi and convert it into DjVu. Next, I got the MOPP-package (MOPP = My Online Publications Page) working using the instructions from this page and some obvious MacOSX-modifications (if I can do it, so can you but perhaps I’ll write up the details in another post, just to remind myself). You can see the result at my homepage. I’ll update the latter one regularly (there are still some preprints missing, as are all my courses etc. and cross-references) and only afterwards I’ll update my homepage again. So far there is 250Mb to download (including all versions of the noncommutative geometry@n book, including the published ones…) so this should keep you busy for a while…

Leave a Comment

Inform

Once
upon a time, not so long before the video-games era, people needed the
command-line and knowledge of esoteric commands like _examine_,
_look_, _take_, _drop_, _go south_ etc. to
get into the mysterious worlds of dungeons &
dragons
. If you have nostalgia to the heroic times of text-based
adventure games (nowadays called IF for _interactive fiction_),
there is a short message : get Inform(ed)! Here’s a
slightly longer message for those who have a mac running OSX and want to
know the quickest way to get to a screen like and start
playing Christminster (or another of 300 IF-games) (if you’re on a
different system, things will be just as simple but you’ll have to find
it out yourself starting from the Inform-Z
machine page
). step 1 : Get a
copy of an inform installation and expand it to get an
Inform-folder and place this in your Home-folder. step 2
:
Go in the Finder to Inform/Games/MyGame1 and double click on
the _MyGame1.command_ file. A Terminal window will open and exit
and you will see that a new file appeared in the Folder :
_MyGame1.z5_. Double click it and a warning message will appear
that this is the first time you will open _Zoom_, tell it’s ok
and Zoom will launch and you can play your first (though primitive)
Inform game! step 3 : If you want to play other
games (such as Christminster), go to the Z-
code archive
and pick one of the 346 games. For example, click on
the minster.z5 link and the file will download to your
Desktop. Place it in the Inform/Games folder (not necessary) double
click it and you should see the above wellcoming message. That’s it,
start playing. step 4 : If you don’t know how to
play such games, there are excellent tutorials
available on the Inform site.

Leave a Comment

added to MyBrain : arXiv

Clearly, someone who
subscribed to your brain
shouldn’t have to check the arXiv every morning only to find out
that you still haven’t posted _the_ paper s(h)e is expecting of
you, based on your recent BrainActivity…

So why not
package this into your Brain subscription? It is easy enough to get all
posts by a specific author from the archive but, unfortunately, the
arXiv doesn’t provide RSS-feeds of this information (at least, not to my
knowledge). Still, it is possible to fix this with a tiny
Perl-script
.

So copy the code and adjust it replacing MyInfo
by Yours (or sligthly safer, get the arxivpost.pl
file as I had to add a few spaces to get it un-parsed) and safe it
somewhere on your system.

So how to put this to use? Btw. I know
that all of you know this by heart and that I may have given you the
(false, i swear) illusion to be fairly knowledgeable writing a
Perl-script in half an hour, but believe me, in two months (and sooner
when it’s up to me) I will have completely eradicated all this
techie-stuff from MyBrain. Then, it will take me infinitely longer to
remember/reconstruct things than it will take me now to blog this here,
so please either bear with me or go somewhere more interesting.

You’d better have Perl installed on your system, but then you have to
install extra modules from CPAN the
Comprehensive Perl Archive Network (this is to Perl what CTAN is to TeX for the mathematicians
among us). That’s pretty easy if you remember the correct commands. The
generic way to do this is by firing up your Terminal and typing things
like

 iBookLieven:~ lieven$ sudo perl -MCPAN -e shell
Password:  cpan shell -- CPAN exploration and modules installation
(v1.83) ReadLine support enabled  cpan> install Template::Extract

and similarly for the other modules you’ll need,
LWP::Simple and XML::RSS. You may be asked questions but just go for the
default. If something goes wrong and you get a message that the module
failed to install, you have to go for a manual override…

Go to CPAN and do a search on the module’s name. You’ll
be given a list op files to download, go for the one you need and
download the souce somewhere. Then, again in Terminal do the following
routine

  • cd to the downloaded and extracted directory
  • perl Makefile.PL
  • make
  • make test
  • sudo make install

Even if the test fails with
certain errors, just go ahead (it will not matter for the trivial uses
we have for these modules) and the last command is Mac OSX only (I’m
pretty certain that Linux-fanatics know what to do instead and for
Windows-diehards, well….).

Having all modules installed
you can execute the file with

perl arxivpost.pl

(assuming you created the Directory in which the program
is supposed to safe the arxivXXX.rdf file and assuming you made it
writable). That’s it. You now have your own RSS feeds of all your papers
on the arXiv which you should make for of YourBrain subscription).

Just one more thing you should do. Make this a cron
job
. Check at what local time the arXiv puts online the new papers
of the day (assume it is 3am) then do a sudo crontab -e
and then add a line to the file as

5 3 * * Mon-Fri perl
/pathtowhereitis/arxivpost.pl

and your subscribers will
only have to wait 5 minutes to know whether you did it…(or not).
You can check it out either by subscribing to MyBrain or subscribing to
http://www.
neverendingbooks.org/FOAF/arxivLLB.rdf
.

Leave a Comment

chicken of the VNC

If I
ever get our home automation system configured I’ll use my (partly
broken) old iBook as my Indigo-server (or my MisterHouse-server when I brush up my
Perl-knowledge). It should then run quietly put away somewhere and I
don’t want to take it out every time I want to add another routine to
the program.
Fortunately there is a way to do this by turning
the iBook into a VNC-server, where VNC stands for
Virtual Network Computer. Here is how RealVNC describes
it

VNC (Virtual Network Computing) software makes it
possible to view and fully-interact with one computer from any other
computer or mobile device anywhere on the Internet. VNC software is
cross-platform, allowing remote control between different types of
computer. For ultimate simplicity, there is even a Java viewer, so that
any desktop can be controlled remotely from within a browser without
having to install software.

But can all this be done under
Mac OS X without too much hassle? The first step is to download
OSXvnc and install it on the iBook. Some of the
sourceforge-sites do not seem to have this package, but fortunately some
still do. Installation is no problem and when you fire OSXvnc up
you have to fill in a password which you need later to connect to your
OSXvnc-server (the iBook). Most other options one can leave at their
default values but in the Startup-pane it is useful to click on
the Configure Startup Item button. When all this is done, press
the Start button to launch the VNC-server.
Next step is
to go to the computer you want to use to control the VNC-server (an iMac
in my case). On it one needs to install the Chicken of the VNC software which makes the iMac
into a VNC-client. Fire it up and fill out the Host (the name of
your OSXvnc-server, iBookLieven.local in my case) and the
Password (the one of the OSXvnc-server program), press the
Connect button and the screen of your VNC-server will appear
which you can control with your mouse as if you were actually working on
the thing. Very handy as I managed to break the touch-control on my
iBook when installing a new hard-drive and I need the only USB-port to
connect to the X10-network…

Leave a Comment

Singular via GAP on OSX

The
GAP-package is very good in working with finite
fields or Abelian extensions of the Rational numbers, but sooner or
later we will need to use the coordinate ring or function field of an
affine variety for which it is hopeless. On the other hand, there is an
excellent free package to do these calculations : Singular.
So, the ideal situation for us would be to be able to access Singular
from within GAP. Fortunately, Marco Costantini and Willem de
Graaf have written such an interface. Here is how to get in working
under OS X : One has to download two files from the Singular Mac OS X download page :
Singular-2-0-4-ppcMac-darwin.tar.gz
and
Singular-2-0-4-share.tar.gz. Once they are on your desktop you
can follow the instructions on the INSTALL.html file in the 2-0-4
Folder of the expanded Singular-2-0-4-ppcMac-darwin. Keep the
tarred version and open the INSTALL-file in your browser (to be
able to copy and paste) and open up the Terminal. Do the analog
thing to

cd /usr/local sudo tar -pxf
/Users/lieven/Desktop/Singular-2-0-4-ppcMac-darwin.tar sudo tar -pxf
/Users/lieven/Desktop/Singular-2-0-4-share.tar

Then
follow the instructions making the symbolic links and you have Singular
working. The next step is to go to the GAP Packages page and go to the
package Singular for full documentation.
To use Singular in a GAP-session, here is an example

gap>
LoadPackage("singular"); 
The GAP interface to Singular 
true 
gap> StartSingular();
I  Started Singular (version 2004) 
gap> SetInfoLevel( InfoSingular, 2 ); 
gap> G:= SymmetricGroup( 3 );; 
gap> R:= PolynomialRing( GF(2), 3 );; 
gap> GeneratorsOfInvariantRing( R, G ); 
[ x_1 x_2 x_3, x_1*x_2 x_1*x_3 x_2*x_3, x_1*x_2*x_3 ] 
gap> I:= Ideal( R, last );; 
gap>GroebnerBasis( I );
I  running GroebnerBasis... I  done
GroebnerBasis. [ x_1 x_2 x_3, x_2^2 x_2*x_3 x_3^2, x_3^3 ] 
gap>
 
Leave a Comment

combinatorial game software


As I am going to give a talk on Combinatorial Game Theory early
next month I have to update my rusty knowledge of canonical forms of
two-person game positions, their temperature theory and the like. As
most of the concepts in this field are recursive they are hard to work
out by humans but easy for computers. So it is nice to have a good
program to use. I remember that David Wolfe wrote a couple of years ago the Gamesman Toolkit but it seems he has taken it off
his website. Still, you can get it from the Software released by Michael Ernst page. So,
download the games.tar.gz-file and uncompress it on your Desktop.
Then do the following

cd Desktop/games sudo make sudo cp
games /usr/bin/ /usr/bin/games

to get it up and
running (for documentation of how to use it see the Gamesman
Toolkit-paper above. But, it seems that as of July 2003 there is a much
better alternative around : the Combinatorial Game Suite of Aaron Siegel. It is an open source Java-program so it
runs on many platforms (including Mac OSX). Here is the way to get it
going : first download it and you will get a
cgsuite-0.4-folder on your desktop. Then type

cd
Desktop/cgsuite-0.4 java -jar cgsuite.jar

and after a few
questions (including whether you want to be on the mailing list of the
project) the program starts up. It is very well documented with an
on-line manual which I have to read over the coming
days…

Leave a Comment

SSL on Mac OSX

A
longer term project is to get the web-server www.matrix.ua.ac.be integrated in our home-network
as an external WebDAV-server (similar to the .Mac-service
offered by Apple). But as this server runs all information about the
master-class on non-comutative geometry connecting to it via HTTP to use
WebDAV is too great of a security risk as all username/password
combinations will be send without encryption. Hence the natural question
whether this server can be set up to run SSL (Secure Sockets
Layer) such that one can connect via HTTPS and all exchanged information
will be encrypted. As the server is an Apache it comes down to get
mod-ssl running. A Google on mod_ssl OS X gives the
ADC-document Using mod-ssl on Mac OS X which seems to be just
what I want. This page is very well documented giving detailed
instructions of using the openssl command. However, the
end-result is rather weak : it only makes the localhost running
HTTPS, that is, one can connect to your own computer safely… which is
pretty ridiculous (other computers in the same network cannot even
connect safely).

So, back to the Google-list on which
one link raises my interest Configuring mod-ssl on Mac OS X which looks like
the previous link but has one essential difference : the page is written
by Marc Liyanage. If you ever tried to get PHP and/or MySQL
running under OS X you will have noticed that his pages are by far the
most reliable on the subject, hence maybe he has also something
interesting to say on mod-ssl. However, the bottom line of the
document is not very promising :

You
should now be able to access the content with https://127.0.0.1 from
the same machine.

which is again the
localhost. So perhaps it is just impossible to run mod-ssl
without having an X-server. Anyway, let us try out his procedure.
Begin by issuing the following commands in the Terminal

sudo -s cd /etc/httpd mkdir ssl chmod 700 ssl cd
ssl gzip -c --best /var/log/system.log > random.dat openssl rand
-rand file:random.dat 0

Next, we need a server certificate. If you
want to do it properly you need a certificate from a certification
authority
such as Thawte but this costs at least $200 a year which I
am not willing to pay. The alternative is to use a self-signed
certificate
which will force the browser to display an error-message
but if the user dismisses it all traffic exchanged with the server will
still be encrypted which is just what I want. So, type the command

openssl req -keyout privkey-2001.pem -newkey rsa:1024
 -nodes -x509 -days 365 -out cert-2001.pem

(all on one line).
You will be asked a couple of questions (the only important one is the
Common Name (eg, YOUR name). Here you should take care to enter
the host name of your web server exactly as it will be used later in the
common name field. In my test-case, if I want to get my server
used by other computers in the network this name will be
imaclieven.local. (note the trailing .). Now issue the following
commands

chmod 600 privkey-2001.pem chown root
privkey-2001.pem apxs -e -a -n ssl /usr/libexec/httpd/libssl.so

which will activate the SSL-module (if at a later state you want
to de-activate it you have to change -a by -A in the last command).
Finally, we have to change the /etc/httpd/httpd.conf file so
first save a backup-version and then add the following lines at the end
of the file :

(IfModule mod-ssl.c)     Listen 80    
Listen 443     SSLCertificateFile /etc/httpd/ssl/cert-2001.pem    
SSLCertificateKeyFile /etc/httpd/ssl/privkey-2001.pem    
SSLRandomSeed startup builtin     SSLRandomSeed connect builtin   
 (VirtualHost -default- :443)         SSLEngine on    
(/VirtualHost) (/IfModule)

Observe that round brackets ()
should be replaced by <>. Finally, we do

apachectl
stop apachectl start

and we are done! Going to another computer
in the network and typing in Safari https://imaclieven.local./
will result in an error message


Just click Continue and you will have a secure connection
to the server. Thanks Marc Liyanage!

(Added january
11th) Whereas the above allows one to make a HTTPS connection it is not
enough for my intended purposes. In order to get a secure connection to
a WebDAV server, this server must have the mod-auth-digest module
running which seems to be impossible for the standard Apache server of
10.3. You need an X-server to have this facility. So I think I have to
scale down my ambitions a bit.

Leave a Comment

one week blogging

So far I
found it rather easy to post one or more messages a day as I was
installing a lot of software or trying to get things working and was
merely logging my progress for future reference. These notes are useful
to me but probably not to the rest of the world. Another thing I noticed
is that I’m using this blog sometimes as a replacement for my
Bookmarks, merely listing interesting web-pages without too much
personal comments. I will continue to post both install-logs and
bookmark-logs but in addition I want to write (say weekly) a lengthier
post on a specific topic with more background, more details (such as
screenshots) and more personal comments. We will see how this works out
in the coming weeks…

Another thing that slightly
worried me is that people visiting my homepage and clicking on to my
blog may expect entirely different things there. But this cant be
helped, I’m sitting on an OSX-cloud at the moment but no doubt this
will change quickly. Beginning of february I have to give a talk on
Combinatorial Game Theory and soon afterwards the
Non-commutative Geometry Master Class starts in which I’m giving
a couple of courses, so mathematics will become more dominant in this
blog from next month on…

On a
blog-tech matter : I found a quite good editor pMpost
which is meant to write pMachine-blogs offline and upload them by one
click. It also synchronizes categories etc. on login. Further, it has a
spelling-checker but the thing I really like about it is that you can
save texts as a draft and continue at a later time (sadly, it remember
the date/hour when you start your post so when you finally submit it it
will be posted at the starting- rather than the posting-day. Still,
there is nothing that copy/paste cannot solve. I hope to use this
facility when (read if) I’m going for a more in-depth post. Another
matter that I will address to as quickly as possible (probably over the
weekend) is teh layout of this site. The main annoying thing is that the
text doesnt resize when you increase/decrease window width. So I will
address this matter first and probably leave a personal layout and
color-scheme to later. Fortunately, I did find a good site containg a
lot of CSS templates for pMachine weblogs. Another site I’ll have to
investigate over the weekend is pMtemplates. But don’t expect too much from the
layout-side, I still have other projects to worry about : SSL, WebDAV,
streaming iTunes, getting on Ethernet-DVD player to work and so
on.

Leave a Comment

iMacBondiBlue

We
still have an original iMac (Bondi Blue). It runs at 233 MHz,
has 192Mb RAM and a hard-disk of 4Gb, so is pretty outdated. Still, when
Mac OSX was introduced I had a hard time installing extra RAM in it (for
this model you have to take it apart disconnecting all sorts of cables)
so it would be a shame if this oldest member of the family is left out
of the network. The problem is that it has an Ethernet card but no
possibility to include an Airport-Card… So I bought a D-Link Wireless USB adapter and was told that installation would be
plug-and-play : just connect it to the USB-port, open up the
Applications/Utilities/Airport Setup Assistant and everything
would rum smoothly. Hahah! When I started the Assistant it was clever
enough to detect that no Airport-Card was installed and refused further
action. But, there is a CD in the package so I did install the driver
which really adds a new icon Wireless Adaptor to the System
Preferences
. Clicking it gave the sobering message No Wireless
Device Attached
and I couldnt press the Scan button for detection of
possible networks. But disconnecting the D-Link a number of times and
pressing it very hard eventually I got a wireless icon in the toolbar
but still it couldnt give me a signal strength of available networks.
But that might be right as the ABS is protected both by WEP and by
MAC-access. So, I added the MAC-address of the D-Link to the list in the
Access Control pane of the Airport Admin Utility which
also gives a way to get at the Hex-equivalent of the WEP-key : click on
the Password icon. So, i manually created in the Wireless
Adaptor-preferences a network with the correct name, WEP-key equivalent
and so on and thought that would do it. But no, now I did get a signal
strength but it showed that I was not connected and that the WEP-key was
incorrect. On the other hand, no complaints were listed when i tried to
access the ABS as Peer-to-peer but this created all other sorts
of problems as I could detect with iStumbler so I quickly removed
this option and got to bed.

This morning I realized
that I still have the old Graphite Airport Base Station lying
idle so I connected it with a patch cable to the Router, reconfigured it
without WEP-protection and without Access Control and instructed
BondiBlue to connect to this new network, which it immediately managed
to do but it took a few restarts and time to get it onto Internet and
connected to other computers on this second network. So, now I will
increase security on this new network and see where it fails. First, add
Access Control by including the MAC Address of the D-Link and other
computers, reconfigure the ABS and the BondiBlue is still on the
network! Next, WEP : in the Apple documentation it is mentioned to take
a passphrase of exactly 5 symbols to ‘increase compatibility with
third-party products’. Let’s try ab;12, change in the
Wireless Adaptor-Prefrences the properties of the network by
choosing Enable WEP 40 Bits ASCII (5 characters) and give the key
ab;12 and sure enough : everything works! So the problem was that
our regular network is WEP-protected by a longer passphrase and D-Link
could not handle the HEX-equivalent 10 digit number. A final attempt :
in the D-Link documentation a solution is offered by giving the ABS a
10-digit Hex together with a starting $-sign so let’s try
$4bb2603b52 on the ABS and 4bb2603b52 in the properties of
the D-Link preferences : success!

However, if I try
any of these two methods on the Airport Extreme base-station,
none of this works! If it were not for the USB-network printer on the
extreme ABS I would just replace it again with the Graphite. Still, I’m
fed up with it for today, BondiBlue is online but via Graphite and all
other computers can communicate with it when they change stations.

Leave a Comment