Monday, August 04, 2014

Configuring a Headless Transmission Torrent Server for Mageia4

This will describe how to install and configure the Transmission torrent application on Mageia 4 in a headless configuration, how to make it automatically download torrents by placing a .torrent file in a particular directory and admin the client remotely using both a cli (command line interface) and a GUI (graphical user interface) application.

Transmission has both a Homepage,  a Wiki and a Forum, so there's no lack of help and support. But as for installing it as a headless server on Mageia, all we found were HOWTOs for Debian/Ubuntu systems.

We're assuming that you have Mageia4 installed and have configured your user to use the sudo command.

Begin by installing the transmission daemon and the command-line client.

$ sudo urpmi transmission-daemon transmission-cli

This installs  transmission-daemon, transmission-cli and transmission-common (which is mostly the documentation). All the binaries will be found in /usr/bin. The transmission package also installs a Java-based web client at /usr/share/transmission/web/index.html.

For transmission-daemon, all settings are kept in $HOME/.config/transmission-daemon. We want to create a user named "transmission". Other distros make the "home" directory something like /usr/share/transmission or /var/lib/transmission; it can really be anything you want. For us, creating /home/transmission has a special benefit.

$ sudo adduser transmission
$ sudo passwd transmission

Having a password allows us to use scp to remotely send a .torrent file to /home/transmission/ on our remote server and the torrent will automatically start when we have properly configured the transmission-daemon to do so.

There is an Debian/ubuntu-specific init.d script available from the Transmission site, but it won't work for RedHat-derived distros like Mageia.

We can download an init.d script useful for RHEL and Fedora (and Mageia) written by Jason Friedlan. It's located at his website; you'll need to copy and paste it into a text editor.

We'll need to make some changes for Mageia:

- TRANSMISSION_HOME=/var/lib/transmission
+ TRANSMISSION_HOME=/home/transmission

Save the script as transmission-daemon, change the ownership to root and make it executable, then move it it /etc/init.d.

$ sudo chown root:root transmission-daemon
$ sudo chmod +x transmission-daemon
$ sudo mv transmission-daemon /etc/init.d/

To verify that our script is valid for init.d invoke:

$ sduo chkconfig --add transmission-daemon

Now set the runlevels for transmission-daemon with:

$ sudo chkconfig --level 345 transmission-daemon on

and verify it with:

$ sudo chkconfig --list transmission-daemon

Now that our service is configured, let's start and stop the daemon to make certain it works.

$ sudo service transmission-daemon start
$ sudo service transmission-daemon stop

Then invoke:

$ sudo ls -al /home/transmission

This will reveal that the .config directory has been created and we will find that /home/transmission/.config/transmission/settings.json has also been created.

The editable text file settings.json contains the default configuration for our daemon. It can be edited with a text editor and an explanation of the various options can be found at the Transmission Wiki.

Some suggested changes are (the trailing commas are important!):

Add a blocklist:
- "blocklist-url": "",
+ "blocklist-url": "",

Allow all users on the network to access the web interface:
- "rpc-whitelist": "",.
- "rpc-whitelist-enabled": true,.

+ "rpc-whitelist": "*.*.*.*",
+ "rpc-whitelist-enabled": false,

Save the file and restart the service.

Setting a username and password to stop all users but us is important, but this must be done with the transmission-remote command because the password is hashed for security and not stored as plain-text.
$ su - transmission
$ transmission-remote --auth username:password

You can use transmission-remote to change any of the settings; look at the man page for details or at the Wiki page.

You'll need to set the home directory to auto-download any torrents. First, we'll need to enable it, then set the directory. As shown here, we'll do it on one line each:
$ su - transmission -c transmission-remote --watch-dir-enabled true
$ su - transmission -c transmission-remote --watch-dir /home/transmission

And, we'll have it keep downloaded torrents in /home/transmission/Downloads.
$ su - transmission  -c transmission-remote download-dir /home/transmission/Downloads

If you don't change a setting, transmission will use the default setting. You can see the default setting by examining the settings.json file or looking at the Wiki page referenced just above.

If you are GUI-centric and command-line-phobic, install the GTK or QT clients and as the user "transmission" use the transmission client GUI to change the settings. That's pretty easy.

 $sudo service transmission-daemon start

  And you are ready to use it.


Instead of clicking on a torrent link, save the link instead and move it to the torrent user.

$sudo mv *.torrent /home/torrent/

Now the download starts automatically! You can even do this from a remote computer, so if your server is at home and you are at work, just copy the .torrent file over the Internet and the download will be done by the time you get home.

To admin your Transmission server, there's the provided Java web client, or a stand-alone application called

As always, I'd appreciate any feedback, especially if I made any errors in this.

Tuesday, May 27, 2014

Keep Updating Windows XP until 2019

Microsoft ended support for Windows XP on April 8th of 2014. But they will continue to support their Point Of Sale version, Windows Embedded POSReady 2009, for five more years.

To receive these updates for your Windows XP computer, you need to alter a registry entry to fool the Microsoft Update server into thinking that you are using Windows Embedded POSReady 2009.

Here is a .reg file that looks like this if you view it in a text editor:


Download and double-click on the file file, then just run Windows Update.

Not all the available updates are useful for you; Don't select the updates for Windows Server 2003.

If you have a 64-bit Windows XP installation, look here.

Saturday, February 08, 2014

The first release of Mageia 4 is out.

The first release of Mageia 4 is out. You can download it from here and read the release notes here.

If you've used Mandriva Linux, you'll feel right at home with Mageia. Mageia has quickly established a reputation of working well for both the novice user and the power user. Installation is typically easy and hardware support is among the best of any distro. The user and administrative tools are comprehensive and easy to use. Of course, under the hood, it's all Linux and all configuration files are plain text files and all a competent administrator needs do is to choose a shell and a text editor.

If you've used Red Hat or Fedora, the differences with Mageia are examined here.

Just like Mandriva, Mageia is known for excellent default fully-featured configurations of the KDE4, GNOME2, LXDE and other desktop environments as well as a broad range of available applications.

For the average user, the changes in Mageia4 are mostly cosmetic. The Mageia art, colors and graphics are very well done (and contributed by the Mageia user community). But if it's just a pretty Mandriva or prettier Magia3, why is there a need for a newer Mageia distro?

These changes are mostly "under the hood", but are done to keep pace with improvements in technology and compatibility with standards and interoperability.
Most tools have been ported to Gtk+-3which will allow the use of the Broadway technology. For improved security, all admin tools have been ported from to polkit when needing root privileges. Mageia 4 still comes with GRUB as a default but also provides GRUB2 for forward compatibility. For GNOME2 fans, the MATE desktop is available; it is a updated version of GNOME2. All software packages are the most recent stable versions (a few are stable beta releases).

Mageia began life as Mandriva. Mandriva began life as Mandrake Linux, based on Red Hat 5.2; Mandrake was essentially "Red Hat Done Better". It offered a well-configured KDE as the default desktop as well as its own administrative tools that provided more flexibility than those tools offered by Red Hat. The under-the-hood difference in these tools was that they were (and continue to be) written in perl language rather than the python language as used by Red Hat. Mandrake/Mandriva also spent considerable effort on its unique urpmi package management tool, essentially an intelligent, powerful console/gui wrapper around the RPM system of package management.

At some point, the business management of Mandrake/Mandriva lost its way, rallied, re-grouped and then lost its way again. The first time, they lost focus on Linux and the second time, they lost focus on their community. Mageia stepped in to fill the void in the community so that all the good things that were represented by the Mandriva distro would not be lost in the corporate buyout.

Which is why the software is so similar and the community is so different; you only need to fix what is broken.

Mageia4 offers the most recent version of your favorite application software and all the major software you expect to be there is there.

Both 32-bit and 64-bit installation DVDs as well as a Live CD are available. Migration from existing Mageia3 installations is easily done. A large on-line software repository is available and provides a wide range of software of both free licensed and other licensed  categories (the latter is not enabled by default, but is opt-in). Third-party Repositories are also available.

As with any initial release, you're likely to find a few minor bugs, but the Mageia community is there to help you. As a long-time user of Mandrake/Mandriva and co-author with Bill Ball of the Red Hat/Fedora Unleashed series, I believe you'll find Mageia a full-featured and easy-to-use Linux distro.

A guide to update from Mageia 3 can be found here.

A Faster System

I'm always looking for ways to speed up my computer, especially when it comes to the boot process and loading applications. A good overall discussion or improving system performance is at, just remember that it focuses on the ArchLinux distro, not the Mandriva distro I use.

A useful utility is readahead. According to its manpage, readahead populates the page cache with data from a file so that subsequent reads from that file will not block on disk I/O. On my Mandriva 2101.2 system, the default installation of readahead places a default file at /var/lib/readahead/default.early. To create custom files based on your system, you should reboot the system and pause the GRUB menu and add the following to the command line.


This will examine your system as it boots and create a list of what files are to be loaded in the order that they are loaded.

The configuration file is found at /etc/readahead.conf and this is where you can turn on debugging if you're experiencing problems and can add excluded directories.

Next is the prelink utility. According to the man page, prelink is a program that modifies ELF shared libraries and ELF dynamically linked binaries in such a way that the time needed for the dynamic linker to perform relocations at startup significantly decreases. Due to fewer relocations, the run-time memory consumption decreases as well (especially the number of un-sharable pages).

The file /etc/prelink.conf contains a list of files and directories that prelink uses to determine where it should look and what files to avoid. Prepending -l (or -h if on a networked filesystem) to a path makes prelink search that directory for ELF binaries or shared libraries. You can prepend -b to blacklist a directory or a file to avoid which will speed up the search or deliberately avoid prelinking certain binaries.

Mandriva provides a directory to keep your customizations separate at /etc/prelink.conf.d/; just create a file there ending in .conf and your customizations will be included. The general invocation is

# prelink -a

Upgrade Mageia 2 or Mageia3 to Mageia 4

Back in the early days of Linux, the changes to the OS were so dramatic that even when updating withing the same distro, in-place point release updates were problematic enough and it was always recommended that a major version release be done from scratch. There were just too many major changes to the underlying subsystems and package naming conventions. Doing an in-place update was just asking for trouble.

Modern distros have matured quite a bit although there are occasionally some major subsystem changes being made. Yet it's never been easier to do an in-pace major version upgrade.

I just did the upgrade on several Mageia3 systems and the results were consistent and satisfactory, not to mention simple.

Step 0.

Always backup critical information. Have a Mageia3 recovery disc on hand.

From GUI

Step 1.

$ sudo mgaapplet-upgrade-helper --new_distro_version=4


From CLI

Step 1.

Fully update the packages you now have installed.

$ sudo urpmi --auto-update --auto -v

Step 2.

Remove all the existing Mageia4 repositories.

$ sudo urpmi.removemedia -av

Step 3.

Add the Mageia4 repositories. (All on one line.)

$ sudo urpmi.addmedia --distrib --mirrorlist ''

Step 4.

Update the packages

$ sudo urpmi --replacefiles --auto-update --auto -v

Step 5.

Reboot. You'll be using a new kernel, new glibc and so on.

$ sudo shutdown -r now

Step 6.

Run the package update command again. It should return with no packages needing updating.

Done.  But . . . .

Do Some Checking.

$ cat /etc/redhat-release
$ cat /etc/issue

Those commands should return the information that you are running Mageia4. I did have an issue on one machine and $ sudo urpmi mageia-release-common fixed it. You can also edit these files to change the version number.

Monday, April 15, 2013

Third-Party Repositories for Mageia

The subject of third-party repositories for Mageia is a touchy one for some people. For the maintainers of a distro, they feel that third-party repos cause compatibility problems and the packages are not subject to adequate. The third-party maintainers believe that they are maintaining either specially modified packages useful to their members or packages that the main distro cannot, for legal reasons, maintain and distribute. Both are correct.

If you need a package offered by a third-party repo, then by all means use it carefully. If not, don't even add the repos to your local repositories.

For Mandriva, the PLF at and MIB at provided those services. For Mageia, it looks like is taking the lead.

You may add the appropriate repos as root using the commands below:

Mageia 4
urpmi.addmedia --wget --distrib
urpmi.addmedia --wget --distrib 

If you want to learn more about adding third-party repositories, look at the Mageia Software Manual.

Tuesday, January 22, 2013

Mageia Vs. Fedora

I recently compared the installation of Mageia3 with Fedora 18 (both done in a VirtualBox virtual machine). When installed and fully configured to taste, you have essentially the same level of usability and ease of administration with a similar choice of desktop environments and current versions of applications running on a recent kernel using SysV-style init and RPM packaging. The meaningful differences are more easily illustrated with some history, so this will not be the typical, dull, useless version-to-version comparison with a plethora of gratuitous screen-shots and the inevitable inane jargon overload.

Fedora has been the community release of Red Hat since RHEL became the primary distro for Red Hat proper. It enjoys a more frequent release schedule than RHEL and is more focused on the desktop. Think of it as the development version of the workstation companion to the Enterprise version of Red Hat Linux taht is now in its 18th release. 

Mageia would seem to be a relative newcomer, only now in the beta of its third release, but its roots go back to Red Hat 5.x with the release of Mandrake 5.2. Mandrake was essentially a re-spin of Red Hat with better default configurations and an emphasis on the KDE desktop (RedHat has long been GNOME-centric). A great idea plagued with poor corporate leadership and even poorer corporate decision-making, Mandrake-come-Mandriva focused its development in three areas: its package manager, its administration tools and its volunteer community. Red Hat at the time still relied heavily on a text-based installer, RPM and linuxconf, all of which required more than a modicum of command-line mojo. RedHat were just beginning to develop admin tools written in Python. 

The Perl programming language was adopted by Mandrake, both because the initial cadre of developers were proficient in it and also as a way to differentiate themselves from Red Hat. As well, they would not be simply "improving" admin tools over which they did not have final control of the source code. It was a bold gamble that both benefited them and undermined their success as few other distros have adopted their tools. 

Red Hat through the years only begrudgingly accommodated their non-corporate user base and actively undermined them at times. For example, Red Hat's early incarnation of KDE was so heavily edited to make it less configurable and more GNOME-like (and better suited for a corporate workstation) that it elicited an uproar from KDE fans while documenting the Red Hat developer's overwhelmingly "not invented here" mentality (as evidenced by their scurrilous code comments). Fedora/Red Hat has always been a GNOME-centric distro because the limited configuration options of GNOME provide the best fit with their corporate workstation focus and because many GNOME developers work for Red Hat. Red Hat, in the name of "free software" also made their distro very multimedia unfriendly by not only not providing easy access to integrating less-than-free multimedia software, but by not compiling in support for them if you wished to add them on your own. Again, it was a more corporate-centric, IP attorney-friendly approach.

Many of the Red Hat/Fedora usability advances in package management and desktop ease-of-use were fomented by the loyal non-corporate user base. But this made the installation and configuration of a usable home desktop system and easily updatable system a nightmare of tedium, spawning alternatives like Mandrake and KRUD, Kevin's RedHat Uber Distribution, which provided a more friendly configuration and a way to deal with updates that addressed "Dependency Hell"; it was made obsolete by the eventual adoption of YUM as the RPM wrapper and the growth of the Fedora user community.

The Mandrake/Mandriva installer was steadily improving but idiotic corporate decisions were killing the distro: nonsensical acquisitions and pursuit of computer-aided training pillaged the start-up capital, but the user community was strong. Meanwhile, the RPM wrapper application URPMI and the user/administrator tools were coming along and Mandriva offered the broadest out-of-the-box hardware compatibility of any distro. Complicated configuration of things like X11, sound and printing were almost fiddle-free and automatic. However, Mandriva's choice of desktop and system graphics was uninspiring and almost child-like, certainly not as cutting-edge and sexy as the up and coming Ubuntu. 

Red Hat spun off the community version of Red Hat as Fedora Core, then as Fedora. A growing user-focused community sprang up to address it's usability shortcomings and has flourished. Mandriva corporate neglected its user community and as it approached bankruptcy for the second time, abandoned the desktop version of Mandriva to community users and departing employees under the auspices of Mageia. 

The official Mageia base install continues to demonstrate the ease-of-use "just works", broad hardware support, sane default configurations and a community-focused multimedia desktop. The official Fedora base install continues to demonstrate the corporate-focused minimalist approach Red Hat has traditionally taken to support their Enterprise version and, as always, a strong community effort continues to take up the slack and make it usable as a consumer desktop. 

Desktop-focused Mageia has finally stepped up its default look and feel to a polished, sophisticated and modern level while corporate-focused Fedora looks flat and clunky in comparison (still, Mageia could use some more sex appeal). The bottom line is a very different out-of-the-box experience. Mageia's installation, default configuration and usability all best Fedora.

No matter which you choose, you can wind up with a very usable  and essentially similar consumer desktop experience using either distro; Mageia just gets you there with less work and fuss. Overall, Mageia appears to have found it's raison d'ĂȘtre.