Archive

You are currently browsing the archives for the Computers category.

Mar

27

Make a pretty Fvwm desktop on FreeBSD

By Strog

I’ve known that fvwm could be customized and prettied up but hadn’t really messed with customizing it until now. I started off with fvwm and afterstep back in the day so I still get a little nostalgic when I see anything with a fvwm feel to it. OpenBSD has fvwm as the default window manager instead of twm and I’ll usually worry about installing a window manager later since fvwm gets the job done.

I was looking around and ran across PEM’s Fvwm page and decided I wanted to give this theme a go. I really liked that the topbar, dock, etc. weren’t some addons but they are just built-in Fvwm modules. There’s a lot of shortcuts and tweaks for things like 3ddesktop, pseudo transparency, weather popup, icon thumbnails, etc. The icons for battery, wireless and sound all change to match the varying levels of each. The config is very modular and makes it easier to tweak. Most of the apps are setup as variables so you just fill in the variables in the ~/.fvwm/config with your terminal/browser/etc. of choice and it uses that everywhere else. It also can use gnome icon themes easily (I’m still using the gnant theme).

The one downside to this theme is that everything is hardcoded to the screen width (height doesn’t matter since it’s relative to top and bottom). I worked around this by making versions for 1024, 1280, 1400 and 1600 and making a script that copies them into place. I call the script (~/.fvwm/scripts/resolution.sh) from my ~/.xinitrc. Since X is running when .xinitrc is invoked, you can grep the resolution from xdpyinfo and copy the correct config before the window manager starts.

There’s a bunch of scripts in here that rely on Linux’s /proc, /dev/shm, etc. so I knew I’d have to rewrite some of the scripts for FreeBSD. The sysctls made this part of it a lot easier than I thought it was going to be since their output was what I was looking for. There’s sysctls for battery runtime, battery percentage and a whole lot more. There were some interesting ways to grab the info from proc on Linux so I was expecting worse. There’s a long thread on fvwm’s forums and it might be linux-centric but there’s a lot of good info because there’s a lot about the configs and application setup. I also posted a thread on Screaming Electron Forums discussing my fvwm desktop too.

This relies on the 2.5.x fvwm (fvwm2-devel port) since it added new features and the new layout. I also used xosd for battery and wireless output. Everything else (mixer, icon theme, browser, terminal, etc.) can be set as a variable in the ~/.fvwm/config. It will automatically start 3ddesktop when it loads if you have it installed (nice cool factor to have). I have a link for my configs, the gnant icon theme and the background here if you want to use them. Extract the config to your home, put the icon theme in /usr/X11R6/share/icons and copy the background to ~/pics/.current (or change the path in the config but still name it .current) to autoload.

Before:

After:

Sample Wireless output:

Configs:

fvwm configs

gnant icon theme

background

I haven’t gotten everything ported to FreeBSD yet and there’s more tweaking that could be done to this. I’ll make updated versions of this as I go but I wanted to get this going. The weather script needs fixing, the wireless icons should change with signal strength, etc. I’d be happy to add any tweaks someone wants to send me.

Even if this theme doesn’t float your boat you could check out Fvwm Crystal Theme, fvwm forum configs or the fvwm wiki for more ideas. Fvwm is extremely customizable but you have to dig into it to make your own.

Jan

24

Connection to the webserver is fixed

By Strog

For the few visitors that visit here, I’m sure you noticed some slowness and ocassional connection reset for a while now. There was a network problem at the colo and it made upload/download directly to the box a nightmare.

Hats off to elmore since he went down to the colo and tracked down the issue. Thanks a lot man!! Apparently there’s 4 pieces of fiber between the distribution and the rack andsomeone replaced one with multimode fiber when everything else issingle mode. I’m amazed that it even worked at all. Long story short is that everything is working wonderfully again.

Dec

30

OpenBSD on the Powerbook

By Strog

I was looking at the OpenBSD changes since 3.8 was released and I noticed they added a new driver for the touchpads in the new Powerbooks/iBooks. I had 3.8 on here but the external mouse and lack of multiple consoles made me try ubuntu on the Powerbook. Ubuntu was ok but there were several patches and every patch seemed to break something else. I had it working pretty good except the cpu was still running at full speed on battery. I wanted BSD on here so the fight was over. I immediatedly grabbed the latest snapshot and blew away the ubuntu install on here.

A quick netinstall and it’s time to find out if my touchpad works on here. I login, fire up X and the touchpad works great. I started building ports and it was smooth and working well during that. I took the laptop home after work. I started it up again and it was erratic and I had to plug in an external mouse. I tried it again later and it works fine again. Guess I’ll need to play with it some more. I’m just happy it’s making progress.

Dec

14

Project Evil and WPA

By Strog


We had a bunch of Belkin wireless bridges leftover when we had a dept moving around and finally got into their own building. I found out that they had a mini-PCI card in them that could be removed and put into a laptop. I saw that it was a Broadcom chipset (Windows drivers only) until I had a couple Windows laptops at work that we wanted to add wireless to. I had a extra one sitting on my desk so I decided to put it in the Dell laptop and see how far I could go with FreeBSD 6.0.
Installation was easy enough since it had two antenna connectors on the card and the laptop and the slot is right behind a panel on the bottom of the laptop. I knew the drivers were hard to find until I found out the Dell 1300 wireless cards had the same chipset. We used those drivers on the Windows laptops and they worked great so I decided that’s what I’ll be using for this too.

Ndisgen makes building a kernel module pretty easy. You need the inf and sys drivers files from Windows and your kernel sources. It built the kernel module and then copied it to /boot/kernel with the other kernel modules. I loaded up the module by hand to make sure it would load fine and then added it and ndis to my loader.conf. A quick reboot to test it all and I see it in my dmesg when it only showed an unidentified PCI network device before. Ifconfig shows ndis0 in my interface list and it appears to be ready to be configured.

I read the man page and found a couple good examples for wpa_supplicant. This seems to be fairly straight forward so I loaded the kernel module, created a config file and fired it up. Everything seemed to work so I ran a dhclient on ndis0 and it immediately picks up an address. I was a bit suprised that it went so smoothly but it’s been working great for the last couple days. One of the limitations to using NDIS wrappers is that you can’t use monitor mode with the cards so wireless sniffing is out. I have an Atheros and a Orinoco card that I can use for that and besides, the Powerbook and KisMac do a better job at that anyway.