Ubuntu settings disappearing after every reboot

Q I have installed Ubuntu and find the setup very impressive. However, when I start the PC from scratch - having shut down completely - all my settings in Ubuntu have disappeared and I have to re install and reset everything. I lose Thunderbird account settings, all updates and even saved documents. This problem does not occur with the SUSE 0.3 installation that I have installed on the same box. Can you advise please on what to do to avoid this recurring? At present I am not shutting down for fear of losing all.

A Are you using the same username and home directory for both Ubuntu and SUSE? If so, this problem is caused by the two distros allocating different numeric user IDs for that user. As a result, the SUSE user can write to the directory but the Ubuntu user cannot. While it is possible to change the user ID on one computer to the same as the other in order to enable the same user in both distros to write to the directory, this brings its own set of problems. The distros probably have different versions of some programs, which can cause conflicts when saving settings. A newer version of a program can usually read the settings saved by an older version, but the reverse is not always true. The safest way to work with two (or more) distros, is to have a separate user directory for each one.

You can use the same user name, but you need to change the path to the home directory. For example, you could have the username 'pearse' on both distros, but make the user directories /home/pearse-suse and /home/pearse-ubuntu. To change the home directory in SUSE, start Yast and go to User Management. Select your user and click on the Edit button, go to the Details tab and change the home directory to, say, pearse-suse. Make sure the Move to New Location box is ticked and press Accept to make the changes. If you do this while logged in as your user, you may find yourself unable to log out, so press Ctrl-Alt-Backspace to kill and restart X, then log in again. It is also possible to do this by logging out of the desktop and editing the passwd file in a root console, by running vipw, changing the home directory for your user and saving the file. Then do

mv /home/pearse /home/pearse-suse

to move the directory. On the Ubuntu half of your system, you can use a root console in the same way or use the System > Administration-Users and Groups menu item to run the user manager. You should open a terminal before you do this, then go into the user manager, select your user and press Properties, go to the advanced tab and change the home directory. You should also change the user's main group to 'users' to match the settings in SUSE. Ubuntu doesn't have the option to rename the home directory, so go to the terminal you opened earlier (you cannot open one after you've changed the home directory), and run

sudo mv /home/pearse /home/pearse-ubuntu

then log out and back in again. The GUI user management tools on both distros should indicate the numeric UID for the user. Both distros default to 1000 for the first user, but if they don't match, you should change the one for Ubuntu. You will need to do this from a root console, while not logged-in to the desktop, with

sudo -i
#make the change
chown -R pearse: ~pearse

The first line gives you root access; vipw works as above (never edit /etc passwd directly); and the last line applies the changed values to your home directory and all its contents. Finally, make sure everything in the home directories is owned by the same user by running the following as root:

chown -R pearse: /home/pearse

Of course, this now means that you have two separate home directories, with separate mail folders and other documents split between the two. While the common username and UID mean you can access both home directories from either distro, it would be easier to make common files available to both, which can be done with symlinks. From a terminal in SUSE, run commands like this

ln -s ../pearse-suse/Mail ../pearse-ubuntu/Mail
ln -s ../pearse-suse/documentsl ../pearse-ubuntu/documents
ln -s ../pearse-suse/photos ../pearse-ubuntu/photos

to ensure that the same directories (and therefore the same data), are available to both distros. Do not do this for any directories that contain settings information, as an upgrade of a software package on one distro could break things for one or both distros. That's the main reason for keeping the two home directories separate.

Follow us on Identi.ca or Twitter

Username:   Password:
Create Account | About TuxRadar