Tips & Tricks for Ubuntu

Slashdot it! Delicious Share on Facebook Tweet! Digg!

Ubuntu 13.04: Screenshots of Your Choice

Kurt Weirich, one of our readers, has provided a great screenshot tip. He pointed out that Shift+Print can capture a specific area of the screen only. The cursor changes to crosshairs, and you can mark the desired area by pressing the mouse and dragging across the area of interest. Once you release the mouse, it saves the area – that's all there is to it.

Lubuntu 12.04: Problems with /home

Newly installed Lubuntu presents an interesting problem that could also affect other Ubuntu derivatives. After installation you have a system partition (called /dev/sda1 ) and a home partition (called /dev/sda2 ) containing personal user files – that is, files you would expect to be in the home directory.

This partitioning scheme is good in theory because you can install a favorite Ubuntu in the system partition and then simply mount the home partition at each restart with /home/{USER} . This setup allows you to install a new system without having to secure and back up personal files (even though you should do so!).

Suppose, for example, that you install Lubuntu 12.04 on the system partition and then create a user who can access the desktop without logging in. You should name the user as on the previous system and – for simplicity's sake – use the same password.

If you want to mount the home partition (/dev/sda2 ) after installing and starting up the new system, you can enter the following command to modify the fstab file:

$ gksu gedit /etc/fstab

In the file, you can determine which partitions Lubuntu automatically mounts on startup and where they should go. The mount entry might look as follows with the home directory files on the /dev/sda2 partition:

UUID=ae17035d-758f-4106-bef5-284d8683634c /home/{USER} ext4 defaults 0 2

Instead of using the UUID (Universally Unique Identifier) [4] here, you could have specified /dev/sda2 . However, because the UUID is unique – whereas partition numbers might change – using the UUID is recommended. Every Linux partition has a UUID that makes addressing the partition more reliable. You can easily find out what it is with the following command (Figure 8):

Figure 8: A simple command reveals the UUID that the partition or hard drive uses. Simply use the UUID in the mount request.
$ sudo blkid /dev/sda2

Copy the UUID and paste it – as previously shown – in the /etc/fstab file, then save it and restart the computer.

The problem arises when logging in that, despite entering the correct login credentials and automatic registration, you don't end up on the Lubuntu desktop. The reason involves the file privileges for the mounted home directory. Use Ctrl+Alt+F1 to switch to virtual terminal (VT) number 1. Then, in text mode, log in and enter the following:

$ id

You'll now see the uid and gid of the current user and the username in brackets after it. The ls -la /home/{USER} command shows whether the mounted files belong to that user. In my example, most files had the id 1004:1004 . To make the file permissions recursive, you can use the following two commands:

$ cd /home/{USER}
$ sudo $ chown -R {USER}:{USER} .*

After a restart, you'll successfully land on the Lubuntu desktop.

Buy this article as PDF

Express-Checkout as PDF

Pages: 5

Price $0.99
(incl. VAT)

Buy Ubuntu User

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content