Skip to content

MotherTeresaHS/Guest-Linux-OS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 

Repository files navigation

Guest Linux OS

The follwoing are the instructions to create a Linux computer that students can log into as a "Guest", where the home directory is just mounted to a RAM disk. This way as each new student logs in, the "Guest" account is completly fresh and has no saved data. But the students still have access to all the locally loaded programs.

Install base OS

  • for this installation I am using Debian 13, Trixie
    • downlaod the latest ISO and burn it to a USB
    • go through the standard install
      • ensure you pick "gnome" desktop and "ssh server" would also be helpful
    • for the user create:
      • login: guest
    • remember that the "guest" user by default does not have "sudo" privileges and that is what we what, DO NOT give guest "sudo" access

Mount /home/guest to RAM

  • to make the "guest" user home directory in RAM we will use "tmpfs"
    • login as "root"
    • in /etc/fstab, add the following to the end:
    tmpfs  /home/guest  tmpfs  defaults,size=1G,mode=0700,uid=guest,gid=guest  0  0
    • Since the RAM disk is wiped every reboot, the guest user won't have a .bashrc or desktop folders. You can use systemd-tmpfiles to automatically copy default files from /etc/skel every time the machine boots.
      • nano /etc/tmpfiles.d/guest-home.conf
      C  /home/guest  -  -  -  -  /etc/skel
      Z  /home/guest  -  guest  guest  -  -
    • Clear out any existing physical files in the guest home to avoid conflicts:
      rm -rf /home/guest/*
    • Mount the new RAM disk:
      systemctl daemon-reload
      mount /home/guest
    • Now, every time you reboot, any files the "guest" user creates will vanish, and a fresh set of default files from /etc/skel will be waiting for them.

Load APT Software

  • login as "root"
  • load the following software:
    apt install git curl python-is-python3 default-jdk black cpplint build-essential -y

Load VS Code

  • login as "root"
  • goto VS Code downloads webpage and get the AMD64 deb version:
    apt install ./xxx.deb

Install Brave Browser

  • login as "root":
    curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg
    echo "deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg] https://brave-browser-apt-release.s3.brave.com/ stable main" | tee /etc/apt/sources.list.d/brave-browser-release.list
    apt update && apt install brave-browser -y
  • now to set Brave as the default browser:
    update-alternatives --install /usr/bin/x-www-browser x-www-browser /usr/bin/brave-browser 200
    update-alternatives --set x-www-browser /usr/bin/brave-browser
    update-alternatives --install /usr/bin/gnome-www-browser gnome-www-browser /usr/bin/brave-browser 200
    update-alternatives --set gnome-www-browser /usr/bin/brave-browser
  • now change the default landing page:
    mkdir -p /etc/brave/policies/managed
    nano /etc/brave/policies/managed/initial_settings.json
    • add to this new file:
    {
      "RestoreOnStartup": 4,
      "RestoreOnStartupURLs": [
        "http://172.22.52.50"
      ],
      "HomepageLocation": "http://172.22.52.50",
      "HomepageIsNewTabPage": false
    }
    • now update the "Exec" line: nano /usr/share/applications/brave-browser.desktop, with:
    Exec=/usr/bin/brave-browser-stable --no-default-browser-check %U http://172.22.52.50

Change Guest's Dot Files

  • login as "root"
  • goto "/etc/skel":
    mkdir -p /etc/skel/.config/Code/User/
    nano /etc/skel/.config/Code/User/settings.json
    -> Paste your JSON settings into this file -> then to "rehydrate the home directory":
    rm -rf /home/guest/*

Remove Gnome Tour

  • login as "root"
  • unistall the "tour" app

Set Guest to Dark Mode

  • login as "root"
  • run:
    mkdir -p /etc/dconf/db/local.d/
    nano /etc/dconf/db/local.d/01-dark-mode
  • add in:
    [org/gnome/desktop/interface]
    color-scheme='prefer-dark'
    gtk-theme='Adwaita-dark'

Set Gnome Toolbar

  • login as "root"
  • create file /etc/dconf/profile/user:
    user-db:user
    system-db:local
  • create directory: mkdir -p /etc/dconf/db/local.d/
  • create a file named /etc/dconf/db/local.d/00-favorite-apps:
    [org/gnome/shell]
    favorite-apps=['brave-browser.desktop', 'org.gnome.Nautilus.desktop', 'code.desktop']
  • update:
    sudo dconf update

Set Git user Name and Email

  • login as "root"
  • run:
    git config --system user.name "Guest student"
    git config --system user.email "guest.student@stu.ocsb.ca"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors