Welcome!

By Jonathan Moeller - Last updated: Saturday, April 16, 2011

Buy “The $0.99 Ubuntu Beginner’s Guide” at Amazon.com, Barnes & Noble, and Smashwords.

Welcome to Jonathan Moeller’s Help Desk Screeds! We talk about technology here, mostly Ubuntu Linux.

If you find the site helpful, check out my eBooks.

-JM

Filed in administrata

Install Rhythmbox Media Player On Linux Mint 12

By Jonathan Moeller - Last updated: Tuesday, February 7, 2012

Linux Mint 12 is based on Ubuntu 11.10 Oneiric Ocelot, which comes with the Banshee Media Player. However, most of the previous versions of Ubuntu have used the Rhythmbox Media Player, and you might prefer Rhythmbox over Banshee. Fortunately, it’s quite simple to install Rhythmbox on Linux Mint 12.

Here’s how to do it.

First, go to a Terminal window and type this command:

sudo apt-get install rhythmbox

Enter your password to authenticate, and apt will download and install Rhythmbox for you. After the installation is complete, you can launch Rhythmbox by returning to the Dash, searching for “Rhythmbox”, and clicking on the program’s icon.

-JM

Get for free at Amazon.com, Barnes & Noble, and Smashwords.

Filed in Linux Mint 12

Install SSH Server On Linux Mint 12

By Jonathan Moeller - Last updated: Monday, February 6, 2012

SSH stands for “secure shell”, and it is a network protocol that allows you to securely send commands to a remote machine. The “secure” part comes from the fact that the connection is encrypted, which means that an attacker cannot eavesdrop on the connection, or intercept and replace your commands with his own midway through transit. SSH is pretty reliable and secure, and is commonly used in the Linux world. Administrators often use it to remotely manage machines – it’s usually more comfortable to control a server from your laptop than in the chilly and noisy server room.

In this post, we’ll show you how to set up an SSH server on Linux Mint 12.

The default SSH server package for Linux Mint 12 is OpenSSH Server, which we’ll use here.

First, you’ll need to install OpenSSH Server. To do so, open up a Terminal window and type the following command:

sudo apt-get install openssh-server

Enter your password to authenticate, and the apt utility will download and install OpenSSH Server for you. Depending on the speed of your Internet connection and your computer, the installation may take several minutes.

Once the installation has finished, return to the Terminal window. We’ll need to make a few changes to your /etc/ssh/sshd_config file in order to increase SSH’s security. First, as always, we’ll want to make a backup copy of your sshd_config file in case anything goes wrong. Type this command into the Terminal:

sudo cp /etc/ssh/sshd_config ~

This will make a backup copy of the sshd_config file in your home directory.

Next, we’ll need to edit the sshd_config file itself.

sudo vi /etc/ssh/sshd_config

(Note that you can use emacs or gedit or another text editor of your choice.)

Like almost every other server software package, SSH is controlled by a number of directives in its configuration file. The default installation of OpenSSH server is reasonably secure. However, you might want to make a few changes to tighten up its security to additional degree.

The “PermitRootLogin” directive is one you’ll want to change. Once you’re editing the /etc/ssh/sshd_config file, you’ll want to change the following directive as follows:

PermitRootLogin no

This will keep anyone from attempting to log into your server via SSH as root. It’s generally a good idea not to allow any to log into your SSH server as root. If an attacker manages to hack into your SSH server with the root login, he will have complete control over your machine, and that is definitely not a good thing.

Another directive you might want to change is the “AllowUsers.” When the AllowUsers directive is active, only users specifically specified in the directive can access the system through SSH. This adds an additional layer of protection to your SSH server by only allowing specific users to connect via SSH. For instance, if you wanted to limit SSH access to just the “camalas” user account, edit the AllowUsers directive like this:

AllowUsers camalas

To add multiple users to the AllowUsers directive, just add them one by one without commas or semicolons. An AllowUsers directive that permits the camalas user account and the lmaraeus user account to log in would look like this:

AllowUsers camalas lmaraeus

You may also want to consider changing the Port directive. By default SSH runs over TCP/IP port 22, which means that any malware bot autoscanning port 22 can target it. If you set up your user accounts with a weak password (always a bad idea), eventually an automated bot might break through and guess the password. Changing the Port directive to something different will make SSH run over a different port, blocking some of those automated cracking attempts. To set SSH to run over port 5699 instead, make sure your Port directive looks like this:

Port 5699

Note that if you change your SSH server’s default port, you’ll need to remember the new port number when using an SSH client, which we’ll cover in the next section.

After you’ve finished changing the directives in /etc/ssh/sshd_config, switch vi to command mode, and save and quit vi. After you return to the command line, restart the SSH daemon with this command:

sudo restart ssh

You should now be able to SSH into your Linux Mint machine from another system with an SSH client.

-JM

Get for free at Amazon.com, Barnes & Noble, and Smashwords.

Filed in Linux Mint 12

Create ISO Image Files In Ubuntu 11.10 Oneiric Ocelot With genisoimage

By Jonathan Moeller - Last updated: Thursday, February 2, 2012

ISO image files are quite useful. They are an excellent way to prepare files for distribution on discs, for instance, or for data archiving. And on Ubuntu 10.10 Maverick Meerkat, you can use the genisoimage command to quickly prepare a set of files as an ISO image.

To create an ISO image of your Documents folder, you would use this command at the Terminal prompt:

genisoimage -o ~/backup.iso -V BACKUP -R -J ~/Documents

What do the options mean?

The -o option specifies the name of the iso you want to create, and its location

-V sets a volume label for the iso image. When you burn the disc, the resultant disc will have whatever volume label you set with the -V option

The -R option tells genisoimage to use Rock Ridge attributes, which allows better integration when a Ubuntu system reads the disc.

-J tells gensoimage to use the Joliet directory scheme, which helps a Windows machine read the disc.

Finally, you put the directories and files you want stored in the iso image at the end of the command, ~/Documents, in this case.

-JM

Filed in command line, Ubuntu 11.10

In Praise Of Linux Mint 12

By Jonathan Moeller - Last updated: Wednesday, February 1, 2012

The Register has a favorable article on Linux Mint 12.

Both GNOME Shell and Ubuntu Unity seem to inspire extreme reactions – people either love them or hate them. But what happens if you hate both Unity and GNOME Shell? Linux Mint 12 might be for you, then.

-JM

 

Filed in Linux Mint 12

Install Cinnamon Desktop On Ubuntu 11.10 Oneiric Ocelot As A Unity Replacement

By Jonathan Moeller - Last updated: Tuesday, January 31, 2012

Ubuntu 11.10 Oneiric Ocelot’s Unity interface is no longer new, but people still love it or hate it. If you’re in the camp that hates Unity, one of the options available to you is Linux Mint’s new Cinnamon desktop. Cinnamon is a fork of the GNOME Shell interface, and in my opinion, it is an improvement over GNOME Shell. It does away with many of GNOME Shell’s more bizarre design choices, such as the decision to remove the option to shut down or keep icons on the desktop.

Here’s how to install Cinnamon on Ubuntu 11.10 Oneiric Ocelot.

First, go to the Terminal, and use this command to add the PPA (personal package archive) housing the Cinnamon files:

sudo add-apt-repository ppa:merlwiz79/cinnamon-ppa

Press enter, and apt will ask for your password to authenticate. Enter your password, and apt will add the repository.

Next, update your system’s directory of its repositories with this command:

sudo apt-get update

Finally, install Cinnamon itself with this command:

sudo apt-get install cinnamon cinnamon-session cinnamon-settings

The files come to about 61 megabytes in size, so the download and installation might take a while, depending on your network speed. Once the installation is finished, you can use Cinnamon by logging out of your system, selecting “Cinnamon” from the environment menu (the little gear next to the password field on the logon screen), and logging back in.

-JM

Filed in Ubuntu 11.10

Kindle Fire Dominates The Android Tablet Market

By Jonathan Moeller - Last updated: Monday, January 30, 2012

It appears that the Kindle Fire now controls about 40% of the Android tablet market, with between 4 and 6 million of the devices sold over the Christmas buying season.

Of course, the Android tablet market is still smaller than the iPad market. But it’s growing. And while the Kindle Fire has many limitations, its $199 price point trumps many of those limitations. It’s the “good enough” factor. Would you rather pay $499 for a device that’s perfect, or $199 for a device that does almost everything you want it to do?

Between 4 and 6 million consumers said “good enough”, and went with the Kindle Fire.

-JM

Filed in iPhone / iPod Touch, Linux

Change Ownership With The chown Command On Ubuntu 11.10 Oneiric Ocelot

By Jonathan Moeller - Last updated: Wednesday, January 18, 2012

You can use the chmod command to assign permissions in Linux. However, the basis of Linux permissions revolves around the concept of ownership, which you can change using the chown command.

What is file and folder ownership? In Linux file permissions, “ownership” means that the owner, whether the owning user or the owning group, has full control over the file or folder. Basically, every file and folder on a Linux system can be accessed by three different groups of users – the owning user, the owning group, and everybody else with an account on the system. The owning user and group, obviously, are the particular user and group that have been assigned ownership of that file or folder. (The owner and the root user are the only ones who can change or assign permissions to a file.) Everyone else means every other user on the system.

Permissions are then assigned based on those groups – the owning user, the owning group, and all other users on the system.

Assigning permissions is useful, but it’s only the first half of managing security for your files and folders. You may also need to sometimes take ownership of files, or to assign them to different owners. Or you may need to assign a file to a different group.

To change the ownership of files, you can use the chown command. To assign the ownership of the test.txt file to a user named tim:

sudo chown tim test.txt

(You won’t need root permissions to change the ownership of files you already own, but you’ll need it while changing the ownership of files that you don’t own.)

You might have noticed that all this command only affects one file or directory at one time. How do you change the ownership of a large number of files at once? Like the cp or the mv commands, all the commands for managing permissions and ownership work with both the recursive -r option and with wildcards. For instance, to assign ownership of the /test directory, and all its files and subdirectories, to a user named tim:

sudo chown -r tim /test

Using chown, you can quickly manage both ownership on your Linux system.

-JM

Filed in command line, Ubuntu 11.10

Stop Online Piracy Act

By Jonathan Moeller - Last updated: Wednesday, January 18, 2012

Other people have written about SOPA in more detail than I can. Suffice it to say, it is a terrible bill – its authors are either technically inept, astonishingly ignorant, or simply corrupt. (Or, knowing the average character of a US Congressman, a combination of all three is the most likely.)

To put it in perspective, the bill is a bit like ordering a major city to shut down all its freeways and roads to all traffic because someone might have driven on those roads with a bootleg Chinese DVD in the trunk. In addition, SOPA’s provisions are ripe for abuse – one can easily see a politician using it to take down a site critical of his voting record under nebulous claims of “copyright infringement” (perhaps that is the real reason Congress likes the idea so much).

SOPA does not benefit the public in any way, and is a textbook example of a small, moneyed group using its money to enact ill-considered laws to protect its economic position.

-JM

Filed in administrata

Change permissions in Ubuntu 11.10 Oneiric Ocelot with the chmod command

By Jonathan Moeller - Last updated: Thursday, January 12, 2012

The chmod command lets you change permissions on files and directories from the command line in Ubuntu 11.10 Oneiric Ocelot.

First, though, what are permissions?

Basically, every file and folder on a Ubuntu system can be accessed by three different groups of users – the owning user, the owning group, and everybody else with an account on the system. In Linux file permissions, “ownership” means that the owner, whether the owning user or the owning group, has full control over the file or folder. The owning user and group, obviously, are the particular user and group that have been assigned ownership of that file or folder. (The owner and the root user are the only ones who can change or assign permissions to a file.) Everyone else means every other user on the system.
There are three permissions that can be assigned to the owner, the owning group, and everyone else – read, write, and execute.

The Read permission allows you to access the file, but not to delete it or alter it. For example, you could open a document with the Read permission, but you could not edit it, and you could not delete it.

The Write permission allows you alter or delete a file. To return to our example document, if you have the Write permission, you could delete it or make changes to it. (Ironically, to actually view the document, you also need the Write permission.)

The Execute permission allows you to run a file as a program. Any application or program files need to have this permission, otherwise they won’t work.

So, how to change a file’s permissions? This is done using the chmod command. (In Linux, a file’s total permissions are called the “mode”, so chmod stands for “change mode.”) If you want to add the execute permission to the owning user of a file, you would use chmod like this (note that in chmod, u stands for the owning user):

chmod u+x test.txt

If you wanted to add the execute permission to the owning group:

chmod g+x test.txt

Finally, if you wanted to add the execute permission for everyone on the system:

chmod o+x test.txt

(In chmod, o stands for Others, or everyone else on the system.)

And to do all three at once:

chmod u+x,g+x,o+x test.txt

Alternately, to remove permissions, replace the + sign with the – symbol:

chmod u-x,g-x,o-x test.txt

All this typing is rather cumbersome, isn’t it? Fortunately, file permissions in Ubuntu Linux have numeric codes – mathematical shorthand, if you will. The Read permission is assigned the number 4, Write the number 2, and Execute the number 1. Having no permissions is represented by a zero. You then calculate the permissions by adding up the numbers. Take this example:

-rwxrw-r– 6 bobsmith users 4096 Dec 9 14:56 test.txt

The file’s owner receives the Read, Write, and Execute permissions, the owning group gets Read and Write, and everyone else gets Read. Since Read is 4, Write is 2, and Execute is 1, the file owner gets a permission of 7. The owning group gets a total of 6, and everyone else gets 4. The permissions can then be expression numerically as this:

764

And so to set the permissions as 764, you would use the chmod command:

chmod 764 test.txt

Much easier to simply type 764, isn’t it?

Or to give the owning user full permissions, while denying permissions to both the owning group and everyone else, use this command:

chmod 700 test.txt

Needless to say, this makes using the chmod command far less cumbersome. As another example, let us say you wanted to change the permissions of test.txt so that the owner can read, write and execute, the owning group can read and execute, and everyone on the system who is neither the owner nor the owning user can read the file but not write or execute. You would use this chmod command:

chmod 754 test.txt

-JM

Filed in command line, Ubuntu 11.10

Android Screenshots vs. iOS Screenshots

By Jonathan Moeller - Last updated: Wednesday, January 11, 2012

In the war of the mobile operating systems, I personally prefer Android. iOS is slick and polished, but it is too restrictive for my taste – I much prefer the additional freedom you can get out of (some) Android devices.

That said, iOS makes it way easier than Android to take screenshots.

On an iPhone, iPad, or iPod Touch, to take a screenshot, you need only to hit the Home button and the Power button simultaneously. The screen will briefly flash, and a screenshot will be saved to your device’s Pictures folder. No muss, no fuss.

On Android devices, the situation is far murkier. On most devices, to take a screenshot, you need to first root the device, and then install a specific screenshot app, and many of the available screenshot apps on the Android Market are of dubious quality. So far, the only way I’ve found to reliably take screenshots is using the excellent Cyanogen Mod on a Barnes & Noble Nook Color. To take a screenshot in Cyanogen, you need only hold the power button until the power menu appears, and then tap “Take Screenshot.” A screenshot then gets saved to the Screenshots folder in your device’s DCIM folder.

That’s functionality that the phone carriers and OEM manufacturers should never have taken out of Android. Cyanogen Mod, I think, manifests the best of Android’s potential.

-JM

Filed in iPhone / iPod Touch, Linux