Make Raspberry Pi a Multi-User Desktop

Introduction: Make Raspberry Pi a Multi-User Desktop

About: Systems Administrator and Software Programmer.

Introduction

I want my daughter to use the Raspberry Pi for her school work and learn programming. I could buy her a Raspberry Pi or I could share my Raspberry Pi with her. I chose to share the Raspberry Pi with her. After completing this instructable, you may be interested in my instructable on modifying the login screen.

Problem

We cannot use the same account (i.e. as user "pi")

Scope

This instructable will show:

How to show login screen to greet user

How to lock screen for privacy

Prerequisite

A raspberry pi running Raspbian OS

Step 1: Enable and Test Login Screen

Open terminal emulator

cd /etc/lightdm
vi lightdm.conf

Disable auto login:

#auto-login-user=pi

Show list of user(s) in login screen

greet-hide-users=false

Save the file

Reboot

sudo reboot

Raspberry Pi will display a login screen

Step 2: Implement and Test Screen Lock

Open terminal emulator in Raspberry Pi

sudo apt-get update
sudo apt-get install xscreensaver

Click on Start Button -> Preferences -> Screensaver

If there is a dialog box asking to start the daemon, click on Yes button

If not, click on menu File -> Restart Daemon

In terminal emulator:

Navigate to lxpanel system-wide configuration

cd /etc/xdg/lxpanel/profile/LXDE/panels

Edit panel file as shown in the screenshot by adding or modifying the last plugin to what is shown in the screenshot

sudo vi panel

Modify screen lock desktop file to be the same as the one in the screenshot

cd /usr/share/applications
sudo vi lxde-screenlock.desktop

Modify logout desktop file to be the same as the one in the screenshot

cd /usr/share/applications
sudo vi lxde-logout.desktop

Reboot Raspberry Pi

Login by entering user id and password into login greeter box

A screen lock icon should be seen in the bottom right of the screen as shown in the screenshot.

Click on the lock icon. (Warning: Before doing this, make sure you know the password)

Raspberry Pi display a screensaver in the background and a login screen in the foreground as shown in the screenshot, effectively locking the screen.

Step 3: Add User and Test Login Screen

Open terminal emulator in Raspberry Pi

sudo useradd -m daughter
sudo passwd daughter

Enable new user to watch video by adding user to audio and video group

sudo usermod -a -G video,audio daughter

Reboot

sudo reboot

Display manager will show a list of users with daughter being one of them

Step 4: Give Shutdown and Reboot Privileges to User(s)

Complete the steps in "Give User Shutdown and Reboot Privileges" instructable.

Be the First to Share

    Recommendations

    • Chocolate Challenge

      Chocolate Challenge
    • Make It Modular: Student Design Challenge

      Make It Modular: Student Design Challenge
    • Home and Garden Contest

      Home and Garden Contest

    8 Comments

    0
    lionel_m
    lionel_m

    8 months ago

    Hi, It worked for me the first time round in raspbian, but not a second, as I couldn't remember what I did to the "greet-hide-users=false" that doesn't actually exist in my file.
    There is a "greeter-hide-users=false" but I don't know if t was meant to have the # or not, or to be set to true. Whatever I did did't work.

    I finally found a far easier solution that worked for me: In the terminal just type

    sudo raspi-config

    then go through the options (I think mine was the first (system), then the boot options and finally I chose boot into desktop asking for password. That was all that was needed.

    When I later added the other users, they appeared on the login dialogue.

    0
    ShaunM21
    ShaunM21

    6 years ago

    Hi, I don't seem to be able to edit the lightdm.config file. Can anyone enlighten me. Thanks

    0
    lionel_m
    lionel_m

    Reply 1 year ago

    5 years later... To edit the lightdm.config file I had to use:
    sudo nano /etc/lightdm/lightdm.conf

    Another option I found was
    sudo -H gedit /etc/lightdm/lightdm.conf
    but this option didn't work for me.

    0
    lionel_m
    lionel_m

    1 year ago

    I'm not sure if the original poster wanted more than me, but working on raspbian 10 (buster) on a pi 400 in march 2021, just the first step got me a start up option for already established different users.

    0
    klint.krossa
    klint.krossa

    5 years ago

    Hello nice and easy to follow

    up date

    cd /etc/xdg/lxpanel/profile/LXDE-pi/panels

    0
    ScottS155
    ScottS155

    6 years ago

    Shaun, you need to edit lightdm.conf as root (use sudo)

    I was unable to add shutdown and reboot privileges using these steps, but found instructions elsewhere that now allows all users to shut down, reboot, and exit to the login screen:

    At the prompt: sudo visudo

    At the end of the file, add the line: ALL ALL=NOPASSWD: /sbin/shutdown, /sbin/reboot, /usr/bin/pkill

    But thanks for the instructions! They got me most of the way there for setting up my Pi 3 as a multi-user basic desktop!

    Hi

    I have added "Give user shutdown and reboot privileges" step for a better user experience when working in Raspberry Pi.