Showing posts with label xmms. Show all posts
Showing posts with label xmms. Show all posts

Friday, August 17, 2007

The Slit

Fluxbox has something called the slit. It's like the Windows Vista Sidebar—except n times better because you're not running Windows Vista. In short, it gives you convenient access to "dockable" applications in the form of a sidebar on your desktop.

For example, GKrellM can be run with the "withdrawn" option and will then appear in the slit. It provides an easily customized set of system monitors, so you can keep an eye on your box's vital signs. If you don't have it already, it's no problem to install.

apt-get install gkrellm
gkrellm -w


I know no one's working on the original XMMS project anymore, but I still use it. It can also be docked in the slit. Just run wmxmms & and it should appear there.

The Fluxbox FAQ suggests that you can use wmDrawer to display the Fluxbox logo in the slit. Of course, you could use the same method to display any other image. The FAQ doesn't go into the specifics, but it's simple.

First we install it. I also chose to copy the example resource file to my home directory.

apt-get install wmdrawer
cp /usr/share/doc/wmdrawer/wmdrawerrc.example ~


Then I copied the Fluxbox logo to the directory where wmDrawer looks for images.

cp fb-icon48x48-metal.png /usr/share/pixmaps

The example file also has a line for /usr/local/share/pixmaps, which I ignored because that path doesn't exist on my system. I edited the file to use the logo as its dock icon and commented out the lines defining the buttons, since I don't use them. When I was done, the file looked like this:
# Config file example for wmdrawer
[general]
# Dock's icon [optional]
dock_icon fb-icon48x48-metal.png

# Drawer's opening direction [required]
# Top to bottom = 0
# Right to Left = 1
# Bottom to Top = 2
# Left to Right = 3
direction 2

# Image used for icons' background [optional]
#icons_bg defaultTile.xpm

# Allow icons' enlargement to fit them to buttons' size [optional, default 1]
# 0 indicate that icons should never be larger than their original size.
#icons_expand 1

# Activate the drawer's pseudo-transparency [optional, default 0]
# if you choose transparency, icons_bg will be ignored
#transparency 0

# dock's width: min=12, max=128 [optional, default=64]
#dock_width 64

# dock's height: min=12, max=128 [optional, default=64]
#dock_height 64

# buttons' size: min=12, max=128 [optional]
# Useful for the people who want for example to have big icons
# and to define several columns.
#btns_size 32

# Icon's highlight type: 0, 1 or 2 [optional, default 2]
# 0 : no highlight
# 1 : target (unavailable if transparency is activated)
# 2 : shading
#highlight 2

# Image used as highlight [optional]
# only used if you choice target type
#highlight_img highlight.xpm

# Tint icons by a specified color [optional, default #ffffff]
# only used if you choice shading type
#highlight_tint #ffffff

# Shade icons at a specified level [optional, default 60]
# only used if you choice shading type
#highlight_sh 60

# Display buttons' tooltips [optional, default 1]
#tooltips 1

# Tooltips' font [optional, default fixed]
#tooltips_font fixed

# Drawer's animation speed: 0, 1, 2, 3, 4 [optional, default 1]
#animation_speed 1

# Mouse cursor in drawer: 0, 1, ..., 76 [optional, default 30]
#cursor 30

# Auto opening of the drawer: 0, 1 [optional, default 0]
#show_on_hover 0

# Auto closing of the drawer: 0, 1 [optional, default 0]
#hide_on_out 0

# drawer's hiding timeout in miliseconds [optional, default 1000]
#hide_timeout 1000

# Runs the dockapp in windowed mode: 0, 1 [optional, default 0]
# Useful for AfterStep, Fvwm, Sawfish or KDE users.
#windowed_mode 0

# Instance name so window manager can distinguish between multiple copies
#instance_name distinguish_name

# Drawer's border size in pixels [optional, default 1]
#border_size 1

# Images directories
[images_paths]
/usr/share/pixmaps
/usr/local/share/pixmaps/

# A first column with 5 buttons
# Each button must be defined with this syntax:
# (tooltip) (image) (command)
#[column]
#(X Terminal) (gnome-term.png) (xterm -bg black -fg wheat)
#(Galeon) (galeon.xpm) (galeon -s)
#(Sylpheed) (sylpheed.png) (sylpheed)
#(XChat) (xchat.png) (xchat)
#(MPlayer) (gnome-multimedia.png) (mplayer)

# A second column with 5 buttons
#[column]
#(Xmms) (gnome-audio2.png) (xmms)
#(Gimp) (gnome-gimp.png) (gimp)
#(GQview) (gqview.png) (gqview)
#(Xcalc) (gnome-calc3.png) (xcalc)
#(GFtp) (gftp.png) (gftp)
The lines I changed are boldfaced. Although it serves a purely cosmetic purpose on my desktop, wmDrawer has many other capabilities. Its documentation can tell you more.

Once you've arranged your slit apps to your satisfaction, right-click on the slit. You may need to try clicking in a few different places before you get the slit menu instead of the menu of a slit app. Select the "save slit list" item. Now the next time you restart Fluxbox, all your favorite dockable applications will be at your fingertips.

EDIT: Okay, it took me over a month to realize I omitted some important info here. In order to have your apps run in the slit when you start a Fluxbox session, you must add them to the ~/.fluxbox/startup script. There are plenty of comments in the default script to guide you.

Saturday, January 14, 2006

Little Debbie

About a week ago, I noticed that the music I have on my second 80GB hard drive doesn't fill even half the space. So I did what any self-respecting geek would do; I installed Debian in the free space. As usual, I had a couple of false starts before I got going.

Debian proved to be challenging to install and configure. This may have been due, in part, to the quirks of my Dell GX270. (Linux has historically had trouble handling the USB controllers in certain Dell machines.)

Initially I installed the 2.4 kernel. But when I discovered I could have chosen the 2.6 kernel instead, I decided to try it. It didn't work so well. Every time it reached a certain point in the boot sequence—presumably the point at which the USB controllers are probed—it would encounter a "control timeout on ep0in". The Xserver wouldn't start. I searched all over the Internet but was unable to find any information on this error. I found more users with the same problem, but no one had a solution. Frustrated, I decided it wasn't worth the trouble. The earlier kernel didn't support a hardware abstraction layer (HAL), but at least it didn't break my Xserver.

Having finally settled on the 2.4 kernel, I realized Debian doesn't have the same set of packages as Ubuntu does. This wasn't a huge surprise per se, but I was annoyed to find that many of the packages I easily installed via Synaptic in Ubuntu 5.10 were nowhere to be found. In particular, the NVIDIA drivers were absent. Luckily Andrew Schulman, a statistician and programmer at the EPA, wrote step-by-step instructions for installing the drivers in Debian. The key point I gleaned from reading them was that the drivers aren't available in the same kind of monolithic package found in the Ubuntu repositories. With Ubuntu, I didn't have to choose between different kernel modules; there was one package called "nvidia-glx" and that was what I installed. Debian has a different package for each kernel (e.g. nvidia-kernel-2.4.27-2-386 for the 2.4 kernel on the Intel 386 architecture) plus the nvidia-kernel-common package. Once I realized that, I had no problem installing the drivers.

Maybe this is just my machine, but sometimes the Xserver doesn't seem to start with the correct display settings. It happened in Ubuntu as well. I hear the sound telling me the login screen has loaded, but I see only a blank screen. When that happens, pressing Ctrl+Alt+Backspace to restart the Xserver usually fixes it.

I should have mentioned this right up front, but installing playback support for proprietary multimedia formats is a pain in the rear in Debian. Either rip all your music in Ogg Vorbis—or FLAC, if you have a small collection or a large hard drive—or get used to the idea of installing a ton of unstable and/or experimental packages from unofficial sources such as Christian Marillat and RareWares. Getting AAC support in XMMS was, by far, the most difficult task. It seems I've almost completely repressed the unpleasant memories. I do recall the necessary plugin being in a package called something like "xmms-aac" or "xmms-faad".

After fussing with the AAC plugin, I didn't feel like doing much else. I downloaded a Debian wallpaper I like better than the default one. Now I'm eyeing a different one, though. But these decisions are hardly momentous.

I'm impressed with Debian, but I don't think I'd give up Ubuntu for it. Ubuntu makes it easier to add the features I want without jumping through a lot of hoops. Even so, I imagine there's a reason so many university CS labs use Debian systems—I just haven't found it yet.

Friday, July 29, 2005

XMMS INXS

Enabling Ogg Vorbis and MP3 Playback in XMMS

I finally overcame my aversion to the unattractive XMMS interface long enough to install it and discover it doesn't work. I can add songs to the playlist, but as soon as I hit play the application stops responding. I opened the Terminal and tried running it from there. It greeted me with an error message.

libmikmod.so.2: cannot open shared object file: No such file or directory

Apparently XMMS couldn't find one of the libraries it needs. I went into Synaptic and searched for "mikmod". I didn't find an exact match, so I decided to consult the Unofficial Ubuntu 5.04 Starter Guide. The guide includes a long list of multimedia codecs in a section appropriately titled, "Q: How to install Multimedia Codecs?" I located the gstreamer0.8-plugins package in Synaptic and installed it. This could also be done in the Terminal.

sudo apt-get install gstreamer0.8-plugins

The error message didn't appear, but XMMS still refuses to play anything. Perhaps it's time to consult Ubuntu Forums. One poster suggests changing the XMMS output plugin. I pared his instructions down to three easy steps.
  1. Options -> Preferences (Ctrl+P)
  2. Audio I/O Plugins
  3. Select a different output plugin from the list.
With gstreamer0.8-plugins and the output plugin set to ESD, I can play Ogg Vorbis and MP3 files. For AAC files, I'll need additional plugins not found in the default repositories. So I must add the necessary repositories.

Adding Repositories

Before I start, I should back up the file I'll be editing.

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
sudo gedit /etc/apt/sources.list


Now I edit the file.

[…]

deb http://us.archive.ubuntu.com/ubuntu hoary universe
deb-src http://us.archive.ubuntu.com/ubuntu hoary universe

deb http://security.ubuntu.com/ubuntu hoary-security main restricted
deb-src http://security.ubuntu.com/ubuntu hoary-security main restricted

deb http://security.ubuntu.com/ubuntu hoary-security universe
deb-src http://security.ubuntu.com/ubuntu hoary-security universe

deb http://archive.ubuntu.com/ubuntu hoary multiverse
deb-src http://archive.ubuntu.com/ubuntu hoary multiverse

## Backports
deb http://ubuntu-backports.mirrormax.net/ hoary-backports main universe multiverse restricted
deb http://ubuntu-backports.mirrormax.net/ hoary-extras main universe multiverse restricted


I save the edited file and update the package lists.

sudo apt-get update

AAC Playback

To play AAC files, I installed the gstreamer0.8-faad package. I used Synaptic again, but if you prefer you can use the Terminal.

sudo apt-get install gstreamer0.8-faad

Ironically, after all the time I spent getting XMMS working, it turns out gstreamer0.8-faad provides an AAC decoder for Rhythmbox but not XMMS. I checked several forums, and they all seemed to indicate that AAC playback in XMMS has yet to be perfected. Oh, well. I'll use Rhythmbox as I originally intended. Now I can listen to music while I fiddle with Ubuntu. I call that a major victory.



Our Next Episode

This weekend Live Gnude Girls will reveal the secrets of Direct Memory Access (DMA) and Advanced Linux Sound Architecture (ALSA). In other words, I'm going to get my CD-RW/DVD running faster than ever and make it possible for multiple applications to play sound at once. I'm looking forward to it.