Fireface UCX on Slackware

RME has added a Class-Compliant mode to its powerful audio/MIDI interface Fireface UCX. The class compliant mode (CC mode) allows the device to work natively under all operating systems including Linux. Despite the fact that historically, RME offered good Linux support (Hammerfall DSP series of cards), let us not be fooled when it comes to RME’s intentions. The CC mode was not introduced with Linux users in mind. Its primary purpose was to ensure that it plays nicely with iPads. The Linux support is more of a by-product of the USB class compliance mode.

Now although the Fireface UCX is perfectly usable and still very powerful in the CC mode, it does not come close to what the device has to offer with the proprietary RME drivers available on Windows or Mac. One of the biggest things missing in the CC mode is TotalMix, a mixer providing a comprehensive set of effects and a limitless routing capabilities (image below):

Totalmix_UCX

On Linux, by contrast, the device mixer boasts as many as one channel to adjust, namely “Speaker Volume”. Sad.

Being in the CC mode, the device is recognised in Slackware 14.1 out of the box:

[    6.315774] usb 1-3: new high-speed USB device number 2 using xhci_hcd
[    6.327198] usb 1-3: New USB device found, idVendor=0424, idProduct=3fb9
[    6.327303] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    6.327405] usb 1-3: Product: Fireface UCX (23673729)
[    6.327504] usb 1-3: Manufacturer: RME
[    6.327600] usb 1-3: SerialNumber: xxxxxxxxxxxxxxxxx
cat /proc/asound/cards
 0 [PCH            ]: HDA-Intel - HDA Intel PCH
                      HDA Intel PCH at 0xf7a30000 irq 47
 1 [MID            ]: HDA-Intel - HDA Intel MID
                      HDA Intel MID at 0xf7a34000 irq 46
 2 [UCX23673729    ]: USB-Audio - Fireface UCX (23673729)
                      RME Fireface UCX (23673729) at usb-0000:00:14.0-3, high speed

To conclude, it is indeed great that this powerful device works under Linux. It’s a pity that its capabilities in the CC mode are somewhat limited.

Installing i3 wm 4.2 on Slackware

Update: I’ve taken over the maintenance of i3 and i3status on SlackBuilds.org so the scripts there have been updated and ready for you to use.

Everybody knows that tiling window managers are the cure to all the world’s problems. Not everybody knows, though, that i3 windows manager offers much more than that. It additionally offers a highly customisable working environment that lets you effectively do your work without any distractions. Both happiness and a productive working environment are just a few keystrokes away. Follow the next few paragraphs to reach the state of programming nirvana.

As SlackBuilds.org still offers version 3.x of i3 window manager, I decided to write a SlackBuild for version 4.2. Despite the fact that there are some fundamental configuration differences between versions 3.x and 4.x, the installation processes are almost identical. For that reason I decided to adapt the official i3 slackbuild to work with 4.2 (the latest stable release as of the moment of writing.)

i3wm Installation Process

The installation process is pretty straightforward. First of all, you need to install necessary dependencies: libev, yajl and dmenu (all of them available on slackbuilds.org). There are also optional dependencies that will greatly improve i3’s functionality (I’ll cover them in a separate section as they can be installed later.)

Having installed the required dependencies, you can either download my updated installation scripts and i3 source code or a precompiled binary package (x86_64 only):

Update: Please do not use the scripts below. They are only here for archival reasons. Please visit the SlackBuilds website for the latest versions of the scripts.
i3-4.2 source
i3 slackbuild
i3 package (64-bit)

Optional dependencies (highly recommended – especially i3status)

Optional dependencies include i3lock (a screen locker) and i3status (a status bar generator.)

i3lock

As far as i3lock is concerned, I didn’t bother even trying to install it as it requires PAM which is not included in Slackware. Instead I use slock (available from slackbuilds). The usage of slock is amazingly simple: run it (through dmenu, terminal or previously assigned keybindings) to lock the screen, and type your password to unlock it (if you mistype your password, press Esc to clear it and type the password again.)

i3status

i3status is a status bar generator which will help you display all sorts of information. You could stick to version 2.1 which is available from slackbuilds.org.
In that case you might need to set the option: output_format = none. Otherwise I’d recommend installing i3status 2.5.1. Regardless of the version you choose, you need to install ‘confuse’ (available from slackbuilds.org). Please note that you don’t have to install dzen2 with the latest versions of i3/i3status. If you decide to install v. 2.5.1, you can use my slackbuild scripts or a precompiled package (64-bit only):

Update: Please do not use the scripts below. They are only here for archival reasons. Please visit the SlackBuilds website for the latest versions of the scripts.
i3status source
i3status slackbuild
i3status slackware package (64-bit)

Once you’ve installed all the packages, you can set up the default X environment by issuing xwconfig as a standard user and run startx. If no previous i3 configuration is present, you’ll go through a short configuration wizard. You can accept the default settings. They are reasonable and a great starting point for your customisations. The project website offers great documentation (link), as well as a recently opened stackexchange-like FAQ section.

You should see a status bar at the bottom of the screen. To start your modifications, copy /etc/i3status.conf to ~/.i3status.conf where you can place your changes.

Slackware website update

Good news. It seems that the Slackware website saga has come to a happy ending. According to the -current changelogs, the old code has been updated:

Sat Jun 2 01:03:42 UTC 2012
As you’ve possibly noticed by now, slackware.com is back on the air, and
I’d like to take this opportunity to give a hearty thanks to Mark Post of
Slack/390 fame for updating the PHP code to make it happen! Eric Hameleers
and the rest of the crew also pitched in to help get it installed and
running on our other server. Thanks as well to all the folks who emailed
with offers of hardware, help porting, and other support for the site.
We really appreciated it. Viva la vie Slackware!

I welcome this news with relief. Despite the fact that for some time it has been clear that the problems only affect the website and the project itself is in no danger, the whole situation unnecessarily sidetracked users’ attention from what should matter most, ie. the distro itself. Hopefully, from now on we’ll be able to focus entirely on the development of the current branch. If you look at the changelogs, recently there have been quite a few udates.

Today’s bunch of updates brings a new little tool called iftop which, according to its website, is a network equivalent of the top command.

iftop does for network usage what top(1) does for CPU usage. It listens to network traffic on a named interface and displays a table of current bandwidth usage by pairs of hosts. Handy for answering the question “why is our ADSL link so slow?”.

It looks like a handy tool to use with the conky output.

Brother HL 2270DW on Slackware – updated

Update: Instead of installing the packages mentioned below, you could use a .ppd file. This makes the installation quicker and removes the need to setup a mulitilib system. Although the file refers to model 2170, it works fine with 2270DW.

I have recently purchased Brother HL-2270DW monochrome laser printer. It works fine both through USB and wirelessly. It can also supports duplex printing (printing on both sides of a page).
Although the Linux drivers are available for download, they only ship as .deb or .rpm packages. That’s not a big problem as I used the deb2tgz tool to convert it to a more Slackware-friendly wrapper. Despite the fact that Slackware ships with the rpm2t?z tool, I had more luck with deb2tgz. Please note that one of the requirements for the driver to work on Slackware64 is multilib support.

1. First you need to start CUPS on your system:

# chmod +x /etc/rc.d/rc.cups
# /etc/rc.d/rc.cups start

Connect the printer via a USB cable.

2. Download the drivers from the following place (both .deb packages).
3. Convert them to .tgz

deb2tgz hl2270dwlpr-2.1.0-1.i386.deb
deb2tgz cupswrapperHL2270DW-2.0.4-2.i386.deb

4. Install the packages:

# installpkg hl2270dwlpr-2.1.0-1.i386.tgz
# installpkg cupswrapperHL2270DW-2.0.4-2.i386.tgz

5. Check if the printer has been recognised by accessing http://localhost:631/printers and you can print the test page to see if it works.
6. If you want to access it wirelessly, you need to visit http://localhost:631 and then follow the steps below:
Adding Printers and Classes
Add Printer (You’ll be asked for root’s password)
Other Network Printers: LPD/LPR Host or Printer
Connection: lpd://your_printers_IP_address/binary_p1 (You could find out the printer’s IP address with nmap)
Add the name and description you your choice
Choose Make: Brother
Choose Model: HL2270DW for Cups

You should be ready to go. There’s only one slight problem. For some reason, the drivers don’t work properly with some applications. Certain applications spit out countless pages of some code. I’ve tested it on two computers and these are my findings:
Applications/tools that print flawlessly:
Emacs / Firefox / Thunderbird / Okular / Epdfview / lpr / SoftMaker Office
Applications that print some “gibberish”:
Evince / Libre Office

Libre Office is not an issue for me as I have been using SoftMaker Office anyway, but PDF document printing is somewhat problematic as I’m not a big fan of KDE and its applications (Okular) and I can’t seem to find a duplex option in Epdfview.

Awesome 3.4.8 on Slackware

Update April 2012: It has been brought to my attention (Thanks to wildwizard and idnotcrae from LQ) that due to the split of xcb-util into the base package and xcb-util-wm as of version 0.3.8, the tutorial below does NOT work for Awesome 3.4.11. Unfortunately, upgrading the stock xcb-utils on 13.37 breaks a few things and as I no longer run AwesomeWM, I am afraid I am not going to update this tutorial. If someone would like to run Awesome 3.4.11 on Slackware 13.37, please have a look at this thread.

[This tutorial has been tested on Slackware64 13.1, Slackware64 13.37 and Slackware64-current as of 20/06/2011]

Ever since I started using the i3 window manager, I’ve really become a fan of tiling WMs. They are quick, efficient and make good use of your screen space. Having used i3 for a few months, I decided to give AwesomeWM a try. I followed the steps from this guide. What turned out was that things have changed since the publication of the above mentioned guide and now it’s much easier to install Awesome 3.x on Slackware64 13.1 (and -current).

First of all you need to grab the cairo’s slackbuild and source from Slackware’s source/l and recompile it with xcb. In order to achieve it you need to edit cairo.Slackbuild and add the line in bold:

CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--mandir=/usr/man \
--sysconfdir=/etc \
--disable-gtk-doc \
--disable-glitz \
--disable-quartz \
--disable-static \
--enable-xcb \
--disable-win32

Dependencies:

Afterwards, you need to install all the dependencies needed by AwesomeWM: lua, imlib2, libev. They are available from www.slackbuilds.org. Finally, you can grab the source of libxdg form here and create a Slack package. You can either do it manually, or use src2pkg. Once a libxdg package is created in /tmp, you can install it with the following command:

# installpkg /tmp/libxdg-basedir*.tgz

Awesome

The only thing that’s left is to grab the latest Awesome source, build a package and install it on the system.  There’s, however, one thing you might want to change. The default Awesome source code installs config files to /usr/etc which is against Slackware’s standard filesystem policy.  Normally all the config files in Slackware go to /etc.  We need to make some slight modifications of the code:

1. Untar the source:

tar xvjf  awesome-3.4.8.tar.bz2
cd awesome-3.4.8

2. Open awesomeConfig.cmake with you favourite editor

3. Change the following:

if(DEFINED SYSCONFDIR)
set(SYSCONFDIR ${SYSCONFDIR} CACHE PATH "config directory")
else()
set(SYSCONFDIR ${PREFIX}/etc CACHE PATH "config directory")
endif()

To

if(DEFINED SYSCONFDIR)
set(SYSCONFDIR /etc CACHE PATH "config directory")
else()
set(SYSCONFDIR /etc CACHE PATH "config directory")
endif()

4. Run ‘make’
5. As root:

mkdir /tmp/awesome-3.4.8
make install DESTDIR=/tmp/awesome-3.4.8
cd /tmp/awesome-3.4.8
makepkg -l y -c n /tmp/awesome-3.4.8.tgz
installpkg /tmp/awesome-3.4.8.tgz

The Awesome Window Manager is now installed on your system.
This is an example of Awesome’s xinitrc (taken from the Awesome Slackbuild for 13.0). To add it to xwconfig you need to create xinitrc.awesome and copy it to /etc/X11/xinit/

#!/bin/sh
# $Xorg: xinitrc.cpp,v 1.3 2000/08/17 19:54:30 cpqbld Exp $

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then
    /usr/bin/xrdb -merge $sysresources
fi

if [ -f $sysmodmap ]; then
    /usr/bin/xmodmap $sysmodmap
fi

if [ -f $userresources ]; then
    /usr/bin/xrdb -merge $userresources
fi

if [ -f $usermodmap ]; then
    /usr/bin/xmodmap $usermodmap
fi

exec awesome

That’s it! You can start the Awesome Window Manager.

I shall discuss its configuration in a separate post.

have fun.

Spring cleaning of your Slackware system

Sometimes you can find yourself in a situation where you are suddenly faced with a message telling you that there’s no more free space on your system. There might be a few things you can do to free some of it.

The first reason for that can be /tmp which doesn’t get cleaned automatically. I create my temporary files in my home directory so I can safely delete the contents of /tmp every time I shut down the system. You don’t have to do it manually, though. The following command should be placed in /etc/rc.d/rc.local_shutdown

/usr/bin/find /tmp -mindepth 1 -maxdepth 1 -print0 | xargs -0r /bin/rm -rf

As this file doesn’t exist on the default installation of Slackware, you need to create it first and give it execution permission:

# chmod +x /etc/rc.d/rc.local_shutdown

This will delete ALL the files in the /tmp directory every time the system shuts down, so be careful what you put there! Generally, the rc.local_shutdown file might also be useful in other ways. If you need to perform any other tasks on shutdown, you can put them in the file. Remember to test your commands well before you include them in the shutdown file.

The /tmp directory can also be mounted on a separate partition,  which makes it easy to limit the size of the temporary files directory.

If you have been using sbopkg (an excellent Slackbuilds browser) for a long time, it might also have kept a lot of source files.  First you can check (and optionally delete) if there are any obsolete cached sources:

# sbopkg -o
[ Checking for obsolete sources ]
This may take a few moments. Press <ESC> to abort.
100%[====================================================]
It appears there are no obsolete sources in /var/cache/sbopkg.

As most people do not need the sources of packages installed via sbopkg, you may also want to clean  the whole sbopkg cache. You can do it in sbopkg’s utility menu.

It’s also good practice to find directories/files that take up most space. The following command will display 20 largest files/directories  in a specified place:

du -a /home/user/ | sort -n -r | head -n 20

You can go through the list and decide which things you want to delete.

Update: A quicker way may be using ncdu.

Another way of freeing some space is by uninstalling the apps that you no longer need. If you don’t know what you are doing, it is NOT recommended to uninstall anything from the Slackware’s default installation. You might  break some parts of  the system . A safer approach would be  uninstalling programs that you have manually installed either through sbopkg or any other way. You can browse programs installed via sbopkg using one of its menu items.
You can also remove packages using pkgtool. In order for pkgtool to be able to manage your package, it shouldn’t be compiled using the traditional ./configure ; make ; make install method. You can either create your own slackbuild which will compile, package and install your application, or let the excellent src2pkg tool do it for you.

Happy cleaning

Mouse woes after the last batch of upgrades

I have installed the huge batch of updates that Pat gave us for -current.  One of the major changes were the switch from HAL to udev of a new shiny X system.

The only problem I had after restarting X was that my USB mouse pointer seemed to have acquired a mind of its own. Following AlienBOB’s advice on new ways

of configuring X I extracted the relevant portion of my old xorg.conf dealing with the input device and saved it in a separate file in /etc/X11/xorg.conf.d/10-usbmouse.conf.

Works like a charm:)

Hello world!

Hello world!

Starting with anything else would be highly inappropriate.

Are we there yet? Today we’ve been given another shot of updates to the -current branch of Slackware. Thank you for that. Looking at the state of things I’m inclined to believe that 13.1 might still be released this month, which would be great.