Posts

Showing posts from 2009

JWM and GDM in Ubuntu

JWM is a lean yet featureful window manager. It's the default WM in Puppy Linux and Damn Small Linux. I wanted to do some work with JWM on my Ubuntu Jaunty machine, but I noticed after installing it I didn't get an entry in the GDM login screen giving me the option of using it. Fortunately, this is easy to fix.

As root, create a file called jwm.desktop in /usr/share/xsessions containing the text below:
[Desktop Entry] Encoding=UTF-8 Name=JWM session Comment=Use this session to run JWM as your desktop environment Exec=jwm Icon= Type=Application
(Note that the file has to be in /usr/share/xsessions -- it won't work if you put it in /usr/local/share/xsessions even though you'd think it should.)

Logout, and you should now have an entry that reads "JWM session" in GDM's session selector that starts JWM.

Anti-aliased fonts in Wine

Anti-aliased fonts in Wine seem to be disabled by default. This leads to some pretty ugly font rendering. (No flames, please. If you don't like anti-aliased fonts, then please move along.)

An almost-in-passing comment on this post tells you an easy way to turn on anti-aliasing. I tried it on my Ubuntu Jaunty installation, and it seems to work fine. To spare you the need to reference and hunt and peck the original post, here's what I did:

Open the file ~/.wine/user.reg in a text editor.Change the entry "FontSmoothing"="0" to "FontSmoothing"="1"Close your text editorThere is no fourth step.Enjoy.

Later addition: There is a more comprehensive discussion of enabling anti-aliasing (including ClearType) here.

Different GTK settings for different sessions

Here's the situation:

You like using different window managers for different things. For example, sometimes you want to use IceWM, other times Openbox, etc. This is easy enough to do if you are using GDM, but there's a small thing that bothers you. All the above WMs will use the same configuration files for GTK settings, but you want to use different settings for each. For example, in Openbox you may want to use Tango icons but you like the default Gnome icons better in IceWM.

I describe below a way you can make this happen. It's a tiny bit hackish, but it seems to work just fine. It assumes you are not using gnome-settings-daemon.
GTK settings--the easy wayFirst of all, make life easy for yourself and install LXAppearance. It is part of the LXDE desktop environment, but many distributions let you install it as a standalone package. It is the best tool I know of to adjust GTK appearance settings. You do not need LXAppearance to do what I describe below, but you will love lif…

issues with libtrash and ROX or Firefox

libtrash is a shared library by Manuel Arriaga that gives Linux delete operations a trashcan behavior. When I tried it under Debian Etch with ROX, I don't remember having any problems. This weekend I gave it a go with Ubuntu Januty, and, sadly, it is having issues. (I haven't tried it on Debian Lenny yet.)

With both Openbox or IceWM, ROX started behaving a bit strange. In particular, any attempts to move into parent directories took a very, very long time.

There are also issues with Firefox. libtrash's website points out a problem with segfaults when starting up on some systems. I didn't see segfaults on my system; instead Firefox just didn't want to start. Even from the command line, all I got was a stuck process (no debug/warning/etc. messages).

I really hope these issues get ironed out because when it works, libtrash is pretty cool.

ssh via Cygwin

Argh. I am trying to set up Unison on my Windows XP box at work. Unison needs an ssh connection, and the ssh server I had been using, KpyM Telnet/SSH Server, just doesn't seem to get along with Unison. This has led me try try the ssh server in Cygwin, and all I can say is "Ouch."

While Cygwin is truly a blessing, it is not exactly easy to set up. If you are trying to set up a ssh server with it, I found the directions here to be a godsend. Be sure to read it carefully as there are lots of little bits and pieces that can be messed up in the default install. In particular, I ran into a roadblock with group IDs right, and this solved it.

Starting up gnubiff

Image
I am using gnubiff as my email notifier because it's cuter and more flexible than the defacto standard Mail Notification. In fact, I use two different instances of gnubiff to provide notification for two different groups of email accounts. (Yeah ... I have too many email accounts.)

However, one of gnubiff's issues is that once it encounters an error (such as if the Internet connection isn't up) it tends to get stuck even when whatever caused the error is fixed. To help with this problem, I wrote a script that I call when my session starts up. The script waits until the Internet connection is up before starting my biffs. You'll need to modify the specific biff/gnubiff/whatever calls for your needs.
#!/bin/bash # Copyright (c) 2009, Mithat Konar # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain…

Running commands on GNOME logout

This post deals with GNOME, which disqualifies it from any reasonable "light-and-lean" discussion, but I don't exactly know where else to make a note of this.

One of the bigger omissions from GNOME is that there is no built-in mechanism for executing commands at logout. I discovered this the hard way when trying to set up MPD to run completely in userspace (to be documented in an upcoming post). However, it is possible to make GDM run arbitrary stuff at the end of the session, and that can be used to good effect as described here. In the event that that link goes bad, in summary what you do is edit /etc/gdm/PostSession/Default
and add
logoutscript="$HOME/.gdmlogout"; if [ -x "$logoutscript" ] ; then su $USER -c "$logoutscript" fi to the file. Then create a file .gdmlogout in your home directory and make it executable.

You need to note that this will only work if you are using GDM and the .gdmlogout file will execute no matter what desktop env…

Use ROX-Filer to open containing folders in Firefox/Iceweasel (Part 2)

About a year ago, I wrote up a method for getting Firefox/Iceweasel to open files in ROX-filer in Debian Etch. Recently, Into.The.Void wrote up a much more sane way to accomplish the same thing in Gentoo that works with more recent versions of ROX.

ROX's -U option that Into.The.Void uses is not available in the version of ROX that's in Etch, but it is available in Lenny. (You have updated to Lenny, haven't you?) The bad news is that, the file used in Into.The.Void's script, /usr/lib/rox/ROX-Filer/AppRun, is not part of the ROX package in Lenny. But the good news is that it is trivially simple to change the script so that it does work in Lenny.

So, here is Into.The.Void's method adapted to Lenny:

As root, make a new file /usr/local/bin/roxuri and copy the following into it:
#!/bin/sh exec rox -U "$@" Make the new file executable for all by using ROX or by issuing the command:

chmod a+x /usr/local/bin/roxuri

Open Firefox/Iceweaswel and set it to use the scrip…

SkinnyDebbie for Lenny

Image
I just released an advanced beta (i.e., good enough for daily use) of the SkinnyDebbie light-and-lean flavorizer for Debian Lenny.

Please, do go forth and enjoy.

Xstarfish

Xstarfish is another tool you can use to set your screen's background image. However, unlike other wallpaper tools that simply paste pictures into the background, Xstarfish creates a new random image everytime it is invoked; you can also set it to periodically generate a images. I won't go into how to use it here; the man page is clear enough.

Urukrama's Weblog has a couple nicescreenshots to give you an idea what it does.

A word of warning: if you go for the '-s full' option, it will eat a lot of cycles before it shows anything.

via Urukrama's Weblog

Nitrogen

Nitrogen is a friendly tool you can use to set your screen's background image (i.e., wallpaper). To select a new background image, launch nitrogen from the command line, passing it the directory in which you store your background images:

nitrogen /path/to/background/images

This brings up a GUI from which you can select, stretch, etc. your desired image.

You can restore the most recently set background image with the command:

nitrogen --restore

If you place this command in your session startup scripts, every time you login to your session nitrogen will restore your background image.

The only problem with nitrogen is that its image browser expects to be told the directory to search for images. In other words, it does not have a built-in directory browser. To that end, I wrote the following little script to wraps nitrogen inside a directory selection GUI. Enjoy.
#! /bin/bash # Mithat Konar 2009-06-07 # Wraps nitrogen inside a directory selection GUI. # Requires: nitrogen, zenity ui_br…

Thanks, Yellow Dog! :-)

Executive summary:
If you are having trouble getting Debian Lenny to give you anything other than 800x600 resolution on a Macintosh Cube, try the xorg.conf file below.

The long version:
In a previous post, I mentioned how easy it was to tweak the Etch-based version of SkinnyDebbie so it worked on a Macintosh Cube. More recently, I've directed some energy into getting Lenny up and running on the Cube as a precursor to making the upcoming Lennified version of Skinny work on it as well.

My adventure started by installing the Xfce version of Lenny on the Cube, and it worked ... sort of. As long as I was happy with 800x600 resolution, it worked fine. As far as other resolutions go, there were none. 800x600 was the only thing available. Much Googling and dinking around with /etc/X11/xorg.conf changed nothing or made the situation worse.

So, I tried a full Gnome install. Same thing. I tried building a system from the ground up, adding all the bits and pieces incrementally. I got no furth…

Not all Xfce's are equal

I happened by chance onto a post in the CrunchBang Linux forum that led to an interesting article comparing Debian's and Ubuntu's Xfce-based desktop installs. And now that Wicd is available in Ubuntu 9.04 as well as in Debian testing and lenny-backports, I am starting to get unreasonably excited.

A .fonts.config file

For whatever it's worth, I've been having pretty good luck with the following .fonts.conf file after installing msttcorefonts in both Debian Lenny and in Ubunty 8.10 (Intrepid). I haven't really tried it in Ubuntu 9.04 (Jaunty), but it's worth noting that msttcorefonts is called ttf-mscorefonts-installer in 9.10.
<?xml version="1.0"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <fontconfig> <match target="font"> <edit mode="assign" name="autohint"> <bool>false</bool> </edit> </match> <match target="font"> <edit mode="assign" name="rgba"> <const>rgb</const> </edit> </match> <match target="font"> <edit mode="assign" name="hinting"> <bool>true</bool> </edit> </match> <match target="font"> <edit mode="assign" name=&q…

CrunchBang Linux

The people over at CrunchBang Linux have put together what they promise is a lightweight Ubuntu-based distribution. It comes in Standard, Lite and Eee versions. I have yet to try it, but I absolutely love the minimalist default desktop and am very impressed by what I've read.

CrunchBang's approach to implementation and design differs a bit from what I'm trying to do (ever so slowly lately) with SkinnyDebbie. Implementation-wise, CrunchBang is a full distribution that is based on a standard distribution (Ubuntu); SkinnyDebbie is a configuration that sits on top of a standard (currently Debian) distribution. In terms of design, without actually trying it I can't say for sure, but it looks as though CrunchBang is aimed at users that have at least a bit of Linux familiarity and a tiny bit of hardware headroom.; the design philosophy behind SkinnyDebbie is to make it as useful and inviting as possible to computer newbies while using the lightest-weight core options that stil…

SkinnyDebbie has moved

I've moved SkinnyDebbie to a new home. Skinny's new home will be able to give the project more of the services it wants and needs. From now on, the best place to get the Skinny is http://skinny.tuxfamily.org/ .

Lenny is out!

Debian gives us a Valentines Day gift by releasing Lenny. :-)
via Slashdot

The Joy of X

Image
I've been doing some work with Lenny in its current pre-released state. It's actually pretty stable and usable, with one 1000-pound gorilla exception: X.

In case you are as new to Linux as I was last year, the X Window System (or simply X) is the name of the service that provides graphics in Linux. There used to be competing flavors of X, but now the world has pretty much settled on the version offered by the X.Org project. In contrast with the myriad choices for file managers, text editors, window managers, etc. that characterizes the rest of Linux, if you want graphics (i.e., GUI), you need to deal with X, and you will almost certainly be dealing with X.Org's implementation.

Right now I kinda wish you didn't.

The 1000-pound issue with the latest (i.e., found in Lenny) version of X involves automatic modes detection. In Etch, when you installed X the installer ran a script that made a reasonable guess concerning what your video system was capable of and then asked you if…