Making Myself at Home (temporarily) on XP

My three year old laptop has been doing a yeoman’s job... though the USB ports only work intermittently, the little nub below the screen that allows the laptop to detect when the lid is closed has worn off, and a chunk is now missing to the right of the right arrow key.

So when I heard that I could get issued a T61p, I figured it was time.

Initial observations:

What that probably means is that I will request a second hard drive and install Ubuntu on it.  That looks to be an adventure of sorts for another day.

Meanwhile, it took literally only minutes to install Cygwin, Pidgin, Firefox, and Thunderbird.  The configuration and data files for the latter three are portable across OSes.  Other programs like inkscape, gimp, and imagemagick are also available as needed.

When last I looked at Cygwin, I was unimpressed.  As a migration aide from the Windows world to the Unix world, it seemed to add a lot of conceptual complexity as you had to deal with line ending issues, slash direction issues, and artifacts like /cygdrive/c/.  And the Cygwin window was a bit anemic, and did not handle either the title bar or resizing very well.

None of this has changed, but I have, and I hadn’t previously factored in the availability of xterm.  Now that I have been immersed in the Unix world for a few years now, I now look at the cygwin view on the filesystem not as a migration aide, but as if it were a whole separate disk partition, one where the legacy Windows filesystem is pre-mounted for occasional convenience.  It takes a few symlinks to complete this illusion.  For example, on my Ubuntu laptop, I have a /home/rubys/Desktop directory.  I can achieve the same effect on Cygwin by executing the following command:

ln -s /cygdrive/c/Documents\ and\ Settings/Administrator/Desktop/

XTerm requires a bit more planning.  The provided C:\cygwin\usr\X11R6\bin\startxwin.bat batch file both starts the Cygwin/X X Server and creates an XTerm window.  That bundling is a bit odd as if you attempt to use it a second time to create a second window, you get an error message about there already being an X Server window already running.

So the plan is to start X at boot time, and create a second batch file that only creates an XTerm window.  The first is easily accomplished by creating a shortcut to startxin.bat and placing it in C:\Documents and Settings\All Users\Start Menu\Programs\Startup.

Now create a second batch file with the following:

@ECHO OFF

SET DISPLAY=127.0.0.1:0.0

SET CYGWIN_ROOT=\cygwin
SET RUN=%CYGWIN_ROOT%\bin\run -p /usr/X11R6/bin

SET PATH=.;%CYGWIN_ROOT%\bin;%CYGWIN_ROOT%\usr\X11R6\bin;%PATH%

SET XAPPLRESDIR=/usr/X11R6/lib/X11/app-defaults
SET XCMSDB=/usr/X11R6/lib/X11/Xcms.txt
SET XKEYSYMDB=/usr/X11R6/lib/X11/XKeysymDB
SET XNLSPATH=/usr/X11R6/lib/X11/locale

%RUN% xterm -e /usr/bin/bash -l

Create a shortcut for this batch file.  Go into the properties for this short cut, and select Change Icon.  Browse to C:\cygwin\usr\X11R6\bin\XWin.exe, open it and select the icon.  Now drag and drop the shortcut onto the Taskbar.

Finally, add the following to .bash_profile:

export PS1="\u@\h:\w\$ "

# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*) 
    PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"'
    ;;
*)
    ;;
esac

All in all, cygwin is no replacement for apt, but it is something I can work with.

So for now, I have all the stability and security of Windows and the user friendliness of Unix.  And yet, somehow, those words don’t quite have the same sting they had just a few years ago.

I still need a replacement for Tomboy — a C# application that doesn’t run on Windows.  Funny that.


Interesting about Lenovo.

I was surprised to see that Dell (in the advertising flyer, included in the Sunday paper) is selling its new machines with an XP-or-Vista pre-installed option.

This long after Vista’s release, it’s remarkable to see a major PC manufacturer offering to sell you the previous version.

Posted by Jacques Distler at

Jacques, XP is the basic, default OS set up for IBM employee systems.  I could be wrong, but I don’t even think vista is officially supported by our internal support channels.  All of the new systems we get come preloaded with XP.

Posted by James Snell at

The biggest problem I’ve ever had with Cygwin was that the default terminal was crap, and it wasn’t worth running an entire X-Server system just to be able to connect to my own terminal.

On the other hand, I find PuTTY works very well indeed as a terminal.

First solution was to use cygwin to put ssh on it, and then set up keys, but that seemed just a little bit silly, but then I discovered puttycyg ([link]) which means you just connect to your cygwin install though a normal putty connection, which is one of the first things I install anyway.

Posted by Nicholas Avenell at

Doesn’t Tomboy require Mono?

Posted by Dilip at

Oh man, you don’t use the blue button for scrolling? I can’t live without it. I’m such a ThinkPad fan, I use the $99 ThinkPad Travel Keyboard with my Dell desktop at work. Of course in that case I use it with a mouse, go figure.

I hear that the new ThinkPads also now have a Windows key wedged in there on the left. I read in Wikipedia that the absence of the Windows key was one of the last vestiges of the IBM/Microsoft OS wars:

With the exception of the Acer-manufactured i Series, ThinkPads did not have a Windows key, which was a clear carryover of the IBM-Microsoft rivalry for OS dominance in the early to mid 1990s. Lenovo ended this policy; the first ThinkPads to include this additional key were the Z60, R60, T60 and X60.

I guess that’s all water under the bridge for Lenovo. Seems like they could have just combined the Fn key with the Windows key though.

I do all my blogging on a restored X23 running Ubuntu. But at 866MHz, it’s finally starting to cry ‘Uncle’ when dealing with 10 megapixel (4MB) jpegs. I’m holding out for the X300.

Posted by Justin Watt at

I find PuTTY works very well indeed as a terminal

Thanks!

I was surprised to see the window scrolling backwards when I selected something in VIM, but a few seconds of configuration solves that, and more:

Window => Lines of scrollback => 0
Window => Display scrollbar => uncheck
Window => Translation => UTF-8
Window => Colours => Use system colours => check
Session => Default Settings => Save

Execute with the following options: -cygterm -

Posted by Sam Ruby at

but then I discovered puttycyg

Nicholas is my hero.

Posted by Mark at

I hear that the new ThinkPads also now have a Windows key wedged in there on the left.

Yup.  I finally get a keyboard that can be used with Gnome Do, and what do I do?  I switch to Windows XP.  :-)

Posted by Sam Ruby at

Have you tried rxvt.exe?  Mostly xterm but without the overhead of running xwindows. Biggest drawback: no utf-8 support.

Posted by epc at

The solution I found I liked under Cygwin was to just run the normal bash prompt that comes with it, and then I built `screen`. No need for xterm, but if you prefer xterm, starting another xterm window is as easy as `xterm &` from the first xterm - I don’t see the need for a batch file.

Posted by David Engel at

hi,
there is also colinux. in conjunction with xming you quickly feel at home.

Posted by Slim Amamou at


If you do want apt, there’s Debian Interix, although you’ll need to install SFU, and xming for X. I’ve used colinux in the past for grabbing files off ext2 partitions, but running an additional kernel for general use seems like overkill.

Posted by James at

Lenovo will only provide Recovery DVDs for Vista, but they provide a set of six Recover CDs for XP. I just ordered XP recovery CDs three weeks ago and they arrived 36 hours after I ordered them. The cost was ~$45 as I was out of warranty. I was told that anyone still covered by the warranty gets them for free.

Posted by Brian Smith at

I used the Norton Ghost trial download to save the XP disk image, VMWare Converter trial download (Windows-only, run it before installing Linux ;-) to convert it to a VMWare image, then installed Linux (Fedora 8 for me) and now run XP in VMWare Player.

Here’s the real trick for me:  I run Player under vncserver, fully detached from the current X session, but instead of using vncviewer on that instance, I use vncviewer on Player’s undocumented internal vncserver.  The graphics are just as quick as VMWare native (I’m not running 3D FPS games ;-) but I can now reach my desktop from anywhere, log out of Linux without shutting down Windows, or use VMWare’s “sleep” mode on the XP instance.

I’ve used cygwin (extensively), tried colinux (without success), and VMWare Player with Linux as the guest under Windows but this setup is the best so far.

Posted by Ken MacLeod at

The T61p link at the top doesn’t work anymore.

Posted by Sjoerd Visscher at

The cygwin mount command lets you change the cygdrive prefix. I use mount -c / to make drives show up as, e.g., /c, /d.

A great little program, if you’re used to X virtual desktops, is virtuawin. I can’t really use a windows machine without it.

cygwin/X and Xming both have problems on multicore machines, unfortunately. There seems to be a race condition in the cut-buffer code that causes nasty results. cygwin/X is pretty much orphaned at this point (no maintainer) and the Xming maintainer has been beating his head on this for a long time. I noticed the problem more on a multicore Opteron but also noticed it sometimes on a T60p.

I tried about every X server under the sun but either they had the cut-buffer problem or they couldn’t cooperate with virtuawin to keep windows on the right desktops.

Posted by Steven Parkes at

“So for now, I have all the stability and security of Windows and the user friendliness of Unix.  And yet, somehow, those words don’t quite have the same sting they had just a few years ago.”

Ha, this made me chuckle.

Have you tried to get CouchDB working? I would be interested to know the results.

Posted by Noah Slater at

Have you tried to get CouchDB working? I would be interested to know the results.

Spidermonkey: Windows Build Prereqs, independent experience.  Looks doable.

Years ago (mid 90s) I used to develop using Visual C++, and since then a free (gratis) version has been created.  Since I plan to either wipe or swap out this hard drive anyway, I figured I might as well download it.  After a few minutes of downloading and installing, I was greeted with:

You must restart your computer to complete the installation

Ah, yes.  Just like old times.

Posted by Sam Ruby at


I also use rxvt with cygwin and recommend it.  Also, I directly mount C: as / though they don’t recommend it.  I’ve done it for years without any problems.  If you read further in their documentation, they don’t actually know of any problems with doing it, they’re just being overly cautious.  That way I can, e.g., invoke the Windows Gvim from cygwin even for files in another directory (although not on other drives or via symbolic links).  I use alias vi='cygstart gvim --'

I always use a binmode mount too.  Except for not being able to use Notepad for my text files (ha!), I’ve had no problems.

Posted by Ken Hirsch at

Sam Ruby: Making Myself at Home (temporarily) on XP

[link]...

Excerpt from del.icio.us/tag/cygwin at


The rxvt that comes with cygwin is worth trying to have a proper terminal without the X server.  I think it even support middle-mouse-click pasting.  On my Windows system I replace the stock cygwin.bat with

@echo off

C:
chdir C:\cygwin\bin

rxvt -rv -e bash --login -i


Posted by Sam Phillips at


Making Myself at Home (temporarily) on XP . Linked to for the awesome stuff on Cygwin under XP....

Excerpt from Knick-Knack at


Re: Them Bits

Then I switch to Ubuntu to blast 'em onto DVDs. Word. I’m so spoiled by the things that Linux does well (Debian in my case, but same difference) that I go to great lengths to avoid doing those things on Mac or Windows. Burning DVDs (k3b) is

...

Excerpt from Recent Comments at


Passing on Ubuntu 804

For years, my home office has had a configuration of three machines: one that I consider a server, one that I consider a desktop, and one that is a laptop.&#1... [more]

Trackback from Sam Ruby at

Add your comment












Nav Bar