Xfce

Subdomains
 

Linux and Wireless Config

  • December 18, 2006
  • Brian Tarricone

Configuring wireless on Linux is a pain. Gentoo doesn't make the situation any easier: there's a text file in /etc/conf.d that needs to be edited to include your SSID, keys, options, etc., and if you're using WPA/WPA2, you need to mess with /etc/wpa_supplicant/wpa_supplicant.conf as well. If I want to change networks (say, when I visit my dad's house), I have to edit these files and restart the interface.

There's NetworkManager. It looks really cool. Unfortunately, it doesn't work on my PowerBook. It never scans for wireless networks (though it appears to detect my wireless interface ok), and its logging output isn't too useful. To be fair, I haven't had the time to look into it too deeply (after spending hours and hours getting it to build properly, I didn't have much patience for runtime issues), and I'm aware that the Gentoo 'backend' isn't one of the more mature ones. Also: it's ridiculously over-engineered. I do understand all the various cool things you can do with it because of how it's designed and integrated into the desktop, but all of that stuff isn't useful for my general usage.

Oh, and I still can't get NetworkManager to compile without gnome-panel present, which really pisses me off. It doesn't even build a GNOME panel applet, as far as I can tell. Regardless, I use Xfce, as we all should know by now. I've tried to keep the number of extraneous useless libraries and apps installed on my laptop to a minimum, so I don't really want to install most of GNOME just for a network control applet in my systray.

(I'd just like to point out that I think NetworkManager is a great piece of software. It obviously does work very well for some people. Just because it doesn't work for me, or doesn't meet my needs quite as well as I'd like, that doesn't mean I think it's crap. It most definitely isn't.)

I was thinking about what I care about for a wireless network manager. I realised that I don't need/want it to manage my wired ethernet interface. (That's a separate project: just a simple daemon, probably written in bash or perl, that configures/un-configures the interface when a cable is plugged in or removed.) For wireless, I'm thinking about the MacOS X model here. You get a little menu in the menu bar that lets you turn wireless on and off, pick networks, enter security info, and (I think, don't have the Mac in front of me right now) open up the networking settings panel. That's really all I need as well. I don't need fancy system services (I'll count on Gentoo's startup script to try to connect to my default already-defined networks on startup), I don't need it to take care of my ethernet interface, I don't need it integrated into my desktop so all my apps can know whether or not I have a network connection, I don't need a D-Bus service, and I don't need some weirdo 'dhcdbd' thing (I still have no idea what this does or why NetworkManager needs it, and I don't particularly care).

So, I think I'm going to blatantly rip off the Mac and write a little system tray icon (yes, I know, abuse of the systray; sue me) to handle my wireless connections. I was looking at wpa_supplicant, and it appears that it's freakin' awesome. You can use it for connections to unsecured, WEPed, and WPAed networks (among a bunch of other things most people aren't likely to have in their home), and it has a command-line tool to control a running instance of it (wpa_cli), which can add/remove networks, set parameters, force it to reassociate, etc. So I'm thinking I'll just require wpa_supplicant, and do network management through that. There are two things that require root access: 1) bringing the interface up and down, and 2) writing out a new wpa_supplicant.conf file so the system boot scripts can take advantage of any changes (this is optional). We don't need root for wpa_supplicant control, because it can be configured to allow normal users to control it based on their group membership (though on my laptop, the permissions on the control socket were messed up when I first tried it).

Bringing the interface up and down is annoying, since it's a very tiny (yet critical) action, and I need to pay attention to a bunch of security-related issues. One option is to use gksu or some other GUI method of prompting for the password. I like this from a development perspective, as it requires very little work on my part. It's a pain from the user's perspective, though, as I don't feel that a logged-in user should have to enter his/her password every time they want to turn wireless on or off. A lazy option is just to require the user to set up 'sudo' to let them run ifconfig with root privs with no password, but I don't really like that either. I think I'll end up writing a setuid helper app that validates the logged-in user in some other way (perhaps using pam_console).

I'm going to attempt to do it without depending on any Xfce libraries (though I might pull in libexo for the session client and a couple other things). I'd like to create a general-purpose desktop-neutral app here. It's certainly not going to cater to everyone, and probably won't work on all distros without some manual fudging. I just don't have the time or desire to spend that much time on it (yet), and I'll have to rely on contributors to submit patches for their setup of choice, if they care to do so.

Otherwise, it's not that hard. I'll store wireless config in my own format in the user's homedir. There can be an option to write out a system-wide wpa_supplicant.conf file to sync changes with the system so the interface can come up on boot with some default setup. All that's left is a lot of text output parsing (from wpa_cli, which hopefully doesn't change output formats between versions), and good CLI/GUI integration when setting wireless parameters and presenting feedback to the user. Since I'll be in MD for 2.5 weeks, I'll give it a shot, as I don't really have all that much planned while I'm at home.

(I think I'm going to name it 'airconfig'; when I make a website for it, it'll likely be here. If anyone has any thoughts for a more creative name, feel free to leave a comment.)

xfce eyecandy

  • December 16, 2006
  • Josh Saddler - Category: Xfce

All right, I finally did it. I went for the eyecandy. I've never set up any thing having to do with composite, transparency, etc., but I figured that since as long as I'm living on the p.masked Xfce edge anyway, I might as well use its built-in compositor. And...it's interesting. I don't particularly like how the panel automatically gets translucent whenever the mouse isn't on it, and it's actually distracting when I have a terminal superimposed on both Firefox and another terminal...I was surprised that the backgrounded Firefox itself becomes clear enough to see the other terminal underneath it.

And yet people dig this stuff? Or maybe they just dig the effects of more nifty compositing window managers like compiz. Anyway, I don't know if I'll stick with it or not. I'm pleased to say that after a little tweaking, it's a minimal resource hit even for my ancient integrated nVidia GeForce2 Go chip. (One of the very first dedicated mobile GPUs, a whole 16MB memory.)

Interestingly, I seem to be running only semi-hardware-accelerated, as I call it. running "glxinfo" gives a segfault, as it can't find the GLX extension to load, despite the visual results. Problem is, I can't enable "AllowGLXWithComposite", as that results in random hard lockups, which is the fault of being forced to use nvidia-legacy-drivers. These older 7xxx drivers are known to have such bugs, but the newer 8xxx drivers don't support my vintage 2001 hardware. Ah, well. At least adding "RenderAccel" to xorg.conf lets me run this stuff with very little noticeable slowdown. I suspect that I am getting hardware accel; it's just confused.

I think I'll bring along this composited laptop to SCALE and show off the wonders of unstable Xfce and the latest eyecandy. Which reminds me, now I need to see about getting all the effects of compiz, but without using that WM or unmerging yet more masked packages. I want to see what else this old graphics hardware is capable of. :)

moved on

  • December 15, 2006
  • Josh Saddler - Category: Xfce

...to Xfce4 4.4, that is. I've finally heeded the urgings of my fellow Xfce enthusiasts dostrow, nichoj, et al, and moved my laptop over to the latest Xfce 4.4 prerelease. Sometimes as a developer, you have to live somewhat on the bleeding edge, in this case, a couple of dozen entries in package.unmask. Yow! Hot stuff. The new Xfce has changed considerably since 4.2. It more resembles a traditional desktop environment, but it still retains the speed and ease of use that it had from the older days. That said, some configuration changes have been made. Configuring the panel is a little less intuitive; the same control works for both the icon strip at the bottom and the window list at the top. (So don't just kill the panel process entirely!) No more xftaskbar4 to kill. ;)

There are still a few outstanding bugs, such as missing icons from things like the main configuration window, missing panel plugin icons (none for cpu-freq), and missing icons for mail and webbrowser in the terminal Applications menu. Also missing is the old ability to change the icon spacing in thunar. Though a host of other features have been added, folder views take up way too much space. Need the icons to be spaced about half as far apart as they currently are.

Also, the new battery applet is not nearly as helpful as the old one. For example, even though lm_sensors doesn't work on this laptop whatsoever, the basic thermal zone info from ACPI was parsed by the battstatus applet (don't ask me why, I'm just glad it did). It displayed temperature, battery charge, and an indicator whenever the fan turned on. Handy, right? Well, the fan indicator is still there, but there's no provision for temperature display anymore. WEAK. Grr. I'd downgrade, but the stable version blocks the masked version. Anyone know a fix-it for this?

Speaking of WEAK, my back has taken a sudden turn for the worse over the last couple of days. Earlier this week (i.e. before I started my new schedule on Wednesday), I was almost back to normal. I could walk without limping, at least most of the day. And now...now I'm not doing so hot. Some excrutiating twinges, and constant pain every step. It's a little better than it was yesterday, but I for sure need to get to the doctor's office and get that x-ray done. The doc said it'd take a minimum of six weeks to heal, and at the end of that time, I can say that I'm definitely not recovered. %$^&# sciatica. And at my age, too. I'd hoped to be well by my wife's birthday and Christmas, but doesn't look like that will happen.

Maybe I'll be fully healed in time for SCALE in February?

wiping out, moving on

  • December 7, 2006
  • Josh Saddler - Category: Xfce

There were some good comments on my last journal entry, thanks to everyone who responded. I'm happy to say that some of the problems have been dealt with. I've been talking to several developers who are rather likeminded; just check Planet's entries for the last week or so.

Anyway, I've decided to give my trusty ol' lappy das boot, by which I mean "the boot" rather than "the boat." p

It's had Gentoo (Jackass! 2005.1, yay for my old project) installed on it since August 31, 2005. And what with one thing or another, it's just been slowing down. It's got a strange partition layout on it, too. A whole unused 10GB ntfs partition (never got around to installing Windows), a smaller Linux test partition, and the main desktop stuff. Rather inefficient usage of the 60GB disk, considering its recent use. The slowness, combined with space issues, and the fact that I haven't updated it since before gcc-4.1.1 went stable on x86 means that I've decided to just reinstall. Why spend a week compiling when everything will likely break if I try to simultaneously migrate to modular Xorg and switch from gcc-3.4, as well as all the crazy kernel/udev/nvidia/madwifi updates?

Time to wipe the disk and move on to something more recent. I've spent today moving /home to my new USB key and dumping it to my AMD64 box. It really highlights the slow-as-molasses USB1.1 on the laptop, as well as the crappy I/0 and slow system bus. I'll be doing some smarter performance tuning this time around, as well as installing only Xfce. I've been running mostly in Gnome because of some weird Xfce/Fluxbox issues, but with only 128MB memory, any and all workloads are just about unbearable.

Of course, the simpler solution would have been to just plug the laptop drive straight into the IDE cables on the AMD64 box for the updates, but unfortunately, the drive uses some weird laptop-only ATA/power combo connector, not the standard IDE connector. Oh well. I don't mind trying out the Installer LiveCD, especially since I'll have nothing to lose.

Guess I have to go re-read all the changes I've been making to the installation handbooks. ;)

Sleep, Or a Lack Thereof

  • December 5, 2006
  • Brian Tarricone

I've been having trouble sleeping recently, more than usual. I hardly got any sleep Sunday night, which was probably more due to napping Sunday afternoon than anything else. But the end result was that I probably spent about 2 hours sleeping, but still got up at 8am to get ready for work.

So I figured Monday night I'd be exhausted and I'd sleep well. I went to bed around 10pm, and fell asleep very quickly. However, I woke up at 1am. I had a lot of trouble falling asleep after that, maybe getting another 2-3 hours of sleep in before finally getting up at 7:30am. I felt tired, and not really rested (and I still feel kinda tired).

I'm not really sure what it is. Is it physical or mental? Am I not comfortable in my bed anymore? Is it too noisy? Too warm/cold? Has there been a lot on my mind lately that's keeping me from sleeping?

I really don't know. There's been a decent amount on my mind lately, but it's mostly work stuff, and I tend to be pretty good about leaving work stuff at work. Life stuff... well, I guess there's been a bit on my mind there as well, but I don't think that's been keeping me awake.

I hope it's not my bed. A new mattress isn't cheap.

Temperature is a good question. My bedroom is a couple degrees hotter than my living room because of the computer equipment. Still, if anything I feel a little chilly in my bed (sans blankets). I think I feel relatively comfortable.

Noise is a possibility. A few months ago I added a small dedicated Linux box as my router. It has a single 80mm fan that's a bit noisy. I should replace that with a quieter fan. Also, the CPU fan in my desktop machine could stand to be replaced, as it's not the quietest thing in the world. THe other fans in my computer are all variable-speed and relatively quiet.

So I guess I'll try replacing some of my noisier computer fans and see if that helps. I also came upon these noise-absorbing blocks, though I'm a bit skeptical. They also carry noise-absorbing lining material, though that's a bit more pricey. Ideally, I'd like to just move my computer out of my bedroom, but I don't have another place for it. If I ever move into a larger apartment with a spare room, that would work, but until then I'm stuck. I've also thought about building a low-noise, low-power NAS box to move all my storage out of my desktop. With that, I could conceivably leave my desktop off a lot of the time, or maybe even think about moving to a laptop-only configuration. I think I'm a ways off from that, though (maybe after I buy an Intel-based Mac laptop in a couple years).

Finding a good heatsink/fan combo for an old Athlon Socket A/462 motherboard isn't as easy as I'd hoped. The board also has very little clearance around the sides of the CPU socket, so smaller is better. It would be nice to get away with just a tallish heatsink, but the older Athlons probably run too hot for that.

Following Directions

  • December 1, 2006
  • Brian Tarricone

Sigh. I know people don't read directions. I know that, when you want to get someone to read something, brevity is better: the less there is to read, the more likely the recipient is to read it.

But when the first line of a Bugzilla mail says "Do not reply to this email. To comment on this bug, please visit: (URL)", you'd think that people would, you know, just click on the damned link. How is it easier to hit reply, delete "bugzilla-daemon@xfce.org" from the "to" line, and paste my email address in there?

(Ok, spambots, have at the bugzilla-daemon address. It goes directly to /dev/null anyway.)

So now, Xfce Bugzilla emails start with this: "DO NOT REPLY TO THIS EMAIL. Also, do not reply via email to the person whose email is mentioned below. To comment on this bug, please visit: (URL)."

Hopefully that's clear enough, and not too long for the ridiculously lazy among us to read.

Following Directions

  • December 1, 2006
  • Brian Tarricone

Sigh. I know people don’t read directions. I know that, when you want to get someone to read something, brevity is better: the less there is to read, the more likely the recipient is to read it.

But when the first line of a Bugzilla mail says “Do not reply to this email. To comment on this bug, please visit: (URL)”, you’d think that people would, you know, just click on the damned link. How is it easier to hit reply, delete “bugzilla-daemon@xfce.org” from the “to” line, and paste my email address in there?

(Ok, spambots, have at the bugzilla-daemon address. It goes directly to /dev/null anyway.)

So now, Xfce Bugzilla emails start with this: “DO NOT REPLY TO THIS EMAIL. Also, do not reply via email to the person whose email is mentioned below. To comment on this bug, please visit: (URL).”

Hopefully that’s clear enough, and not too long for the ridiculously lazy among us to read.