Disarm Flash Cookies aka LSO’s (Local Shared objects)

Better Privacy is a great plugin for firefox that lets you manage LSO’s.

However, if you do not want your browser to store LSO’s on your local drive in the first place, you can follow the below steps:

$ ls -l ~/.macromedia/Flash_Player/
drwx------ 3 user user 4096 Jul 11 15:41 macromedia.com
drwx------ 3 user user 4096 Jul 11 15:41 #SharedObjects

Change permissions of folder #SharedObjects

$ sudo chown root:root \#SharedObjects/$ ls -l
drwx------ 3 user user 4096 Jul 11 15:41 macromedia.com
drwx------ 3 root root 4096 Jul 11 15:41 #SharedObjects

Congratulations, you have just made the flash player’s LSO folder non writeable for your browser!

/dev/dvd vs /dev/sr0

Today, I encountered an error I haven’t experienced before when wanting to burn a DVD.

$ growisofs -dry-run  -Z /dev/dvd=Image.iso
:-( "/dev/dvd=Image.iso": unexpected errno:No such file or directory

Since I knew the file was existing, something with the dvd device might be wrong. Investigating the problem yields:

$ cdrecord -checkdrive
Device was not specified. Trying to find an appropriate drive...
Detected CD-R drive: /dev/sr0
Device type    : Removable CD-ROM
Version        : 5
Response Format: 2
Capabilities   :
Vendor_info    : 'HL-DT-ST'
Identification : 'DVDRAM GSA-U20N '
Revision       : 'HX12'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
Using generic SCSI-3/mmc DVD-R(W) driver (mmc_mdvd).
Driver flags   : SWABAUDIO BURNFREE
Supported modes: PACKET SAO

Allright, the disk in the drive is indeed recognized. But guess what: Now you have to access it directly via its node at /dev/sr0, not its alias /dev/dvd anymore!

You can simply change the command to

$ growisofs -dry-run -Z /dev/sr0=Image.iso

or automount the drive via /etc/fstab, where you can specify the path to mount, eg. /dev/dvd

Prevent application to be shown in panel/taskbar of openbox

For programs that are running all the time, it is convenient to prevent them from being displayed in the panel.

Fortunately, openbox includes all we need to accomplish this goal in ~/.config/openbox/rc.conf, where you define the desired program in the applications section (at the end of the file).

Among many other options (which are explained in the commented section of rc.conf), you can chose skip_taskbar.

<application name="urxvt">
      <skip_taskbar>yes</skip_taskbar>
</application>

After restarting X, the chosen application will be excluded from the panel.

As an example application, urxvt is shown here (for further info on how to run it transparently in the background of openbox dektop, see here. This option is exceptionally nice for this purpose, since the terminal will be running all the time, so I don’t really need it to show up in the taskbar.)

GLib-Warning & GConf Error when launching emacs

When launching emacs from terminal in my openbox system, I got the following warning message (emacs started all the same):

~$ emacs

(emacs:3073): GLib-WARNING **: In call to g_spawn_sync(), exit status of a child process was requested but SIGCHLD action was set to SIG_IGN and ECHILD was received by waitpid(), so exit status can't be returned. This is a bug in the program calling g_spawn_sync(); either don't request the exit status, or don't set the SIGCHLD action.
GConf Error: Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://projects.gnome.org/gconf/ for information. (Details —  1: Failed to get connection to session: Abnormal program termination when spawning command line `dbus-launch --autolaunch=00ec883e2ef0c03f526815134ab95549 --binary-syntax --close-stderr': )

 

The solution to this problem was the following: I changed the .xinitrc from

#!/bin/sh
xscreensaver -no-splash &amp;
exec ck-launch-session openbox-session

to

#!/bin/sh
xscreensaver -no-splash &amp;
exec dbus-launch --exit-with-session ck-launch-session openbox-session

Specifying to launch dbus turned out to be the solution.
 

 

Managing Themes in Openbox

There are a lot of reasons why I love a pure Archlinux installation with Openbox as my window manager.
However, when it comes to configuring themes and appearance without having an underlying desktop environment, things can get a little messy, especially if you like to tweak them every now and then.
So you definitely want to have a look at a tool that will let you handle this stuff with ease.

Openbox Configuration Manager (Arch package: obconf)

If you are using Openbox, you probably have this installed anyway, since it is the alternative to manually edit the rc.conf for configuring the core Openbox preferences such a window and mouse behaviour, virtual desktops and margins.
Beside the above mentioned features, it includes a Theme tab, whose feature set is limited to just choosing a theme.

LXAppearance 2 (Arch package: lxappearance2-git, AUR)

LXAppearance is a more advanced theme switcher which also manages icons, fonts and toolbars.
Despite its name which suggests otherwise, LXAppearance is not dependent on a specific window manager or desktop environment. That is, it writes the changes directly into .gtkrc. Thus, it is perfectly suited to complement a *BOX window manager.

However, although GNOME and XFCE are also GTK environments, lxappeareance won’t work here. Since both use their own Xsettings daemon, gtkrc is ignored.

If you are using any GTK+ environment besides GNOME or XFCE, then you should have a closer look.

lxappearance2

In its latest incarnation, LXAppearance 2 features Openbox integration (Arch package: lxappearance-obconf-git, AUR).
It might be a bit bold to say it makes obconf obsolete, since it only replicate the first two tabs, Theme and Appearance.

Where to get themes: You can use the GTK, Openbox and Icon themes from http://gnome-look.org, http://xfce-look.org or http://box-look.org

Convert IMG image to ISO on Linux

Unfortunately, IMG images cannot be burnt directly, so we convert them to ISO. There is a nice tool called ccd2iso to accomplish this task.

$ ccd2iso <IMG input file> <ISO output file>

Sometimes the above attempt results in an error message, such as

Unrecognized sector mode (0) at sector 0!

When viewing the img file with VLC or SMPlayer, it seems to be fine, however.

I apply the following ‘trick’: mount the img as virtual drive

$ mount -o loop <img file> <mountpoint>

make an ISO of the directories itself

$ mkisofs --dvd-video -o <iso output file>  <mountpoint>

works like a charm!

Burn video DVD from VOB files

If you start out with a set of VOB files, you need to place them into a folder named VIDEO_TS

Then, you are ready to create an image file (ISO)

$ mkisofs --dvd-video -o <ISO output-file>  <input-root-directory>

whereby   <input-root-directory>  is the path containing the VIDEO_TS directory.

Burning would be the next step

$ growisofs -dvd-compat -overburn -speed=4 -Z /dev/dvd=image.iso

It is advised to make a dry-run before attempting to burn on the actual disk by applying the option  -dry-run

$ growisofs -dry-run -dvd-compat -overburn -speed=4 -Z /dev/dvd=image.iso

If the speed option is omitted, the burner will perform at maximum speed. I usually burn at half maximum to be on the safe side.

Mount CD/DVD Image file as virtual drive

Being able to mount a CD/DVD image file is useful in many circumstances, be it to check an image’s functionality before burning or to install software without having to waste a disk.

Create a mountpoint. I often place it in /tmp for testing purposes.
The mountpoint-directory will be the root directory of your image file.

$ mkdir <mountpoint>

Mount Image file as a loop device

$ sudo mount -o loop <image file>  <mountpoint>

Unmount virtual drive

$ sudo umount  <mountpoint>

Linksys WRT54G: alternative firmware solves power loss issue

For a long time, I wanted to have my electronic devices connected to a power strip with a surge protector attached to it. A central switch at my desk would allow me to cut off all standby power over night. It would also offer overload protection for all connected devices as a welcome side effect.

When actually having installed the above setup, I noticed that every time my Linksys WRT54G v2.2 had experienced a power loss, the mobile devices did connect to the router. However, there was no data traffic getting across the WLAN, which required me to reset the device to factory defaults.

After having installed the Linux based firmware tomato, the problem had disappeared!
Installation is easy as can be, you just flash a firmware file via the regular Linksys interface (which is vastly inferior to tomato’s neat Ajax approach).

Should you ever want to revert to the original firmware, you simply select a Linksys file and upload it.

Transparent terminal in Openbox background

Guide on how to set up a transparent urxvt terminal embedded in an openbox background and prevent it from showing up in the panel/taskbar.

Continue reading