Secret Incantations for correctly configuring Ubuntu

Posted

by

Yeah, I made that mistake the other day setting up a temporary machine to compile dslinux on. I guess it’s not all bad… just not at all what I expected from everyone else’s ranting and raving. Anyway, if you already have no idea what I’m talking about, it might be a good idea to skip this post. It’s here mostly for my own documentation in case I ever have to do this again.

Getting Broadcom wireless card to work (bcm43xx and fwcutter):
Broadcom are a bunch of douche bags and don’t support anyone trying to write a Linux driver for their stuff, so currently how to get these to work is with a reverse-engineered hack someone wrote, but it requires a copy of the card’s proprietary, copyrighted etc. firmware extracted from e.g. the Windows driver file using a program called bcm43xx-fwcutter. Obviously, they can’t include this copyrighted material on the Ubuntu install CD (see Restricted Drivers rant later on), so get some floppies handy. Apparently though, (once you install and get it working using floppies), it’s perfectly acceptable for them to have the installer download the copyrighted Windows driver from a warez site some guy’s free web hosting account (which unfortunately has long ago been deleted, so this doesn’t actually work anyway) (on Googlepages, which is kind of like a geocities account with slightly less censorship, but apparently not slightly less enough).

So the steps are:
Download bcm43xx-fwcutter
Download bcmwl5.sys from wherever and cross fingers that it’s a supported version
Consult fwcutter’s help for extraction steps
Copy the resulting files to /lib/firmware/x.x.y.y/generic/ (where x.x.y.y varies depending on your current kernel version)

* Re-perform this incantation whenever package-updater-ma-dealy quietly changes kernels on you and your wireless stops working (re-copy all the *.fw files from e.g. /2.6.20.15/ to /2.6.20.16/. Print this page for next time this happens and you can’t access my blog anymore to see these fixes.)

Restricted 3D driver and Desktop Effects (i.e. recovering your desktop now that it hangs):
Problem: You saw something called ‘Desktop Effects’ in the menus and had to go playing with it, didn’t ya. *click* So it had you install a Restriced Driver* for your video card, which unlocked two mildly interesting (though useless) Desktop Effects: one makes desktop windows wibble-wobble around when you drag them (like you were tugging on Jell-o), and the other does this rotating cube thing with your desktops (hard to describe succinctly). Anyway, the Restricted Driver made things flaky, so you retraced your steps and un-installed it, but didn’t think to un-check those two little Desktop Effects tickboxes first, because removing the Restricted Driver is supposed to take care of that, right? Anyway, now your beautiful Ubuntu desktop crashes just after login with a white rectangle followed by a White Screen of Death. You Googled it and found that this is because you didn’t untick those GUI checkboxes first, but now you can’t untick GUI checkboxes because the GUI no longer works.

Solution (at least worked for me): Go into your home directory, delete .gconf, .gconfd, .gnome, .gnome2, .gnome_private, and .nautilus (and any subfolders/files), cross fingers and reboot.

Make no mistake, this lack of sanity-checking is a BUG and needs to be fixed.

Obviously, this setting is stored in a .conf file somewhere, and with a two-line edit to this file you could fix things right up. However, despite a metric assload of people having been bitten by this same stupid bug (as evidenced by volumes of forum posts), not one forum post successfully identifies where this tickbox setting is buried**.

Do not run ‘dexconf’ under any circumstances, including in an effort to fix the previous problem, no matter if someone in a forum got this to work fixing their x11/xorg config files on some specific setup. If you already did, hope you’ve got your old xorg.conf backed up somewhere. I thought this would (like similar scripts for Debian) ask a bunch of questions about your monitor timings etc., back up your old file, ask your permission to overwrite yours with the new carefully-chosen settings, that whole first-date semaphore. Yyyyyeah, like notsomuch. Actually, it goes zzzip and kills your old file, and your chances of running X ever again along with it (unless you have a backup).

Shared Folders (aka Samba aka Network Neighborhood)
Problem:
Shared a folder in Ubuntu using the pointy-clicky widget, and you can’t connect to it from other machines. Just get asked for your password over and over, if even that.

Solution: In Debian, you’d set up a shared directory by hand-editing smb.conf. In Ubuntu, you set up a shared directory by right-clicking on it and ‘Share…’, then fix it by hand-editing smb.conf.

[in global config]
security=share

[in share’s config]
public = yes
browseable=yes
readable=yes
writeable=yes

chmod -R 777 your_shared_files might help too (cargo cult; I did it At Some Point during trying to get it to work, so no idea if it helped at all or if it’s actually needed), assuming you extremely trust everyone who can get at them.

Running fsck from install / recovery disk:
Ubuntu has no ‘root’; it’s all done with this sudo stuff. So booting the install disk to fsck some disks before they mount, no root there either. Luckily ‘sudo <dangerous_root_command>’ will do the trick, no password needed.

Running VNC (x11vnc), or probably services/daemons in general
In Debian, installing the package would also perform all the necessary voodoo to let the service autostart at boot. Some entries in init.d, rcWhatever.d, inetd, etc. Not so with Ubuntu, apparently.

To set password (step 1): vncpasswd
To run vnc server once (see if it works) (step 2): x11vnc -usepw -rfbport 5900 -shared -forever -nowf -norc -notruecolor -scale 4/5 -scale_cursor 1 -desktop computer_name -bg
To make it run every time (step 3): (TODO: FIXME)

Browsing Windoze boxes’ shares from Ubuntu:
TODO: FIXME

So yeah, about this Ubuntu thing…I’m not liking it. Think I should have stuck with Debian Sarge.

* Since most video card manufacturers would rather swallow a pineapple rectally than release an open-source driver for their card, and most Linux packagers would rather have a family of rabid hedgehogs living in their urethras than soil their distro with a non-open-source package, there’s this whole big ta-do about getting the thing installed, and they let you know it. In Ubuntu, this finger-wagging is performed through something called the Restricted Drivers manager. When you install a Restricted Driver, the lights in the room dim, ominous music plays, and over a Latin chant seranade a reanimated dead voodoo chicken from out of nowhere skitters across your living room floor and disappears down the basement steps, never to be seen again. Then your 3D applications all run quite a bit faster, at least theoretically.

**<rant>
Now, I just installed this new system two days ago to do one very specific task; I don’t want to spend the next two weeks reverse-engineering it to figure out how all these weirdly-named GUI-related processes interact with each other and where each of them writes its config files. I know what X (~= X11 ~= XFree86 ~= XOrg) is and that all things graphical (starting with a Window Manager; I assume this one is Gnome given the funky foot thing and ‘.gnome’ hidden file in my home directory) run on top of it, but what’s gdm? gconf? Is that different from gconfd? Nautilus? Metacity? That sounds like some kind of screensaver, or maybe something a really bad cancer might do. If I want to track down where that tickbox setting is hiding, I first need to know which of these dozen cryptic window-popping programs is responsible for popping that particular window, the one with those two little Desktop Effects tickboxes on it.
</rant>

I guess I’m not the only one who just wanted to ‘joe /home/tim/mystery.conf’ and change the appropriate line to ‘wibbly_wobbly_windows = off’ to unfuck things, but couldn’t find the setting. All afflictees giving or receiving help on Google-accessible forums suggested various sledgehammer-cult approaches, like uninstalling the packages named ‘compiz’ and ‘beryl’ using the commandline package manager (now wtf are these? Are they in addition to the dozen no-name graphical voodoo packages already mentioned? Anyway, removing these also causes a package named ‘ubuntu-desktop’ to be removed, which sounds pretty important, but apparently isn’t, because I haven’t noticed any change. But it didn’t solve the problem, either), or the approach that eventually worked for me, deleting .gconf, .gconfd, .gnome, .gnome2, .gnome_private, and .nautilus (and any subfolders/files) from the home directory and rebooting.


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *