How can I reset Wikipedia

ubuntuusers.de

This article has been tested on the following versions of Ubuntu:


Would you like to test the article for another Ubuntu version? Participation in the wiki is always welcome! For this purpose, the instructions for testing articles must be observed.

The aim of this article is to explain how a computer running Ubuntu looks the same every time it starts. These instructions are suitable e.g. for school computers or other practice rooms. Students often and happily change the appearance of the computer. Examples are moving or deleting the program starter on the desktop, the bars (panels), changing the background image and much more.

This in itself is not tragic, but unfortunately there is often a lack of time, knowledge or desire to undo these personal settings. The often uttered sentence "Leave your place as you found it." remains pure wishful thinking and after a short time you as a teacher are more busy repairing the chaos on the PCs than being able to devote yourself to the actual lessons. In the worst case, the teaching staff will give up and simply no longer use the space - at the expense of the students.

While there are corresponding but not free software or hardware solutions ("Guardian Cards"), the procedure described below is simply based on the fact that all user settings are automatically restored from a predefined backup copy when the system is started.

Expert info:

You can also use the guest session of the display manager LightDM, in which all changes are automatically discarded when you log out. If desired, this can be preconfigured in order to specify certain settings.

Initial situation¶

The following example assumes a computer on which only one user was set up during installation. This user traditionally has all rights under Ubuntu [1]to maintain and care for the computer, to install programs, to set the graphics and screen resolution and to adjust the appearance.

This user is referred to as the "Main user" designated. He creates the basic configuration of the computer and sets up additional users. For this purpose, two new users are created in the "Settings" program under "User" and a password is also assigned. For the rest of this article, these will be the users

  • children (later serves as a "normal" user)

  • default (to back up or restore the settings)

The rights of the new users are not restricted at this point, but only after the system has been completely set up. Log out now and log in as a new user.

Create user¶

After logging in, the user is set up. The following points would be interesting, for example:

Example desktop with GNOME 3
  • Create starter for selected programs on the desktop and move it to the desired location

  • Set up file storage (create folder on the desktop, see below)

  • Adjust the volume or mute it

  • Install fonts and desired additional programs

  • Remove unnecessary programs from the menus

  • Turn off update notification, etc.

When everything is set up so far, the system should be restarted. If after the reboot everything is still as it should be, this setting will be kept. Subsequent changes are easily possible - by the main user.

Create folder¶

It should not be possible to save files on the desktop or under documents. Files are always - referred to here as the base folder - below / Files filed. Then the files are still available in this folder after the restart.

The following are the folders, for example:

  • class 1

  • 2nd grade

  • Class 3

  • Grade 4

These should be visible on the desktop and the students are only allowed to save files in these folders. All of the named folders are given read and write access. This means that files can be saved without any problems, although the students have to choose the correct folder themselves.

Danger!

It should be clearly pointed out to future users that all files that are saved outside of the specified folder are deleted when the system is restarted and are thus irrevocably lost. External storage media such as USB sticks are not affected.

In order to implement the proposal described, log in again as the main user and open a terminal window [2] to open. The above-mentioned home folder and the shortcuts on the user's desktop are set up in two steps. To do this, execute the following commands:

  1. sudo mkdir -p / files / class1 / files / class2 / files / class3 / files / class4 sudo chown -R children: children / files
  2. cd / home / children / desk / sudo -s ln -s / files / class1 class1 ln -s / files / class2 class2 ln -s / files / class3 class3 ln -s / files / class4 class4 exit

Now the terminal window can be closed again. After logging in as a user, the folders on the desktop have a small arrow symbol as a symbol for a shortcut.

Expert info:

If required, a different base folder can also be used for permanent storage. The above information is only intended to serve as an example.

Change user rights¶

As described in the initial situation, users and still have root or administrator rights. Up until now, this has primarily served to make configuration easier for users. By calling

  • "Settings → User"

In the properties of the two users, these rights are restricted - by the main user. Changes such as installing programs are no longer possible for these users.

Save settings¶

Since all settings can be saved via the user, the user settings can be reset after each restart. To do this, log in as the main user and save the complete settings with the following command:

sudo cp -a / home / children * / home / default

Next, a system-wide cron job is created with cron:

and added these commands to the last line to enable automatic restore:

@reboot rm -rf / home / kinder / @reboot cp -a / home / default / kinder / home @reboot chown children: children -R / home / children

Test¶

The user can now be logged in and a test can be carried out. Simply change the background image, delete a starter, or change a panel. Then restart the computer. After logging in, everything should look like it did before.

Later changes¶

After the settings have been adopted, changes can still be made - as long as they are not blocked by the restriction of user rights. Log in as a user, make the changes and log out. Now log in as the main user and save the settings:

sudo cp -a / home / children / * / home / default

Configure graphical login¶

So far, the procedure described in this article only works if the computer is shut down, turned off or restarted after use. If only one deregistration takes place, all changes are retained! Depending on the intended use, this behavior can be undesirable. These with root rights in / etc / profile entered lines provide remedy:

if [$ LOGNAME = "children"]; then rm -rf / home / children / * cp -a / home / default / children / * / home / children chown -R children: children / home / children fi

Clone computer¶

In order to reduce the workload with several computers, a computer set up in this way can be transferred to others by means of an exact copy of the hard disk. While that "Clone" of a computer running Windows is deliberately made more difficult by the manufacturer of the operating system, this process is normally relatively problem-free under Linux. You simply create a memory image ("Image") from a fully set-up PC or hard drive and transfer it to other computers. The program Clonezilla 🇬🇧 in the LiveCDVariant can be used.

Clonezilla is designed for data backup and cloning of multiple computer systems and supports the file systems ext2, ext3, reiserfs, xfs, jfs, fat and ntfs. The programs partimage and dd (DiskDump) help with this. To download ⮷ the Clonezilla Live CD ISO image.

So you can equip many computers with Linux in a relatively short time - even if the hardware used is not exactly identical. The UUIDs that have to be adjusted after cloning are problematic under Ubuntu.

Left¶

This revision was created by chrisulex on March 6, 2021 13:31.
The following keywords were assigned to the article: school, system, education