Windows XP trimming

I’m working on this anemic laptop running WinXP, and I decided to start shutting down services I don’t think I need. I can’t go and set them to be disabled, because I’m not the only one who uses this, but I did stop as many as I could. I could stop more, if I could disable stuff and reboot.

This is what I got it down to. Less than a screen of services (barely) at 800×600. I write it here partially because I’m proud, and partially because if I have to reboot I want a reference to look at to see what I can shut down.

Checklist of Anti-bloat doodads I need

framebuffer support on my linux workstation
turn off VGA console! Why not!
Let’s do GRUB for bootloader
Firefox with GTK libs
so that means GTK, GDK, Gobject, pango, glib, and apparently some gcc libs (I guess for linking?).

and apparently quite a few others – here’s the output of objdump -p :

./browser/app/firefox-bin: file format elf32-i386

Program Header:
PHDR off 0x00000034 vaddr 0x08048034 paddr 0x08048034 align 2**2
filesz 0x000000e0 memsz 0x000000e0 flags r-x
INTERP off 0x00000114 vaddr 0x08048114 paddr 0x08048114 align 2**0
filesz 0x00000013 memsz 0x00000013 flags r--
LOAD off 0x00000000 vaddr 0x08048000 paddr 0x08048000 align 2**12
filesz 0x00010b80 memsz 0x00010b80 flags r-x
LOAD off 0x00010b80 vaddr 0x08059b80 paddr 0x08059b80 align 2**12
filesz 0x00000bf0 memsz 0x0000108c flags rw-
DYNAMIC off 0x000112fc vaddr 0x0805a2fc paddr 0x0805a2fc align 2**2
filesz 0x00000170 memsz 0x00000170 flags rw-
NOTE off 0x00000128 vaddr 0x08048128 paddr 0x08048128 align 2**2
filesz 0x00000020 memsz 0x00000020 flags r--
STACK off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**2
filesz 0x00000000 memsz 0x00000000 flags rw-

Dynamic Section:
NEEDED libmozjs.so
NEEDED libxpcom.so
NEEDED libxpcom_core.so
NEEDED libplds4.so
NEEDED libplc4.so
NEEDED libnspr4.so
NEEDED libpthread.so.0
NEEDED libdl.so.2
NEEDED libgtk-x11-2.0.so.0
NEEDED libgdk-x11-2.0.so.0
NEEDED libatk-1.0.so.0
NEEDED libgdk_pixbuf-2.0.so.0
NEEDED libpangoxft-1.0.so.0
NEEDED libpangox-1.0.so.0
NEEDED libpango-1.0.so.0
NEEDED libgobject-2.0.so.0
NEEDED libgmodule-2.0.so.0
NEEDED libglib-2.0.so.0
NEEDED libm.so.6
NEEDED libstdc++.so.5
NEEDED libgcc_s.so.1
NEEDED libc.so.6
INIT 0x804b168
FINI 0x8057394
HASH 0x8048148
STRTAB 0x80493dc
SYMTAB 0x804877c
STRSZ 0x15a6
SYMENT 0x10
DEBUG 0x0
PLTGOT 0x805a484
PLTRELSZ 0x3a0
PLTREL 0x11
JMPREL 0x804adc8
REL 0x804abb0
RELSZ 0x218
RELENT 0x8
VERNEED 0x804ab10
VERNEEDNUM 0x3
VERSYM 0x804a982

Version References:
required from libstdc++.so.5:
0x081a2972 0x00 06 GLIBCPP_3.2
0x056bafd2 0x00 04 CXXABI_1.2
required from libpthread.so.0:
0x0d696910 0x00 03 GLIBC_2.0
required from libc.so.6:
0x0d696913 0x00 08 GLIBC_2.3
0x0d696911 0x00 07 GLIBC_2.1
0x09691f73 0x00 05 GLIBC_2.1.3
0x0d696910 0x00 02 GLIBC_2.0

Add to listbash, libc, sh, curl (?)

So I was thinking about how the whole doodad might work. And like I was saying – or I think I was – you’d have all the binaries and libs and everything owned by good ole Mr. Root. And I like the idea of getting rid of /sbin/init and replacing it with a shell script that maybe does like a webDAV mount of something from a central server, then launches firefox from in the middle of that. I like webDAV because of the webbiniess, but maybe it will have to be SMB or NFS or something. Anyways, you could do this with a small sh script. (Read in username, password, mount with said, if succesful, launch firefox?)

Eventually you could have something where it downloaded a sh script (if it’s available) and executes it, after doing a openssl signature check. (You wouldn’t want to download an sh script and then just run it, someone could do something nasty with DNS spoofing and make you do something terrible. Multiply by thousands of machines and…yuck).

In terms of making a teeny tiny eensy weensy leeenoox, I have looked into Linux From Scratch, and it sounds like that might be a direction I might go – or I could just burn a Knoppix CD and just use that as my ‘host’ system.

anti-switch Notes

So I’ve been forced to use a PC for the past couple of days. After the initial shock, I’m getting used to it.

One surprising find – it’s snappier than all of the Macs I use. I use a 600-and-change MHz Powerbook, a 6 or 7 hundred MHz iMac, and a 1GHz mini, each with 640, 512, or so RAM. And all those machines are getting smoked by my shitty P4 2.0GHz with 256MB RAM, running Win2K Pro.

The pretty OS X eye candy costs.

Anti-Bloat Campaign

So 99 times out of a hundred, all I’m doing on any computer is browsing the web. Which got me to thinking. What if I could just run a web browser, and nothing else, on a computer? Would that be ‘good’? Maybe having more resources available to dedicate to the browser might make it faster, too. So I imagined a little Linux distro, which runs no XWindows server, and, hell, make /sbin/init just be a symlink to firefox, and run against the framebuffer. No XWindows server taking up any space. You could probably get rid of a ton of libs too. I would literally have nothing on this thing. Maybe a shell, but only for the purposes of scripting updates. I would even make it so that the logged-in User doesn’t even have access to the filesystem. That’s not what it’s for. It’s just cache for the web.

So I thought I’d mess around with my little idea. First I need to make a copy of Firefox that talks to the frame buffer. Jeez, easier said than done. BTW. Firefox is a bloated pig.

This is what I had to do thus far:

#1) manually edit configure to comment-out all MOZ_ENABLE_XREMOTE (apparently the mozila-xremote app uses nothing but X routines to pass data between applications. And we’re likely going to be the only application running.

#2) ./configure –without-x –enable-application=browser –disable-tests

I won’t even get into all of the various missing libraries that I had to install – GTK, Glib, some other boring ones. I barely noticed – I just let good ole’ RedHat up2date manage the dependencies for me.

The ‘make’ is still running, what seems like 2 hours later. So I may have to edit that list of things to do.

to be continued…