Technology Tales

Adventures & experiences in contemporary technology

Running cron jobs using the www-data system account

22nd December 2018

When you set up your own web server or use a private server (virtual or physical), you will find that web servers run using the www-data account. That means that website files need to be accessible to that system account if not owned by it. The latter is mandatory if you you want WordPress to be able to update itself with needing FTP details.

It also means that you probably need scheduled jobs to be executed using the privileges possess by the www-data account. For instance, I use WP-CLI to automate spam removal and updates to plugins, themes and WordPress itself. Spam removal can be done without the www-data account but the updates need file access and cannot be completed without this. Therefore, I got interested in setting up cron jobs to run under that account and the following command helps to address this:

sudo -u www-data crontab -e

For that to work, your own account needs to be listed in /etc/sudoers or be assigned to the sudo group in /etc/group. If it is either of those, then entering your own password will open the cron file for www-data and it can be edited as for any other account. Closing and saving the session will update cron with the new job details.

In fact, the same approach can be taken for a variety of commands where files only can be access using www-data. This includes copying, pasting and deleting files as well as executing WP-CLI commands. The latter issues a striking message if you run a command using the root account, a pervasive temptation given what it allows. Any alternative to the latter has to be better from a security standpoint.

Online learning

18th April 2021

Recently, I shared my thoughts on learning new computing languages by oneself using books, online research and personal practice. As successful as that can be, there remains a place for getting some actual instruction as well. Maybe that is why so many turn to YouTube, where there is a multitude of video channels offering such possibilities without cost. What I have also discovered is that this is complemented by a host of other providers whose services attract a fee, and there will be a few of those mentioned later in this post. Paying for online courses does mean that you can get the benefit of curation and an added assurance of quality in what appears to be a growing market.

The variation in quality can dog the YouTube approach, and it also can be tricky to find something good, even if the platform does suggest new videos based on what you have been watching. Much of what is found there does take the form of webinars from the likes of the Why R? Foundation, Posit or the NHSR Community. These can be useful, and there are shorter videos from such providers as the Association of Computing Machinery or SAS Users. These do help more if you already have some knowledge about the topic area being discussed, so they may not make the best starting points for someone who is starting from scratch.

Of course, working your way through a good book will help, and it is something that I have been known to do, but supplementing this with one or more video courses really adds to the experience and I have done a few of these on LinkedIn. That part of the professional platform came from the acquisition of Lynda.com and the topic areas range from soft skills like time management through to computing skills courses with R, SAS and Python seeing coverage among the data science portfolio. Even O’Reilly has ventured into the area in an expansion from the book publishing activities for which so many of us know the organisation.

The available online instructor community does not stop at the above since there are others like Degreed, Baeldung, Udacity, Programiz, Udemy, Business Science and Datanovia. Some of these tend towards online education provision that feels more like an online university course and those are numerous as well as you will find through Data Science Central or KDNuggets. Both of these earn income from advertising to pay for featured blog posts and newsletters, while the former also organises regular webinars and was my first port of call when I became curious about the world of data science during the autumn of 2017.

My point of approach into the world of online training has been as a freelance information professional needing to keep up to date with a rapidly changing field. The mix of content that is both free of charge and that which attracts a fee is one that can work. Both kinds do complement each other while possessing their unique advantages and disadvantages. The need to continually expand skills and knowledge never goes away, so it is well worth spending some time working what you are after, since you need to be sure that any training always adds to your own knowledge and skill level.

Automatically enabling your network connection at startup on CentOS 7

15th August 2014

The release of CentOS 7 stoked my curiosity so I gave it a go in a VirtualBox virtual machine. It uses GNOME Shell in classic mode so the feel is not too far removed from that of GNOME 2. One thing to watch though is that it needs at least version 4.3.14 of VirtualBox or the Guest Additions kernel drivers will not compile at all. That might sound surprising when you learn that the kernel version is 3.10.x and that for GNOME Shell is 3.8.4. Much like Debian production releases, more established versions are chosen for the sake of stability and that fits in with the enterprise nature of the intended user base. Even with that more conservative approach, the results still please the eye though attempting to change the desktop background picture managed to freeze the machine. Other than that, most things work fine.

Even so, there are unexpected things to be encountered and one that I spotted was that network connectivity needed to switched on every time the VM was started. The default installation gives rise to this state of affairs and it is a known situation with CentOS from at least version 6 of the distribution and is not so hard to fix once you know what to do.

What you need to do is look for the relevant configuration file in /etc/sysconfig/network-scripts/ and update that. Using the ifconfig command, I found that the name of the network interface. Usually, this is something like eth0 but it wasΒ enp0s3 in my case so I had to look for a file named ifcfg-enp0s3 and edit that. The text that is sought is ONBOOT=no and that needs to become ONBOOT=yes for network connections to start automatically. To do something similar from the command line, CentOS had suggested the following:

sed -i -e ‘s@^ONBOOT=”no@ONBOOT=”yes@’ ifcfg-enp0s3

The above uses sed to do an inline (and case insensitve) edit of the file to change the offending no to a yes, once you have dropped in the /etc/sysconfig/network-scripts/ directory. My edit was done manually with Gedit so that works too. One thing to add is that any file editing needs superuser privileges so switching to root with the su command and using sudo is in order here.

Work locally, update remotely

4th December 2008

Here’s a trick that might have its uses: using a local WordPress instance to update your online blog (yes, there are plenty of applications that promise to edit your online blog but these need file permissions to the likes of xmlrpc.php to be opened up). Along with the right database access credentials and the ability to log in remotely, adding the following two lines to wp-config.php does the trick:

define('WP_SITEURL', 'http://localhost/blog');

define('WP_HOME', 'http://localhost/blog');

These two constants override what is in the database and allow to update the online database from your own PC using WordPress running on a local web server (Apache or otherwise). One thing to remember here is that both online and offline directory structures are similar. For example, if your online WordPress files are in blog in the root of the online web server file system (typically htdocs for Linux), then they need to be contained in the same directory in the root of the offline server too. Otherwise, things could get confusing and perhaps messy. Another thing to consider is that you are modifying your online blog so the usual rules about care and attention apply, particularly with respect to using the same version of WordPress both locally and remotely. This is especially a concern if you, like me, run development versions of WordPress to see if there are any upheavals ahead of us like the overhaul that is coming in with WordPress 2.7.

An alternative use of this same trick is to keep a local copy of your online database in case of any problems while using a local WordPress instance to work with it. I used to have to edit the database backup directly (on my main Ubuntu system), first with GEdit but then using a sed command like the following:

sed -e s/www\.onlinewebsite\.com/localhost/g backup.sql > backup_l.sql

The -e switch uses regular expression substitution that follows it to edit the input with the output being directed to a new file. It’s slicker than the interactive GEdit route but has been made redundant by defining constants for a local WordPress installation as described above.

Using SAS FILENAME statement to extract directory file listings into SAS

30th May 2007

The filename statement’s pipe option allows you to direct the output of operating system commands into SAS for further processing. Usefully, the Windows dir command (with its /s switch) and the UNIX and Linux equivalent ls allow you get a file listing into SAS. For example, here’s how you extract the list of files in your UNIX or Linux home directory into SAS:

filename DIRLIST pipe 'ls ~';
data dirlist;
length filename $200;
infile dirlist length=reclen;
input buffer $varying200. reclen;
run;

Using the ftp option on the filename statement allows you to get a list of the files in a directory on a remote server, even one with a different operating system to that used on the client (PC or server), very useful for cases where cross-platform systems are involved. Here’s some example code:

filename dirlist ftp ' ' ls user='user' host='host' prompt;
data _null_;
length filename $200;
infile dirlist length=reclen;
input buffer $varying200. reclen;
run;

The PROMPT option will cause SAS to ask you for a password and the null string is where you would otherwise specify the name of a file.

More Linux Distributions

21st September 2012

More Linux Distributions

If a certain Richard Stallman had his way, Linux would be called GNU/Linux because he wants GNU to have some of the credit, but we’re lazy creatures and we all call it Linux instead. What still amazes me is the number of Linux distributions that are out there. This list captures those that do not fit into other lists that you can find in the sidebar, so do look at the others as well.

Many fit into the desktop and server computing paradigms while a minority are very distinctive. It is easier to write about the latter than the former, though personal experiences do add to any narrative. It is tempting to think that everything has become static after more than thirty years, yet that may be foolish given the ongoing flux in the world of technology. Only change is ever a constant presence.

More in the Way of Privacy

The controversy about security agencies eavesdropping on internet communications has upset some and here are some distros offering anonymity and privacy. Of course, none of these should be used for unlawful purposes since there are those in less liberal countries who need invisibility to speak their minds.

Qubes OS

It is harder and harder to create a Linux distro that is very different from the rest, but this one uses application virtualisation for added security. You can organise your software into different domains so that you work more securely when moving data between applications from different domains.

Robolinux

There is more than a hint of privacy-mindedness in this distro when you look long enough at what it offers. Cinnamon, MATE and Xfce desktop environments are part of the offer and there is added software for extra privacy and security.

Tails

This is an option for those who are worried about being tracked online. All internet connections are sent via the Tor network and it is run exclusively as a live distro from CD, DVD or USB stick drive too, so no trace is left on any PC. The basis is Debian and the distro’s name is an acronym: The Amnesiac Incognito Live System. For us living in a democratic country, the effort may seem excessive but that changes in other places where folk are not so fortunate. The use of Tor may not be perfect but it should help in combination with the use of different sessions for different tasks and encrypting any files. There even is an option to make the desktop appear like that of Windows XP for extra discreteness of use.

Whonix

Most Linux distros that have enhanced security and anonymity as a feature are not installable on a PC, but that exactly is what’s unique about Whonix. It’s based on Debian but all internet connections go via the Tor network. The latter is called Whonix-Gateway with Whonix-Workstation being what you use to work on your system. It may sound like being overly careful but it has me intrigued.

Entertainment

In many ways, these are appliance distros for anyone who just wants an install-it-and-go approach to things. That works better with dedicated devices than with multipurpose machines, so that is one thing that needs to be kept in mind.

Lakka

The idea behind this offering is what it offers console gamers. Legacy games and peripherals will work and there even is support for Raspberry Pi as well.

LibreELEC

The main purpose of this distro is to offer a home for the KODI entertainment centre on PC and Raspberry Pi devices. It follows from the now defunct OpenELEC project, which ran into trouble when developers’ voices were not given a hearing.

OSMC

The acronym stands for Open-Source Media Centre and there is KODI here too. Though the distro also is based on Debian, one is tempted to wonder why anyone would not just install that and install KODI on top of it. The answer possibly has something got to do with added user-friendliness for those who do not need to deal with such things.

Mandriva Offshoots

Mandrake once was a spin of Red Hat with a more user-friendly focus. In the days before the appearance of Ubuntu, it would have been a choice for those not wanting to overcome obstacles such as a level of hardware support that was much less than what we have today. Later, Mandrake became Mandriva following litigation and the acquisition of Conectiva in 2005. The organisation has declined since those heady days and it became defunct during 2015. Its legacy continues though in the form of two spin-off projects, so all the work of forebears has not been lost.

Mageia

It was the uncertainty surrounding the future of Mandriva that originally caused this project to be started. Beginnings have been promising, so this is a one to watch, though you have to wonder if the now community-based OpenMandriva is stealing some of its limelight.

OpenMandriva

Of the pair that is listed here, it is OpenMandriva which is a continuation of the now-defunct Mandriva. Seeing how things progress for a project with user-friendliness at its heart will be of interest in these days when Debian, Ubuntu and Linux Mint are so pervasive. Even with those, there are KDE options, so there is a challenge in place.

ROSA

Anything Russian may not be everyone’s choice given the state of world affairs at the time of writing, yet this still is an offshoot of Mandriva so it gets a mention in this list. Desktop environment options include KDE, XFCE and LXQt and there are various use cases covered by a range of solutions.

Others

Not every distro falls in the above categories, and some that you find here may surprise you. There are some better-known names like openSUSE that go their way.

EasyOS

Aside from the founder’s dislike of ISO disk images for whatever reason, this distro has its own eccentricities. For example, it is container-friendly, runs in memory as root and much more. This is branded as an experimental distro, and it is that in many ways.

GeckoLinux

This project creates respins of openSUSE for the sake of a more refined experience.Β  For instance, there are live booting ISO images as well as inclusion of media codecs. There is plenty of choice too when it comes to desktop environments.

Gentoo

From what I have seen, this project seems to be supporting the same needs as Arch, albeit with all software needing to be compiled, so there’s more of a DIY approach. The wiki also comes in handy for those users.

KaOS

Billing itself as a lean independent distribution focussing on QT and KDE, this is built from the ground up without any dependence on other distros. Some tools, like pacman, naturally come from elsewhere in this otherwise standalone offering.

MakuluLinux

Here is another distro apart from Ubuntu that has an African name, the Zulu for big chief this time around. It came to my notice among the pages of the now defunct Micro Mart magazine and uses MATE, XFCE, Enlightenment and KDE as its desktop environment choices.

NuTyX

It is very unusual to see a script that adds the feel of one distro to another, yet that is what you find here. Originally, NuTyX was built using Linux From Scratch but it has matured to the point where you also find ISO installation images to go with the unconventional approach described earlier. Otherwise, the choice of desktop environment includes MATE, LXDE, LXQt, Enlightenment, GNOME, KDE5 and XFCE and the distro has its own package manager called CARDS.

openSUSE

SuSE Linux was one of the first Linux distros that I started to explore and I even had it loaded on my home PC as a secondary operating system for quite a while too before my attention went elsewhere. Only for a PC Plus cover-mounted CD, it never might have discovered it and it bested Red Hat, which was as prominent then, as Fedora is today. When SuSE fell into Novell’s hands, it became both openSUSE and SuSE Linux Enterprise Edition. The former is the community and the latter is what Novell, now itself an Attachmate Group company, offers to business customers. As it happens, I continue to keep an eye on openSUSE and even had it on a secondary PC before font resolution deficiencies had me looking elsewhere. While it’s best known for its KDE variant, there is a GNOME one too and it is this that I have been examining.

PCLinuxOS

There was a time when this was being touted as an Ubuntu killer but it never seems to have made good on that promise. Recent troubles within the project haven’t helped either, especially with a long wait between releases.

Pisi

This Turkish distro recently got reviewed in Linux Format and they were not satisfied with its documentation. It does not help that the website is not in English, so you need a translation tool of your choosing for this one.

Solus

Though there also is a spin using the MATE desktop environment, this distro is perhaps better known as the home for the Budgie desktop environment. All of this is for computing and not its business or enterprise counterpart. There is nothing to say against that and may make it feel a little more friendly.

Tizen

The name sounded similar for some reason and I reckon that’s because Samsung has smartphones running Tizen on sale. The whole point of the project is to power mobile computing platforms with only the mention of netbooks sullying an otherwise non-PC target market that includes tablets and TV’s. It’s overseen by the Linux Foundation too.

Limiting Google Drive upload & synchronisation speeds using Trickle

9th October 2021

Having had a mishap that lost me some photos in the early days of my dalliance with digital photography, I have been far more careful since then and that now applies to other files as well. Doing regular backups is a must that you find reiterated by many different authors and the current computing climate makes doing that more vital than it ever was.

So, as well as having various local backups, I also have remote ones in the form of OneDrive, Dropbox and Google Drive. These more correctly are file synchronisation services but disciplined use can make them useful as additional storage facilities in the interests of maintaining added resilience. There also are dedicated backup services that I have seen reviewed in the likes of PC Pro magazine but I have to make use of those.

Insync

Part of my process for dealing with new digital photo files is to back them up to Google Drive and I did that with a Windows client in the early days but then moved to Insync running on Linux Mint. One drawback to the approach is that this hogs the upload bandwidth of an internet connection that has yet to move to fibre from copper cabling. Having fibre connections to a local cabinet helps but a 100 KiB/s upload speed is easily overwhelmed and digital photo file sizes keep increasing. It does not help that I insist on using more flexible raw formats like DNG, CR2 or CR3 either.

Making fewer images could help to cut the load but I still come away from an excursion with many files because I get so besotted with my surroundings. This means that upload sessions take numerous hours and can extend across calendar days. Ultimately, this makes my internet connection far less usable so I want to throttle upload speed much like what is possible in the Transmission BitTorrent client or in the Dropbox client. Unfortunately, this is not available in Insync so I have tried using the trickle command instead and an example is below:

trickle -d 2000 -u 50 insync

Here, the upload speed is limited to 50 KiB/s while the download speed is limited to 2000 KiB/s. In my case, the latter of these hardly matters while the former leaves me with acceptable internet usability. Insync does not work smoothly with this, however, so occasional restarts are needed to keep file uploads progressing and CPU load also is higher. As rough as the user experience feels, uploads can continue in parallel with other work.

gdrive

One other option that I am exploring is the use of the command-line tool gdrive and this appears to work well with trickle. After downloading and installing the tool, getting going is a matter of issuing the following command and following the instructions:

gdrive about

On web servers, I even have the tool backing up things to Google Drive on a scheduled basis. Because of a Google Drive limitation that I have encountered not only with gdrive but also with Insync and Google’s own Windows Google Drive client, synchronisation only can happen with two new folders, one local and the other remote. Handily, gdrive supports the usual bash style commands for working with remote directories so something like the following will create a directory on Google Drive:

gdrive mkdir ttdc [ID for parent folder]

Here, the ID for the parent folder may be omitted but it can be obtained by going to Google Drive online and getting a link location by right-clicking on a folder and choosing the appropriate context menu item. This gets you something like the following and the required identifier is found between the last slash and the first question mark in the address string (so as not to share any real links, I made the address more general below):

https://drive.google.com/drive/folders/[remote folder ID]?usp=sharing

Then, synchronisation uses a command like the following:

gdrive sync upload [local folder or file path] [remote folder ID]

There also is the option to do a one-way upload and this is the form of the command used:

gdrive upload [local folder or file path] -p [remote folder ID]

Because every file or folder object has its own ID on Google Drive, it is possible to create two objects on there that appear to have the same name though that is sure to cause confusion even if you know what is happening. It is possible in each of the above to throttle them using trickle as well:

trickle -d 2000 -u 50 gdrive sync upload [local folder or file path] [remote folder ID]
trickle -d 2000 -u 50 gdrive upload [local folder or file path] -p [remote folder ID]

Handily, this works without the added drama seen with Insync and lends itself to scripting as well so it could be something that I will incorporate into my current workflow. One thing that needs to be watched is file upload failures but there may be ways to catch those and retry them so that would another thing that needs doing. This is built into Insync and it would be a learning opportunity if I was to stick with gdrive instead.

UNIX

21st September 2012

The world of open UNIX variants may not be as vibrant as the Linux one, but UNIX predates Linux by decades so it might be put down to its much greater maturity. BSD seems to predominate here, but the reason may be because of Sun keeping a tight hold on Solaris for so long. Now that Oracle has gone and been more restrictive again, it is the breakaway projects to which we have to look for OpenSolaris successors now. However, the partially free availability of Solaris 10 & 11 may draw some away from the open-source community of the alternative.

BSD

In the world of BSD UNIX, it often is difficult to see what is different between the various projects and some are based on technical excellence using the sort of reasoning that would be inaccessible to many computer users. Though many see the operating system as being one for servers alone, there are PC-focussed versions with PC-BSD being the most notable. The existence of those projects is in start contrast to a mantra that keeps BSD for servers and Linux for desktop systems.

DragonFlyBSD

This was a fork of FreeBSD and it seems to have been done for very technical reasons, such as handling of cluster computing and larger disc drives. If the reasons make sense to you, then it could be an option, but it doesn’t sound like one for the masses, though BSD UNIX hardly is at the best of times.

FreeBSD

UNIX

When someone turns to creating a desktop variant of BSD, FreeBSD seems to be a starting point for so much of the time. Even Debian, itself the foundation of so many Linux distributions, bases its own BSD variant on FreeBSD and Gentoo apparently has been looking at doing something similar. FreeBSD does give away a bias towards servers in that the default installation does not include a desktop environment. However, if you do the work, you can get one like GNOME 2 or XFCE on there and the process does remind me of the thinking behind Arch Linux. Until recently, I had FreeBSD 10 installed in a VirtualBox virtual machine until a software update broke it and that does sit well with the BSD culture of stability. Of course, it could be another sign of a focus on server computing too. Nevertheless, it ran well until then and fared no worse than the aforementioned Arch Linux, though it probably should have done better.

GhostBSD

Apparently, this is FreeBSD with a choice of MATE (a fork of GNOME 2 for those not fancying the idea of using GNOME 3 and its GNOME Shell), XFCE, LXDE or OpenBox desktop environments. A recent look demonstrated that the desktop environments are turned out very nicely too. All in all, it looks like an interesting counterpart to what you would find with a Linux distro.

HardenedBSD

Given the troubled state of the online world because of cybercrime and cyberwarfare, it hardly comes as a surprise that computer security has a higher profile than it ever has. It then is hardly surprising that someone decided to create a more secure spin of FreeBSD. For added context, here is what the project had to say about its goals:

HardenedBSD aims to implement innovative exploit mitigation and security solutions for the FreeBSD community. Security is like an onion--it’s made up of layers. To be successful, attackers must peel back each layer. HardenedBSD takes a holistic approach to security by hardening the system and implementing exploit mitigation technologies. We will work with FreeBSD and any other FreeBSD-based project to include our innovations. Our primary goal is to provide a clean-room reimplementation of the publicly documented parts of the grsecurity patchset for Linux.

MidnightBSD

According to the website, this is a derivative of NetBSD developed with desktop users in mind. At first, it had a feel that would have been more widely available with UNIX and Linux systems in the middle of the 1990’s. Since then, XFCE was chosen as a desktop environment and that has modernised the feel.

NetBSD

Since I last had a look, the focus of this project has become portability. What they mean by portability is have versions of NetBSD that run on all sorts of hardware and I even thought I saw a mention of Sony PlayStation (PS2) if my eyes did not deceive me and ARM-based systems also appeared, hardly a surprise with the rise of tablet computing. Other more conventional computing platforms are served too, but the others make NetBSD stand out from the others more than I once thought it did.

NomadBSD

To some, portability is about running software under different hardware architectures. That is not what is meant here since we are talking about the ability to run an installation off a USB drive plugged in to any computer, more likely with Intel and AMD processors. The underlying basis is FreeBSD with OpenBox being the chosen desktop environment, assuring a friendly user interface as well.

OpenBSD

UNIX

With a strap line like “Only two remote holes in the default install, in a heck of a long time!”, you’d have to suspect that security and stability are the key attributes of this operating system. The security aspect certainly crops up a lot so I think that a spot of exploration is in order, especially when various system types (x86 and SPARC are just two of them) are supported anyway. The ongoing furore about intelligence service monitoring and increasing numbers of attacks on different systems over the web do make the whole subject more relevant now than it ever was and it never was irrelevant.

OPNsense

When m0n0wall was discontinued in 2015, OPNsense was forked from pfSense, a move that has left tension between the two projects. The newcomer gave the following reasons for its actions: code quality, regular releases, security issues related to the web UI being run as root, source code for the pfSense build tools is no longer publicly available, concern regarding transparency, new ownership of the pfSense brand, using the brand name to fence off the competition and several licence changes for no apparent reason. These have been contested by the pfSense while OPNsense now uses HardenedBSD as its basis and has stuck with a frequent release model.

pfSense

This was started in 2004 as a fork of the now defunct m0n0wall with the first public release coming in 2006. It is based on FreeBSD and can be installed on physical or virtual appliances for added network security. It seems to add a BSD installation for a firewall and other security functions, but there clearly is a place for this in the enterprise market by all accounts.

TrueNAS

Network-assisted Storage (NAS) has blossomed in recent years for home users and anyone with a DIY mindset might be tempted to go and build things themselves using PC parts and it is for those that this FreeBSD-based distro would be an asset. When I went looking at the possibility, the inability to boot the installation disk that I was using put paid to the attempt. Then, I was left wondering if my use of AMD’s CPU’s was part of the problem, though I since have realised that building a low-power system might be a better option than reusing a full PC. There has been an incursion into the world of NAS drives in the form of a 3 GB Western Digital My Book Live, so any return to DIY ways could be a better informed.

XigmaNAS

Like TrueNAS, this another BSD for use when making an old PC into a NAS file server. In fact, this came into being when part of the FreeNAS community took exception to the direction in which iXsystems were starting to take it after 2011. It also is based on FreeBSD and has a different web interface. That makes it an alternative if TrueNAS does not do the deed for you.

Solaris

One of the casualties of Oracle’s takeover of Sun Microsystems was the community-based OpenSolaris project. The more proprietary Solaris 11 Express became Oracle’s answer to the need that OpenSolaris fulfilled back then. Since, Solaris 10 & 11 became available without charge with support contracts becoming the revenue earner.

OpenIndiana

The demise of OpenSolaris saw a major new project emerge. Its basis is Illumos, itself a fork of the now defunct OpenSolaris, and a recent look revealed that it is maturing rather nicely. MATE is the chosen desktop environment so it should not be that unfamiliar to those coming from the Linux world. Initially, there is not so much software installed, but Firefox does get included and there is a graphical package manager, so there is little point in complaining.

OmniOS

The enterprise focus of this offering is plain on the website since virtualisation and the storage platform get a strong showing. Discussion of desktop environments and such like are conspicuous by their absence. Seemingly, this is infrastructural software above all else and there are support contracts available too.

Tribblix

The website for this Illumos distro has a retro, so it is easy to believe that the operating system could be similar. Since MATE, XFCE and Enlightenment are the available desktop environments, anyone coming from Linux should be thrown off very much once they figure out how to get things started.

Triton SmartOS

With a moniker like “Converged Container and Virtual Machine Hypervisor”, this clearly is not a desktop computing offering. There is more than a hint of cloud computing about it and that hardly is a surprise given the age in which we work.

Sorting out hogging of the Super (or Windows) Key by GNOME Shell

12th November 2013

Most of the time, GNOME Shell’s use of the Super (or Windows) key on a standard keyboard to open up its dash area is no issue and is a handy counterpart to what you might do in Windows, especially in its latest incarnations. However, it does cause trouble if you are using a VirtualBox virtual machine with Windows installed in there. While VMware Player is immune to this problem I thought that I would see if there was a workaround for it.

The issue might arise from VirtualBox’s non-grabbing of the Super key like others but a solution can be found in GNOME itself. Opening up dconf-editor and navigating to org > gnome > mutter. In there, you will find a setting called overlay-key and this can be changed. One option is to delete the SUPER_L value and leave it that way. My own preference was to set it to a different key and, to do that, I needed to know what the various key identifiers were. To get these, I ran the following command (just replace any quotes with alternatives in the shell before executing this):

xev | grep -A2 --line-buffered ‘^KeyRelease’ | sed -n ‘/keycode /s/^.*keycode \([0-9]*\).* (.*, \(.*\)).*$/\1 \2/p’

This opened up an Event Tester window that will need closing when testing is complete. More importantly, the aliases for any keys that were pressed to are issued to the terminal session so you can see what’s what. Initially, the one for the Alt Gr key appealed to me and I set “ISO_Level3_Shift” as the value of the overlay-key property in dconf-editor. When that didn’t work, I set the value to “Menu” and it behaved as expected. While this will mean that context menus will have to be accessed by right-clicking in a Windows session, that is what I do anyway so there isn’t going to be much of a loss in what I have done. A function key might have been another option but I reckon that the context menu key will do me.

Tidying dynamic URL’s

15th June 2007

A few years back, I came across a very nice article discussing how you would make a dynamic URL more palatable to a search engine and I made good use of its content for my online photo gallery. The premise was that URL’s that look like that below are no help to search engines indexing a website. Though this is received wisdom in some quarters, it doesn’t seem to have done much to stall the rise of WordPress as a blogging platform.

http://www.mywebsite.com/serversidescript.php?id=394

That said, WordPress does offer a friendlier URL display option too and you can see this in use on this blog; they look a little like the example URL that you see below, and the approach is equally valid for both Perl and PHP. I have been using the same approach for the Perl scripts powering my online phone gallery and now want to apply the same thinking to a gallery written in PHP:

http://www.mywebsite.com/serversidescript.pl/id/394

The way that both expressions work is that a web server will chop pieces from a URL until it reaches a physical file. For a query URL, the extra information after the question mark is retained in its QUERY_STRING variable while extraneous directory path information is passed in the variable PATH_INFO. For both Perl and PHP, these are extracted from the entries in an array; for Perl, this array is called is $ENV and $_SERVER is the PHP equivalent. Thus, $ENV{QUERY_STRING} and $_SERVER{‘QUERY_STRING’} traps what comes after the “?” while $ENV{PATH_INFO} and $_SERVER{‘PATH_INFO’} picks up the extra information following the file name (the “/id/394/” in the example). From there on, the usual rules apply regarding cleaning of any input but changing from one to another should be too arduous.

  • All the views that you find expressed on here in postings and articles are mine alone and not those of any organisation with which I have any association, through work or otherwise. As regards editorial policy, whatever appears here is entirely of my own choice and not that of any other person or organisation.

  • Please note that everything you find here is copyrighted material. The content may be available to read without charge and without advertising but it is not to be reproduced without attribution. As it happens, a number of the images are sourced from stock libraries like iStockPhoto so they certainly are not for abstraction.

  • With regards to any comments left on the site, I expect them to be civil in tone of voice and reserve the right to reject any that are either inappropriate or irrelevant. Comment review is subject to automated processing as well as manual inspection but whatever is said is the sole responsibility of the individual contributor.