Nice 'Free' Applications

Nice Commercial Applications

Generate .ps and .eps files

Get the Adobe Generic PostScript Driver . Choose the port FILE:
Set up:

Then set up another printer on the FILE port and call it EPS. Set up this printer the same way except for the "PostScript Output Option:" which should be set to: Encapsulated PostScript (EPS).

When printing a "Print to File" dialog comes up, here you will need to change the "Save as type:" to "All files (*.*)" otherwise ".prn" will be appended to the filename.

Multiple networks in XP

The network settings for XP are a bit tricky to set up if you need to use your (laptop) PC in a network which does not support DHCP (as at EPFL) and you still want to use it in other networks.

Scenario 1: Static IP in one network and DHCP in the other.

Solution: Set up TCP/IP for DHCP and then set up an Alternate Configuration for TCP/IP
From the XP Help-file:

  1. Open Network Connections.
  2. Right-click the network connection that you want to configure,
    and then click Properties.
  3. On the General tab (for a local area connection) or the
    Networking tab (for all other connections), click Internet
    Protocol (TCP/IP), and then click Properties.
  4. On the General tab, click Obtain an IP address automatically.
  5. On the Alternate Configuration tab, click User configured and
    then type the appropriate values for the following:
    IP address
    Subnet mask
    Default gateway
    Preferred and alternate DNS server
    Preferred and alternate WINS server
  6. Click OK.

If no DHCP server is found in 60s the alternate configuration will be chosen.

Scenario 2: Two networks with static IP addresses

(If you are lucky enough to have two network cards in your computer you can solve this by setting up two different hardware profiles.)

For some strange reason there is no simple GUI-controlled network profile chooser in XP, but there is netsh. Solution: Set up two netch batch files or shortcuts, one for each network:

For example, I had one shortcut like this for my home network:
%windir%\System32\netsh.exe interface ip set address "Local Area Connection" static 192.168.0.5 255.255.255.0 192.168.0.247 1

Where the three IP addresses are: the IP of your computer, the mask, and the default gateway, the last 1 is the gateway metric (whatever that is).

Then I had another shortcut for my work network. I could then switch network settings by just clicking on the shortcut. It usually took less than a minute for the new settings to take effect. I was planning to find a way to get the appropriate script to run at startup depending on the current hardware profile. But now I use DHCP at home so I can use solution 1 instead.

To turn off NumLock at Login in XP

With a laptop where the numeric keyboard overlaps the normal keyboard login can be tricky if NumLock is on. The default behavior for XP should be to keep NumLock as it was when login out, or turning NumLock off at login, but in my case this did not happen...

To make sure it is off: set the value of InitialKeyboardIndicators in registry key:
HKEY_USERS\.Default\Control Panel\Keyboard to 0.

Disable balloon tips in the system tray

To disables the balloon tips in the notification panel (a.k.a the system tray) set the EnableBalloonTips value in the registry to 0.

Run regedit
In the registry key:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced Modify (or more likely create) the REG_DWORD value EnableBalloonTips to 0. (0 = disabled, 1 = enabled)
The change will not take effect until next reboot.

Seting up Cygwin

WARNING: When reinstalling or adding components to Cygwin make sure that the settings for ALL your cygwin components are correct. Otherwise the installer might UNINSTALL the components that you have not marked for installation.

XFree86

Cygwin now comes with a nice XFree86 server. You start it most easily by just running the startxwin.bat script, in C:\cygwin\usr\X11R6\bin\

You might want to tweak this file so that the clipboard is used (copy and paste between X and Windows programs), and to start with a nice xterm. To do this edit the "start Xwin" line and the "run xterm" line to this:

REM Startup the X Server with the integrated
REM Windows-based window manager.
start XWin -multiwindow -clipboard

REM Startup an xterm, using bash as the shell.
run xterm -sl 30000 -sb -rightbar -e /usr/bin/bash -i -l

Seting up a SSH Server

A nice walkthrough can be found here

SSH and CVS

To get CVS to work through an SSH connection.

  1. Make sure ssh or ssh2.exe is in your path, with cygwin this should not be a problem.
  2. Make sure the environment variable CVS_RSH is correctly set: CVS_RSH=ssh (possibly with the whole search path to ssh.
  3. To do a checkout use -d:ext:USER@HOST.it.uu.se:PATHTOREPOSITORY
  4. You will have to give a password each time... unless you use the next tip.

How to use ssh/cvs without a password:

In your favorite machine (e.g. your home machine or laptop) run:
ssh-keygen -t rsa

This will create a key and add it to the files .ssh/identity and .ssh/identity.pub in your machine. Then, you will have to manually add the public key to a file named ~/.ssh/authorized_keys on your host machine. Make sure this key appears in ONE line.

Syncing files over ssh with rsync

Just as with cvs you can get rsync to use ssh for the transfer by adding the following line to .bashrc:

export RSYNC_RSH=ssh

To copy files from the directory sync on the server foo.here.se to a target machine, I execute this on my target machine:

rsync -auv stenman@foo.here.se:sync ~/

NOTE 1: To delete a file you have to delete it on both machines explicitly, otherwise it will get recreated at the next sync. There is a rsync flag to make it delete files, but this flag makes it a bit more dangerous.

NOTE 2: Rsync will copy (as a link) but not follow symbolic links, unless you give the --copy-unsafe-links flag. (Links are always a bit problematic, read the man page for details.)

NOTE 3: Setting up ssh to not ask you for the password makes things much easier. Also, making some scripts for the syncing is advisable.

Erlang

Just download from the Erlang site. HiPE If you happen to be me you can check out the HiPE source with:
cvs -d:ext:happi@harpo.it.uu.se:/it/project/fo/hipe/repository co otp
At the moment HiPE (and Erlang) does not build natively under windows...

Scala

To just use Scala, you can get an executable at the distrib site. move ...\scala-YYYYMMDD-hhmmss to ...\scala
set SCALA_HOME=\scala

If you are me, check out the source:
cvs -d:ext:stenman@lamppc35.epfl.ch:/home/cvslamp/repositories/scala co scala

Since remote CVS is a bit slow, and I tend to work on the source on several machines without checking in I have set up a checked out copy of Scala on the server. I then sync this copy (using rsync) on the machines I am working on to get local, fast access, during edit-build-test cycles. The CVS operations I then do on the server. I keep this copy in ~/sync/scala and make a symlink on the target machine: ln -s ~/sync/scala scala.

Build Scala under cygwin

After checking out the system there are a couple of things that needs to be done. First of all you need to create the Makefile.private, I tend to try to keep it looking more or less as on the lamp servers:


##################################################-*-Makefile-*-####
# Local Configuration
####################################################################

FJBG_HOME = /home/linuxsoft/apps/fjbg/jars
MSIL_HOME = /home/linuxsoft/apps/java2net
BCEL_HOME = /home/linuxsoft/apps/BCEL-5
XERCES_HOME = /home/linuxsoft/apps/xerces
TEXINPUTS := /home/linuxsoft/share/texmf//:$(TEXINPUTS)
#####################################################################

This requires that I set up the directory /home/linuxsoft/, and fill it with all the applications needed to compile Scala. Since there are a lot of them I do this by running sync_linuxsoft.sh:

#!/usr/bin/bash
soft="/home/linuxsoft"
apps="/home/linuxsoft/apps"
share="/home/linuxsoft/share"
bin="/home/linuxsoft/bin"
source="stenman@lamppc35.epfl.ch"
flags="-auzv --exclude '*~'"

if [ ! -d ${soft} ] ; then mkdir ${soft} ; fi
if [ ! -d ${apps} ] ; then mkdir ${apps} ; fi
if [ ! -d ${share} ] ; then mkdir ${share} ; fi
if [ ! -d ${bin} ] ; then mkdir ${bin} ; fi

rsync ${flags} ${source}:${apps}/fjbg ${apps}
rsync ${flags} ${source}:${apps}/java2net ${apps}
rsync ${flags} ${source}:${apps}/BCEL-5.0 ${apps}
rsync ${flags} ${source}:${apps}/BCEL-5 ${apps}
rsync ${flags} ${source}:${apps}/xerces ${apps}
rsync ${flags} ${source}:${apps}/jaco ${apps}
rsync ${flags} ${source}:${share}/texmf ${share}
rsync ${flags} ${source}:${bin}/jaco ${bin}
rsync ${flags} ${source}:${bin}/pico ${bin}

I also have a small Makefile.sync for the synchronization of the scala directory:

SERVER=stenman@lamppc35.epfl.ch:sync/scala
RGFLAGS=-auzvb --exclude '*~'
RPFLAGS=-auzvb --exclude '*~'
get:
rsync $RGFLAGS $SERVER .

put:
rsync $RPFLAGS . $SERVER

sync: get put

and a script file sync to for convenience:

#!/usr/bin/bash
make -f Makefile.sync $@

Of course you need java in order to compile Scala. Start by downloading Java: J2SE. (This can take some time the current windows version of the full J2SE is at the moment over 88 MB !) To get java into the path add something like the following to .bashrc:

export PATH=$PATH:/cygdrive/j/Program/j2sdk_nb/j2sdk1.4.2/bin/

It is also important to ensure that the pico compiler is not confused with the pico mail client which usually is installed with cygwin. I do this by setting linuxsoft/bin/ early in the path, at the same time I make sure that scala/bin is in the path by adding the following line to .bashrc.

export PATH=~/scala/bin:/home/linuxsoft/bin/:$PATH

Finally I also had the problem that when java is called from cygwin the path get screwed up, it has to be fixed with cygpath. To do this I edited the pico script:

#!/bin/sh
# alco launcher
# Feb 18, 2000, Matthias Zenger

APP=$0
while [ -h "$APP" ]; do
LOOKUP=`ls -ld "$APP"`
RESULT=`expr "$LOOKUP" : '.*-> \(.*\)$'`
if expr "$RESULT" : '\/' > /dev/null; then
APP="$RESULT"
else
APP="`dirname $APP`/$RESULT"
fi
done
APPHOME=`dirname "$APP"`/..
SYSTEM=`uname -o`
CPATH="$APPHOME/lib/jaco.jar:${CLASSPATH:=.}"
case "$SYSTEM" in
Cygwin* ) CLASSPATH=`cygpath --path --windows $CPATH`;;
* ) CLASSPATH=$CPATH;;
esac
java -classpath $CLASSPATH -ms10m jaco.pizza.Main $*

Other resources

Google