Category Archives: Fixes

fcron compatibility with vixie-cron’s /etc/cron.* directories

vixie-cron has cron.hourly, cron.daily, cron.weekly, and cron.monthly directories. Your system might have something slightly different.

If you’re like me, you’ve done your research on cron daemons, and found vixie-cron to not only be one of the more resource-hungry options, but also one of the less usable. The system has really gotten stale over time. fcron not only does everything vixie-cron does, it also does everything anacron does, and in a nice, small package.

Problem is, fcron also doesn’t like to look back to the past. It doesn’t utilize the /etc/cron.* directories, unless you tell it to do so:

%hourly * /bin/run-parts /etc/cron.hourly
%daily * * /bin/run-parts /etc/cron.daily
%weekly * * /bin/run-parts /etc/cron.weekly
%monthly * * * /bin/run-parts /etc/cron.monthly

Add this to your system’s crontab by running:

sudo fcrontab -e

As soon as you save and quit, fcrontab will run all the jobs once, and then continue according to schedule.

Removing WINE’s Default Application Entries

Today I double-clicked an image, and it opened with WINE Internet Explorer. What in the world? Why would I want that?

Anyways, odd developer choices aside, there’s a way to get rid of WINE’s software completely from your “Open With” menus. Shut down¬†winemenubuilder.exe. Here’s how to do it:

  1. Open winecfg
  2. Go to the libraries tab
  3. In the dropdown, type in “winemenubuilder.exe” without the quotes. It’s not in the list, but you can type it.
  4. Once added, click on the new entry and click the Edit button.
  5. Click the Disabled radio button, and save everything.
You’ll want to go through the .local/share/mime and .local/share/applications directories and delete anything relating to WINE. On my system, the only reason .local/share/mime exists is because WINE creates it, so I deleted the mime directory entirely. If you keep it, be sure to run:
update-mime-database .local/share/mime

If you’re running a good DE, like LXDE (hint, hint), all your menus will update almost immediately.

Source: WineHQ bug #19182

Gentoo-built Desktop Managers and Their Lack of Integration

I don’t know if anyone else noticed this, but I certainly have. It’s not that it can’t be worked around. It’s that Gentoo-built desktop managers lack the polish other pre-mangled distributions like Ubuntu provide. I miss that.

Presently, I’m using KDE, and as it turns out, it has the most integration issues, in my experience. The only thing in GNOME that felt thrown together was super-user authentication and printing, whereas KDE has issues with NetworkManager, PulseAudio, super-user authentication, and external storage mounting, and I’m sure I’ve only scratched the surface.

The plan is to spend the rest of my summer reporting on these issues so they can be resolved. With fingers crossed, bug reports will be filed and fixed.

Stay tuned.

How can I be a KDE power user?

As far as I can tell, KDE is essentially a desktop environment shell layered on top of many very useful libraries. The difficulty is, how does one test each individual layer?

Here’s a recent example. I started by using Amarok as my music player, a default choice it seems for many KDE users. I put an audio CD in the drive, and it appeared in Amarok. When I tried to play or rip the CD, though, the interface just wouldn’t respond.

Fast-forward many, many hours later, and I’ve traced the issue through logs spit out by Amarok, Phonon, Kscd, gstreamer, ffmpeg, and the kernel itself, and I narrow the issue down to KDE I/O layer. cdparanoia reads disks just fine. No KDE-based app can. There’s a lot of seek errors in the kernel logs, which appear only when a KDE-based app is up and running with a CD in the drive.

So what’s the big deal, you might ask? I figured it out. What’s the problem?

Perhaps I’m spoiled, but in GNOME I debugged issues quite differently. If I had an issue, I’d go through each API layer, and use each one’s executables. Note the difference between KDE and GNOME: GNOME makes every layer, every setting easy to access, if you look for it. KDE gives you everything at once, and hides everything else in a wall of libraries. There’s no intermediate executables I can use to debug each layer, by manually running through steps myself. There’s no ability to get a work-around, or to helpfully narrow down the area where the bug exists for Google searching.

How do I make my debugging with KDE more productive? What steps do I take? How have you debugged KDE-based applications? I know about the KDE wiki page, but is there anything else?

Gentoo (and a little Ubuntu) on a MacBook Pro (5,3)

Getting Started

The Google-size summary: I’ve gotten Gentoo working on my MacBook Pro (5,3) again.

I’m going to attempt to recount all the little issues I ran across while installing Gentoo. If you notice I missed something, post it in the comments and I’ll try to figure it out and/or add it here. I also hope to add my findings to the Gentoo wiki, although the wiki is such an outdated mess that I’d almost feel like scratching the whole thing and having the Gentoo+MacBook community write their experiences back in. Continue reading

Non-obvious, Unannounced Gentoo Update

I’m not too happy the devicekit-power package has become unsupported but still remains in the tree as stable, with not even a word in elog or similar. This package depends on libusb:0, which has some pretty unfortunate bugs, resulting, at least for me, in power management only half working. I praise the developers of GNOME yet again for solid code writing that chugs along and still recognizes my battery and other things despite crashes like this.

It’s pretty easy to update and move on. Simply run emerge -1v upower and portage will handle the transition.

Status of Gentoo on MacBook Pro (5,3)

HEY, LISTEN! This blog post and some of its tips are out-dated. You can read it but keep that in mind. I have a more detailed HOWTO-like blog post here.

  • ALSA: It supports all the inputs and outputs on the computer. The headphones and speakers get two different volume levels. I find setting headphones to 30% and speakers to 100% works perfectly for me, but every pair of headphones acts differently.
  • Graphics: NVIDIA drivers have been available from the start. No fuss or mess here, especially now that distributions have seemed to have finally found a way to package them in a way that doesn’t obliterate important X11 libraries.
  • Screen and keyboard brightness work if you install pommed. Since GNOME already recognizes the volume keys, I turned that off in pommed. The Banshee music player (my new favorite) understands the media controls, to my surprise! The eject button is also supported by pommed. As far as standard keyboard buttons go, the Home, End, Page Up, Page Down, Windows, Delete, and Function keys are all accessible via the Fn key, in combination with the left, right, up, down, Command, “delete”/Backspace, and Function keys respectively. (Why OSX doesn’t understand half these keys, and some of them only half the time, I still don’t understand.)
  • The large trackpad works very well. Single-finger click is a left click, two-finger click is a right click, and three-finger click is a middle click. Two-finger scrolling works very well, and can even be turned on and off in the Mouse settings in GNOME. Four-finger scrolling appears to be interpreted as a single finger, but that may be adjustable.
  • Within the last week or so, a new release of the isight-firmware-tools package (1.5.92) just added support for the iSight camera built into this MacBook. I am very happy about that, since that’s one less thing to reboot into OSX for. It still has some small setup required, but it’s a one-liner, so it barely registers on my “todo” list.
  • The wireless card works very well, and works with NetworkManager. Bluetooth works.
  • The battery is reported correctly in GNOME.
  • The SD card slot works. I’ve used it several times.
  • The fans require some doing. They don’t actually turn on automatically (scarily enough), so I had to hack up a script someone wrote to get the fan to react to temperatures reported by sysfs.
  • And the hard-drive, um, spins and stuff.

So, as you can see, besides pommed, a fan script, and the webcam, there’s really very little tweaking required. Everything more or less works.

Edit: The kernel configuration for this machine was requested in the comments below, so I’ve posted it here.

Syncing Bash History Between Shells

Ever closed and opened a shell because you needed to refresh the history to pull up a command you used before? Nevermore! Read this excellent post on briancarper.net to make your terminal life much easier.

Firefox Saved Password Security (Beyond the Master Password)

I don’t know whether or not Firefox even allows JavaScript access to the passwords automatically filled out when you visit a page, but I sure am not going to wait until some cracker finds a hole in whatever security Firefox provides and gets at my automatically-entered password.

So, this time around I’ve decided to require Firefox to wait until I’ve entered the username before the password is filled out. If I forget the username, I simply hit the down arrow in the username box and it gives me a selection.

The setting is located at about:config (for those who don’t know: type that into the address bar) and is called “signon.autofillForms”. I set it to false. Long may security prosper!

Tip: Don’t use HTTPS + Gears + Google Docs

https://docs.google.com, when used with Google Gears turned on and allowed, will result in some kind of unreported error in the Gears backend, leaving its users with a blank page. I have a feeling that Gears cannot handle HTTPS connections, but I’m not sure. It could be just a Safari and/or OSX issue.

Others have reported endless authentication redirection, which makes sense if you study the URL that the HTTPS version always gets stuck on. (There’s a “redirect” parameter which points to https://docs.google.com/?pli=1, which, if followed manually, simply circles back around through the authentication again and sticks back at the same old blank page.)¬†Hopefully Google takes notice and fixes this soon.