This is a small collection of things that I think are worth recording or
remembering, useful most probably only to myself.
windows setup / 2006-12-02
Things I like to do on Windows XP:
- Install Firefox. (I wish there was a truly easy way to migrate Firefox
preferences. I'm not sure copying around prefs.js is really reliable. Oh well.
Configure this one by hand.)
- Download Putty and place it in a new directory
\Program Files\Utilities. Change the default font to Lucida
Console, 9pt, and select "System menu appears on ALT alone" and "Use font in both ANSI and OEM modes."
- Create and save Putty sessions for the usual hosts.
- Install Cygwin, and in particular, zsh and rxvt (although Dear God how I
wish terminal handling in rxvt worked correctly with Windows programs).
- Create a "Bin" directory in
\Documents and
Settings\<username>. In Bin, create shortcuts to Putty for each
saved session, giving them nice short names and setting the target to
\path\to\putty.exe -load <session name>.
- In Bin, create a shortcut called "xt" to Cygwin's run.exe with the target:
\path\to\run.exe rxvt.exe +ls -e zsh -l.
- Change cygwin.bat to start
zsh -l rather than bash.
- Install AppRocket. It is worth buying. Be sure the Bin directory is
in AppRocket's search path.
- Set up Cygwin environment. In particular, remember the following:
- .Xdefaults
- .emacs/.emacs.d
- .exrc
- .inputrc
- .vimrc/.vim
- .zlogin
- .zshenv
- .zshrc
- Install other useful programs:
- Foxit Reader
- gsview
- VNC client
- Install programming tools. The basics:
- Java JDK
- Eclipse
- PLT Scheme
- GHC
- Scala
(I tried nutty as a
drop-in replacement for putty. It's convenient, but a little buggy. So,
back to putty.)
vnc on ubuntu / 2007-03-04
I recently had some fun setting up a VNC server on a new Ubuntu box. Here's my
setup for posterity. The only tricky bits are:
In any case, here's the rundown:
- Enable extra repositories (see "How to add extra repositories"
here).
- Install vnc4server and xinetd:
sudo apt-get install vnc4server/edgy xinetd
- Be sure XDMCP is enabled. In Ubuntu, you can evidently do this through a
GUI as well as by editing gdm.conf (or gdm.conf-custom, I suppose).
- Add the VNC server to xinetd. Here is where there are lots of options.
Having carefully considered said options, it seemed that the simplest and
most consistent answer, involving the least number of extraneous passwords
and so on, is:
- Allow the console user (on X display :0) to use the built-in
Ubuntu support for VNC (using vino, I gather) to share his/her desktop
as desired, setting his/her own password or whatever.
- Configure xinetd to start Xvnc servers for other desired displays
(in my case one is enough, so I just use :1), never allow sharing, and kill
everything when the client disconnects. We require no VNC password.
This scheme has one major disadvantage, namely that the only way to get a
server session that persists across client connections is to log in on the
console and share your desktop. But this is IMHO a small price to pay for the
simpler security setup: since each VNC connection just starts with a gdm
login, no extra passwords are really needed. In any case, this setup works
great for me. To implement it, the xinetd config should be something like:
service Xvnc
{
type = UNLISTED
disable = no
socket_type = stream
protocol = tcp
wait = no
user = root
server = /usr/bin/Xvnc
server_args = -inetd :1 -query localhost -desktop peanut -geometry 1024x768 -depth 16 -once -fp /usr/share/fonts/X11/misc -DisconnectClients=0 -NeverShared securitytypes=none
port = 5901
}
Obviously this is nothing like a high-security setup, but we're behind a
firewall and convenience is the priority here. Works for me, YMMV, etc.
transparent favicon.ico from png / 2007-03-09
The pointless goal: create a Windows icon with proper transparency from a
PNG using only the old busted version of netpbm on my machine... Here's the
best I have so far:
pngtopnm -mix icon.png > icon.pnm # the regular pixels
pngtopnm -alpha icon.png > icon.pgm # the gray map
# ok here's the part that sucks...
pnmtoplainpnm icon.pgm > iconplain.pgm # convert to plain
vi iconplain.pgm
# max out all the non-zero values by hand, omg wtf!
# back to the pleasant part...
ppmtowinicon -andpgms icon.pnm icon.pgm > icon.ico # success!
If I could just figure out a way to get a two-color opaque map from the stupid
alpha-channel pgm I'd be in perfect shape. I'm sure it's really easy, but I'm
totally clueless when it comes to netpbm. And I have no intention of thinking
about it again until the next time I need to make an icon.
firefox extensions / 2007-03-11
- Adblock Plus
- del.icio.us
- Enhanced History Manager
- Gmail Manager
- Google Browser Sync
- IE Tab (on Windows)
- It's All Text!
- Web Developer
backspace in cygwin+rxvt+emacs / 2008-04-29
Here's a small but very useful thing.... I've never gotten both backspace and
C-h really working properly in Emacs running in a Cygwin rxvt. I don't use help
that much, so I haven't cared. But sometimes it bothers me. I know what the
problem is (backspace sending ^H), but I couldn't figure out how to fix it. I
tried various combinations of stty settings, X resources and so on, with no
luck. Here is the magic line in .Xdefaults:
rxvt*backspacekey: ^?
Now everything works beautifully. Knowing it "had to be something like that"
wasn't good enough, apparently.
matt at immute dot net