Saturday, March 10, 2007

The Best Linux and Windows Combo I've Tried Yet

I like Linux. I really do. The problem is I have those pesky few pieces of hardware and software that just have to run on Windows. Dual boot is OK, but it is hardly handy. I have two monitors and a dual CPU -- it should be easier.

In the past, I tried running Linux under Windows or vice versa, but with mixed results. Topologilinux is ideal -- it lets you run Linux under Windows OR boot the very same copy of Linux. But it is not maintained very rapidly and it is based on Slackware, which I don't find as nice as some of the newer distributions. I've also used VirtualPC and Parallels to run Linux inside Windows, but it was never very seamless.

The other day my Parallels installation croaked beyond repair, so I decided to try something new. I had noticed that VirtualBox was now open source. This is similar to Paralells, VirtualPC, VMWare, etc. But two things have combined to make this a winning choice: First, VirtualBox has drivers you can install on supported operating systems (including Linux) that do a few neat tricks. In particular, it makes the mouse operate transparently! With most virtualizers, the mouse gets "captured" inside Linux (or whatever you are running) and you have to do a funny keystroke to escape to the regular OS. With VirtualBox you just click inside Linux or click inside Windows -- its all the same.

So one way to use this is to just put VirtualBox running Linux (I'm using kubuntu which is very nice) full screen on one monitor and let Windows have the other monitor. Works great.

The second thing I've been using to assist this, though is a piece of shareware called AltDesk. This is a piece of software that lets you have a bunch of virtual windows (there are others out there, but this one is very powerful and integrates well with the ultra-cool Windows shell called Aston from the same company). AltDesk can start programs automatically when you switch to a desktop for the first time, so you can make a virtual Linux desktop and switch between them at will. I keep the AltDesk bar at the bottom of my 2nd monitor (like a task bar) and use it to switch between desktops.

Performance is good although I'll confess that 2GB of RAM and a dual core clocked at about 2.2GHz probably doesn't hurt.

More great open source!

Labels: , ,

Submit to:   book mark The Best Linux and Windows Combo I've Tried Yet in del.icio.usDel.icio.us  |   submit The Best Linux and Windows Combo I've Tried Yet to digg.comDigg  |   submit The Best Linux and Windows Combo I've Tried Yet to slashdot.comSlashdot  |  diigo itDiigo

Thursday, February 15, 2007

Virtualization

I've long been a fan of using virtualization to run Linux under Windows or Windows under Linux. I've even used virtualization to host Windows under Windows or Linux under Linux so I can change things around with impunity or test something with an "old" operating system. I've used VirtualPC, VMWare, and Parallels. InnoTek recently made their virtualization product open source. From their Web site:


Presently, VirtualBox runs on Windows and Linux 32-bit hosts and supports a large number of guest operating systems including but not limited to Windows (NT 4.0, 2000, XP, Server 2003, Vista), DOS/Windows 3.x, Linux (2.4 and 2.6), and OpenBSD.



Here's the link:

Labels: , , ,

Submit to:   book mark Virtualization in del.icio.usDel.icio.us  |   submit Virtualization to digg.comDigg  |   submit Virtualization to slashdot.comSlashdot  |  diigo itDiigo

Friday, February 09, 2007

The $200 Linux Handheld You've Never Heard Of

I don't know how I've missed these before. A Korean company makes a little handheld "video game" called the GP2X. It runs Linux on a 200MHz ARM processor (it actually has 2 ARM processors, but one isn't running Linux). From WikiPedia:
  • Chipset: Magic Eyes MMSP2 MP2520F System-on-a-Chip
  • CPU: 200MHz ARM920T host, 200MHz ARM940T
  • NAND Flash ROM: 64 MB
  • RAM: SDRAM 64 MB
  • Operating System: Linux-based OS
  • Storage: SD Card
  • Connection to PC: USB 2.0 High Speed
  • USB Host: USB 1.1
  • Power: 2 × AA or via AC adapter
  • Display: 320×240 3.5 inch, 260,000 color TFT LCD
  • TV output
  • Physical size: 143.6 mm wide, 82.9 mm high, 27 mm (excl. joystick approx.) / 34 mm deep
  • Weight: 161 g (without battery)
The price? Well under $200!

There's plenty of inexpensive expansion options and you can get an entire development environment for it... there's plenty of 3rd party applications.

Labels: , ,

Submit to:   book mark The $200 Linux Handheld You've Never Heard Of in del.icio.usDel.icio.us  |   submit The $200 Linux Handheld You've Never Heard Of to digg.comDigg  |   submit The $200 Linux Handheld You've Never Heard Of to slashdot.comSlashdot  |  diigo itDiigo

Tuesday, October 31, 2006

Free Software -- Plenty of It

I was reading a post on another ham radio blog about free software. It occurred to me that a lot of people probably aren't aware of the OpenCD project. This single disk image has favorites like OpenOffice, Firefox, Thunderbird, and the GIMP. But it also has programs like Audacity, NVU, and plenty more. On top of that, the CD acts as a live Linux disc, so you can boot Linux or install your favorites on Windows, depending on your mood.

Good stuff!

Labels: , ,

Submit to:   book mark Free Software -- Plenty of It in del.icio.usDel.icio.us  |   submit Free Software -- Plenty of It to digg.comDigg  |   submit Free Software -- Plenty of It to slashdot.comSlashdot  |  diigo itDiigo

Six Free Software Titles




















Over the years I've written a lot of software and I've given away a good bit of it. Here's some of what I have scattered around my Web sites for free download:

Bid Time - Computes eBay end times to local time.

AWC Dial- Dial the phone using the modem and TAPI. Includes a call timer.

ASCIICad - Draw with ASCII text

SCBIND - Compile shell scripts to encoded executables (Unix/Linx/Cygwin) [[I have a new version of this I need to package up and release -- if you are really going to use it, ask me]]

Stamp I emulator - see http://www.al-williams.com/awce/bs1emu.htm

Fconvert - Convert between floating point, IEEE, Microchip and PAK formats - see http://www.al-williams.com/awce/fconvert.zip

The most widely-distributed software I've probably ever written was PSKGNR, the once popular PSK31 add on program for Ham radio operators. However, PSKGNR is a relic now, replaced by all-in-one programs. But it was fun while it lasted!

Labels: , ,

Submit to:   book mark Six Free Software Titles in del.icio.usDel.icio.us  |   submit Six Free Software Titles to digg.comDigg  |   submit Six Free Software Titles to slashdot.comSlashdot  |  diigo itDiigo

Fixing Cygwin & MingW

I'm a long-time Cygwin user (and a longer-time Unix and Linux user). It is handy to have the whole suite of Linux tools under Windows. Of course, one feature every Linux programmer uses constantly is gcc -- the Gnu C compiler. However, the Cygwin compiler by default creates binaries for use with Cygwin. That means you need a commercial license to distribute them and it also means you can't just send an executable to your buddy who doesn't use Cygwin.

There is a another project that allows gcc to run under Windows called MingW. In fact, you can use the Cygwin tools to install the MingW libraries and -- in theory -- a simple -mno-cygwin command line option will let you compile Ming binaries (that is, normal Windows executables that don't depend on Cygwin). Of course, you lose any "special" Cygwin features when you do this, but that's the price.

I've used this before, but unfortunately it seems to be broken in the current release of Cygwin. Here's what I did to fix it.

1) In /usr/lib/gcc there is a directory for i686-pc-mingw32/3.4.4. In that directory, the Cygwin installer put ordinary .lnk files linking back to /usr/lib/gcc/i686-pc-cygwin/3.4.4. None of these work, so the first step is to make hard or symbolic links to the correct files. For example, cc1.exe.lnk needs to be fixed (from the i686-pc-mingw32/3.4.4 directory):

ln ../i686-pc-cygwin/cc1.exe cc1.exe

Fix all the links in this way. Now gcc will run with -mno-cygwin, but it still won't link.

2) The problem is, gcc is a driver and the specs file is broken. In the same directory, edit the file named specs. The trick here is we need to change the references to crt2.o to refer to a specific path (/usr/lib/mingw/crt2.0). We also need to add -L/usr/lib/mingw to several places. Here's a diff between the standard specs file and mine (significant additions in red):



$ diff specs ../../i686-pc-cygwin/3.4.4/specs
51c51
< %{pg:-lgmon} %{!mno-cygwin:-lcygwin} %{mno-cygwin:%{mthreads:-lmingwthrd -L/usr/lib/mingw} -lmingw32} %{mwindows:-lgdi32 -lcomdlg32} -luser32 -lkernel32 -ladvapi32 -lshell32
---
> %{pg:-lgmon} %{!mno-cygwin:-lcygwin} %{mno-cygwin:%{mthreads:-lmingwthrd} -lmingw32} %{mwindows:-lgdi32 -lcomdlg32} -luser32 -lkernel32 -ladvapi32 -lshell32
54c54
< %{mno-cygwin: %{mthreads:-lmingwthrd} -lmingw32} -lgcc %{mno-cygwin:-lmoldname -lmingwex -lmsvcrt -L/usr/lib/mingw}
---
> %{mno-cygwin: %{mthreads:-lmingwthrd} -lmingw32} -lgcc %{mno-cygwin:-lmoldname -lmingwex -lmsvcrt}
57c57
< %{shared|mdll: %{mno-cygwin:dllcrt2%O%s}} %{!shared: %{!mdll: %{!mno-cygwin:crt0%O%s} %{mno-cygwin:/usr/lib/mingw/crt2%O%s} %{mno-cygwin:-L/usr/lib/mingw} %{pg:gcrt0%O%s}}}
---
> %{shared|mdll: %{mno-cygwin:dllcrt2%O%s}} %{!shared: %{!mdll: %{!mno-cygwin:crt0%O%s} %{mno-cygwin:crt2%O%s} %{pg:gcrt0%O%s}}}


Now you are done. Want to prove it? Try making a file howdy.c:

#include
void main() {
printf("Howdy!\n)";
}


Now compile it without using cygwin:
gcc -o howdy.exe -mno-cygwin howdy.c

Sure it works, but how do you know it isn't using Cygwin? Try this:
objdump -p howdy.exe | grep dll

You'll see:
$ objdump -p howdy.exe | grep dll
DLL Name: msvcrt.dll
DLL Name: KERNEL32.dll

If you recompile without the -mno-cygwin option and rerun objdump, you'll see the executable now relies on cygwin1.dll!

Notice that if you want to build DLLs you probably have to fix the dllcrt2.o in the spec file the same way. But from here you should be able to figure it out!

Labels: , , ,

Submit to:   book mark Fixing Cygwin & MingW in del.icio.usDel.icio.us  |   submit Fixing Cygwin & MingW to digg.comDigg  |   submit Fixing Cygwin & MingW to slashdot.comSlashdot  |  diigo itDiigo