GNOME session save and restore

A newer version of this script is now available.

This script is used to save and restore a desktop session.

Why this script?

Some desktop managers do offer some session management features. Under GNOME it may be possible to run gnome-session-properties manually and turn on “Automatically remember running applications when logging out”. However, some GNOME . . . → Read More: GNOME session save and restore

Prevent GNOME screensaver during full-screen Flash videos

While movie players (such as VLC) prevent the GNOME screensaver from activating during movie playback, playing Flash videos does not affect the screensaver, which means having to move the mouse occasionally, or turning off the screensaver while watching YouTube videos and the like.

There is no perfect solution to this, but using a script, it . . . → Read More: Prevent GNOME screensaver during full-screen Flash videos

utf8::decode() may actually unset the UTF-8 flag

According to the documentation, the utf8::decode() function should generally set/turn on the UTF-8 flag for a string that contains multi-byte characters. However, apparently, there are circumstances under which utf8::decode() may not only not set the flag, but may actually unset/clear/turn off the flag for a string that contains multi-byte characters.

The following script contains 4 . . . → Read More: utf8::decode() may actually unset the UTF-8 flag

Virtualmin + SFTP + chroot

This guide examines setting up chroot’ed SFTP-only user accounts under Virtualmin.

The Rationale:

SFTP is a secure alternative to FTP and FTPS that uses SSH. With this setup, no FTP server is needed, as the native sshd server is used instead, SSH does not require an SSL certificate (like FTPS), and is usually considered more . . . → Read More: Virtualmin + SFTP + chroot

Perl: Default to UTF-8 encoding

The UTF-8 (Unicode) character encoding system is a well supported alternative to the older ISO-8859-1 (Latin-1) system that can make it easier to work with special characters and multiple languages. Many developers can exercise sufficient control over their system to ensure that:

All Perl source code is encoded in UTF-8 All text input files and . . . → Read More: Perl: Default to UTF-8 encoding

Perl access to local install of the W3C CSS validator

The W3C CSS validator is an online service for checking a stylesheet for standards compliance. This service can be accessed in Perl via the WebService::Validator::CSS::W3C module, which is handy for automating validation. However, for checking a large number of stylesheets, it is better to run a local install of the validator so as not to . . . → Read More: Perl access to local install of the W3C CSS validator

How to have a Logical Argument in Real Life

Many articles discuss the process of logical argument in select situations, presenting logic as an “alternative” method of decision making. This article’s premise is that logic can be used in many more contexts, and ultimately is the only valid method of resolving all arguments in real life. Unfortunately, logic is not used in many cases . . . → Read More: How to have a Logical Argument in Real Life

jQuery Scrolling Anchors

This is a comprehensive jQuery solution to the Scrolling Anchors effect. Typical solutions replace the browser’s native “jump-to” behaviour for local anchors with a smooth scrolling effect, but fail to replace all other functionality related to local anchors. This solution:

Adds the link to the history like the browser does natively Respects event bubbling like . . . → Read More: jQuery Scrolling Anchors

Practical Logic and Decision Making in Real Life

Many articles present logic in decision making as an “alternative” to the way decision making is typically done. This article’s premise is that upon reflection, logic is everyone’s preferred method of decision making – even illogical arguments use logically sounding statements to appear more valid. Unfortunately, many of us do not use logic consistently for . . . → Read More: Practical Logic and Decision Making in Real Life

Linux memory leak detection

Tracking down the source of a memory leak in Linux is not always straightforward…

Signs of a Memory Leak:

Typically, the first sign of a memory leak is the oom-killer. If programs start dying inexplicably, check the system log (usually /var/log/messages) for evidence of the oom-killer in action. This should be accompanied by low memory . . . → Read More: Linux memory leak detection