Enable Memcache for Owncloud 8.2 on Ubuntu 14.04

Supposedly you can improve Owncloud performance by adding a memory caching module into your web server software (Apache). Or at least the Owncloud admin page says so, and complains if you don’t have one.

If you are running Owncloud 8.2 on Ubuntu 14.04, you likely have PHP version 5.5. Owncloud recommends “APCu” caching software version 4.0.6 or higher, but the version in the Ubuntu 14.04 repositories is too old (4.0.2).

This is a known issue with workaround instructions to install a newer version using dpkg. I found version 4.0.7 in the Ubuntu repositories and installed it using the instructions on the issue page. It eliminated the Owncloud admin warning.

XMMS now Audacious

I’ve always liked XMMS as a music player program on Linux. It had enough features, but the basic interface was always simple enough to just work. Unfortunately, it is not maintained any longer, and in my latest Ubuntu upgrade to version 8.10, I found it was no longer included or supported.

The XMMS project continued with a successor, XMMS2, but it is much more than just a simple audio player. I looked at it and got lost fairly quickly. I just wanted something simple like the original XMMS.

Thanks to the open source model, I fortunately found what I was looking for: Audacious. It is an off-shoot of the original XMMS, which maintains the same overall operation and feel, but is continuing to be maintained and updated for current Linux releases like Ubuntu 8.10. I installed it and within a minute I was happily playing music with my familiar controls and playlist.

So if you miss XMMS, give Audacious a try.

Submitted by amillar on Tue, 2009-03-17 15:24

ThinStation

I have been using LTSP for a while to turn old PCs into X terminals. LTSP works well for a desktop PC that can use PXE or Etherboot. LTSP does not work as cleanly on old laptops with PCMCIA network cards. In these cases, the kernel has to be installed on the laptop hard disk, but the rest of the LTSP installation runs from the server. When upgrading LTSP, the kernel on the hard disk gets out of sync with the modules on the server, and the laptops stop working as terminals.

I’ve been looking for a simpler setup for a laptop X terminal, and I’ve found ThinStation. It is a customizable Linux distribution designed for building terminals. The entire terminal image can run locally, from the hard drive or a bootable CD. The typical image takes up 5 to 10 megabytes. In this way, the server software can change versions, but the terminal is still standalone for its software versions. Thinstation does support centralized configuration files, giving you centralized control of options without linked dependencies.

Thinstation comes with software for several terminal types, including X Windows, VNC, NX, and Windows RDP.

Sound on Thinkpad T41 with Fedora Core 4

I have Linux running on an IBM ThinkPad T41 laptop. I recently upgrade from Fedora Core 1 to Fedora Core 4. Several things broke from upgrading, including sound.

A number of people have had sound problems with FC4, requiring various solutions such as disabling the soft modem.

Some people had problems where their mixer settings were muted. Mine was similar. I am familiar with the Linux OSS sound system used in kernel 2.4, but I am unfamiliar with the ALSA sound system used in kernel 2.6.

I verified that my sound hardware was detected, using various utilities like system-config-soundcard, lspci, and lsmod. Under KDE, I used kmix to set the volume and unmute the sound channels. The artscontrol display showed me that all of the software believed it was pumping sound to the soundcard when playing a song in xmms. It was starting to look to me like my hardware and sound module setting were good, but I was somehow muted.

I discovered that in addition to volume levels and mute settings for input and output in the sound mixer, ALSA also has some additional on/off switch settings. I do not recall seeing these with the earlier OSS sound drivers. In the case of this T41 laptop, I found a mixer switch called “Headphone Jack Sense”. Turning this off gave me working sound immediately.

USB Flash Reader on Linux Fedora Core 1

With digital cameras so popular, the USB multi-format card readers are readily available, inexpensive, and supported on Linux.

The memory cards in the reader show up as SCSI disk devices. The digital camera manufacturers have standardized on the MSDOS FAT filesystem, so you can just read and write to the memory card through the reader as if it were a disk drive.

Many USB card readers show up in Linux as a multi-LUN SCSI device. This means that only the first slot is seen by default. You may see the compact-flash slot but not the SmartMedia or MMC slot. To fix this, your Linux kernel needs to scan for the extra LUNs.

For Fedora Core 1, I added the following line to /etc/modules.conf:

options scsi_mod max_scsi_luns=6

as mentioned on the Fedora mailing list. More information is on the Linux flash readers page, or using a USB card reader in Linux.

You can also recompile your kernel with the option “CONFIG_SCSI_MULTI_LUN=y” enabled, or you can add a “max_scsi_luns=6” option at boot time in Grub.

 

Submitted by amillar on Sat, 2005-01-22 23:48

Recording FM Radio

A good audio source is of course your local radio stations. Sometimes, however, I want to listen to shows at a time other than when they are broadcast.

Using an FM radio tuner on the computer, you can capture the audio from the radio signal and save it to a sound file, such as MP3.

I’m using the DLink DSB-R100 tuner. It is a small FM radio which connects to the PC using USB for the tuning commands and the sound card’s line-in connector for the audio.

The DSB-R100 has a driver already included in the Linux 2.4 kernel, using the V4L video-for-Linux system.

I’m using the fmtools software for Linux to select stations, with my own recording script. I created a script combining sox to record and lame to encode to MP3.

Since FM radio is limited in bandwidth to 15Khz, the compression can be improved a little by having the sound software do some filtering to match. This is the –lowpass option in lame.

Links:

  1. Linux radio timeshift how-to by Todd Veldhuizen. My script is similar in structure to the example provided by him.
  2. Gary Burd’s fmcapture with software.
  3. Linux Gazette article

Submitted by amillar on Tue, 2004-10-19 15:41

Limiting web browsing on LTSP terminals

Running Linux
cover
Amazon | Powells
IndieBound

With LTSP, all applications run on the server. This is great for the low maintenance involved: install an application program once, and it is available immediately on all terminals.

However, some times you may want to discriminate between different terminals. For example, you may want to restrict web browsing at one terminal or another.

Because the browsers run on the server, all outgoing HTTP connections come from the same machine. This means you cannot just restrict by IP address. You need a finer grain of control, by X display.

There is no easy perfect solution for this problem. The best solution would be to have two different terminal servers, and have the two classes of terminals connect to the appropriate server.

I’ll describe my hack attempt to solve this problem. My approach was to set browser proxy settings based on the X display.

First, you must decide how you want to limit the browser. In my case, I created two browser proxy configure scripts, which are usable by Netscape, Mozilla, Opera, and Internet Explorer browsers.

Script for allowing internet access: “proxy.pac”

function FindProxyForURL(url, host) { if (isPlainHostName(host)

Printing Greeting Cards in Linux


Linux in a Nutshell
cover
Amazon | Powells
IndieBound

Many people are familiar with the “print your own greeting card” idea. You print four small page images on a single sheet of paper and fold it in half twice. You get a little greeting card with a custom cover and interior, all from one single-sided piece of paper.

I wanted to do this from a Linux application, without needing Windows or MacOS. Preferably, I could use any application to produce 4 pages, and have some magic transform it into the single page with all parts reduced and oriented properly for folding.

After a little googling, I was able to find this list archive message by Ronan Heffernan describing exactly what I wanted. His “make_card” script takes a postscript file and does the appropriate transformation:

#!/bin/shcat $1 | pstops -pletter -b “4:3U@.5(1w,1h)+0U@.5(.5w,1h)+1@.5(0,0)+2@.5(.5w,0)” > $2

This works well, but I wanted something that my family could use from
Linux apps without the command line.

My favorite print spool tool in Linux is KPrinter from KDE 3.0. It can be used with any X Window application, not just KDE apps. It is perfect for the generic X apps like
Mozilla and Acrobat Reader. Instead of sending print output to the command lpr, send it to the command kprinter (or kprinter –stdin if it pipes it).

The method I found is to create a “prefilter” for KPrinter. This
allows you to select greeting card formatting for any print job to
any printer.

Create the following files:

/usr/share/apps/kdeprint/filters/Greeting-card-4-up.desktop

[KDE Print Filter Entry]Comment=Greeting card- 4 pages on double-folded US letterMimeTypeIn=application/postscriptMimeTypeOut=application/postscriptRequire=exec:/ps2ps

/usr/share/apps/kdeprint/filters/Greeting-card-4-up.xml

<!DOCTYPE kprintfilter><kprintfilter name=”Greeting-card-4-up” ><filtercommand data=”pstops -pletter -b ‘4:3U@.5(1w,1h)+0U@.5(.5w,1h)+1@.5(0,0)+2@.5(.5w,0)’ %filterinput %filteroutput” /> <filterinput><filterarg format=”%in” name=”file” /> <filterarg format=”” name=”pipe” /> </filterinput> <filteroutput><filterarg format=”> %out” name=”file” /> <filterarg format=”” name=”pipe” /></filteroutput></kprintfilter>

I found that the KDE prefilters were not terribly well documented, but I
was able to muddle through it. To create one, run KPrinter and select
“System Options”. In the print configuration dialog box, select “Commands”.
This will allow you to create a new filter. You simply need to compare the
entries to other existing print filters.

When your new filter is created, it will be in your personal directory, such as

$HOME/.kde/share/apps/kdeprint/filters/

Move it to your system-wide print filter directory, which might be

/usr/share/apps/kdeprint/filters/

or something similar.

I could not get the paper size to work automatically using the poorly-documented
paper size substitution variable, so I had to hard-code the US Letter paper
size. If anyone knows how to fix this, let me know.

Submitted by amillar on Sat, 2004-02-07 13:35

Printing from Open Office through KPrinter


RedHat Linux 9 Bible
cover
Amazon | Powells
IndieBound

To print from Open Office through KPrinter, set up a printer in Open Office for it.

Run spadmin as root. On RedHat 8.0 it is at

/usr/lib/openoffice/spadmin

Add a new printer of type “Generic Printer”. This means simple Postscript output. For the command line specify

kprinter –stdin

Name your printer entry “KPrinter” or something recognizable to you.

Now when you print from Open Office, you can select this printer and be able to make use of KDE features such as the prefilters.

Submitted by amillar on Sat, 2004-02-07 13:35