Page 1 of 1
Enable guest account on MX 19 or Debian
Posted: Wed Mar 11, 2020 2:07 pm
by kamel
By default on debian there is no guest account provided by the lightdm package, but you can install it as follows:
Code: Select all
wget -c https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/lightdm/1.22.0-0ubuntu2.1/lightdm_1.22.0-0ubuntu2.1.tar.gz
tar -xvzf lightdm_1.22.0-0ubuntu2.1.tar.gz
mv lightdm-1.22.0/debian/guest-account.sh /usr/sbin/guest-account
chown root:root /usr/sbin/guest-account
chmod 755 /usr/sbin/guest-account
mkdir -p /usr/share/lightdm/guest-session/skel/
mv lightdm-1.22.0/debian/guest-session-setup.sh /usr/share/lightdm/guest-session/setup.sh
chown -R root:root /usr/share/lightdm
chmod 755 /usr/share/lightdm/guest-session/setup.sh
Then you modify the lightdm configuration file
and you uncomment these lines and change the value like under
Code: Select all
greeter-hide-users=false
greeter-allow-guest=true
allow-guest=true
Now you can reboot!!!!
If you want a more customized guest session, you can first create a real user:
Don’t forget to replace username with the user name that you want to create:
You will be prompted to set and confirm the new user password.
(optional) you can add the user you created to the sudo group to have sudo access.
Using a special user account for setting the guest preferences is the most convenient way to customize the guest session feature.
Log in to the user account just created and change things to what you want your guests encounter at startup.
Now we create a symbolic link to the home directory of the user account "username":
Code: Select all
sudo mkdir /etc/guest-session
sudo ln -s /home/username /etc/guest-session/skel
Now, when you launch a guest session, it will have the same preferences as you set for the user account. As you can see on the attachments, the only difference is that on the guest session, any changes done here will be deleted on logout or reboot.

Re: Enable guest account on MX 19 or Debian
Posted: Wed Mar 11, 2020 2:13 pm
by asqwerth
I would suggest not posting advice to install Ubuntu packages.
Re: Enable guest account on MX 19 or Debian
Posted: Wed Mar 11, 2020 2:24 pm
by kamel
Where in my post you see installation of ubuntu package or installation of a package.
I just extract debian script files (lightdm-1.22.0/debian/) from the package.
Re: Enable guest account on MX 19 or Debian [Solved]
Posted: Wed Mar 11, 2020 3:41 pm
by anticapitalista
lightdm_1.22.0-0ubuntu2.1.tar.gz
Re: Enable guest account on MX 19 or Debian
Posted: Wed Mar 11, 2020 4:02 pm
by dolphin_oracle
he just pulled the scripts out of the ubuntu package. the mx version of lightdm is still installed.
Re: Enable guest account on MX 19 or Debian
Posted: Wed Mar 11, 2020 4:09 pm
by anticapitalista
Yes, but what is in Ubuntu's guest-account.sh? Is there a reason why it is not included in Debian?
Re: Enable guest account on MX 19 or Debian
Posted: Wed Mar 11, 2020 4:55 pm
by kamel
I am not a developper but i know that ubuntu is also based on debian. That's why we can pull out the scripts from (and you are right) an ubuntu package but inside a debian folder "lightdm-1.22.0/debian/". Just for fun.
I don't know why it is not included by default in debian but each OS has his policies.
Re: Enable guest account on MX 19 or Debian
Posted: Wed Mar 11, 2020 5:04 pm
by Jerry3904
Do the options for our lightdm work? /etc/lightdm/lightdm.conf
Code: Select all
<snip>
[LightDM]
#start-default-seat=true
#greeter-user=lightdm
#minimum-display-number=0
#minimum-vt=7
#lock-memory=true
#user-authority-in-system-dir=false
#guest-account-script=guest-account
#log-directory=/var/log/lightdm
#run-directory=/var/run/lightdm
#cache-directory=/var/cache/lightdm
#xsessions-directory=/usr/share/xsessions
#remote-sessions-directory=/usr/share/lightdm/remote-sessions
#xgreeters-directory=/usr/share/xgreeters
#disable-guest-wrapper=false
Re: Enable guest account on MX 19 or Debian
Posted: Wed Mar 11, 2020 5:16 pm
by kamel
This is the content of my lightdm.conf and guest options work
Code: Select all
#
# General configuration
#
# start-default-seat = True to always start one seat if none are defined in the configuration
# greeter-user = User to run greeter as
# minimum-display-number = Minimum display number to use for X servers
# minimum-vt = First VT to run displays on
# lock-memory = True to prevent memory from being paged to disk
# user-authority-in-system-dir = True if session authority should be in the system location
# guest-account-script = Script to be run to setup guest account
# log-directory = Directory to log information to
# run-directory = Directory to put running state in
# cache-directory = Directory to cache to
# xsessions-directory = Directory to find X sessions
# remote-sessions-directory = Directory to find remote sessions
# xgreeters-directory = Directory to find X greeters
# disable-guest-wrapper = Disable using guest session wrapper (temporary? required to make tests work without installing)
#
[LightDM]
#start-default-seat=true
#greeter-user=lightdm
#minimum-display-number=0
#minimum-vt=7
#lock-memory=true
#user-authority-in-system-dir=false
#guest-account-script=guest-account
#log-directory=/var/log/lightdm
#run-directory=/var/run/lightdm
#cache-directory=/var/cache/lightdm
#xsessions-directory=/usr/share/xsessions
#remote-sessions-directory=/usr/share/lightdm/remote-sessions
#xgreeters-directory=/usr/share/xgreeters
#disable-guest-wrapper=false
#
# Seat defaults
#
# type = Seat type (xlocal, xremote)
# xserver-command = X -dpi $DPI server command to run (can also contain arguments e.g. X -special-option)
# xserver-layout = Layout to pass to X server
# xserver-config = Config file to pass to X server
# xserver-allow-tcp = True if TCP/IP connections are allowed to this X server
# xdmcp-manager = XDMCP manager to connect to (implies xserver-allow-tcp=true)
# xdmcp-port = XDMCP UDP/IP port to communicate on
# xdmcp-key = Authentication key to use for XDM-AUTHENTICATION-1 (stored in keys.conf)
# greeter-session = Session to load for greeter
# greeter-hide-users = True to hide the user list
# greeter-allow-guest = True if the greeter should show a guest login option
# greeter-show-manual-login = True if the greeter should offer a manual login option
# greeter-show-remote-login = True if the greeter should offer a remote login option
# user-session = Session to load for users
# allow-guest = True if guest login is allowed
# guest-session = Session to load for guests (overrides user-session)
# session-wrapper = Wrapper script to run session with
# display-setup-script = Script to run when starting a greeter session (runs as root)
# greeter-setup-script = Script to run when starting a greeter (runs as root)
# session-setup-script = Script to run when starting a user session (runs as root)
# session-cleanup-script = Script to run when quitting a user session (runs as root)
# autologin-guest = True to log in as guest by default
# autologin-user = User to log in with by default (overrides autologin-guest)
# autologin-user-timeout = Number of seconds to wait before loading default user
# autologin-session = Session to load for automatic login (overrides user-session)
# exit-on-failure = True if the daemon should exit if this seat fails
#
[SeatDefaults]
#type=xlocal
xserver-command=X -dpi $DPI
#xserver-layout=
#xserver-config=
xserver-allow-tcp=false
#xdmcp-manager=
#xdmcp-port=177
#xdmcp-key=
greeter-session=lightdm-greeter
greeter-hide-users=false
greeter-allow-guest=true
#greeter-show-manual-login=false
#greeter-show-remote-login=true
#user-session=default
allow-guest=true
#guest-session=UNIMPLEMENTED
session-wrapper=/etc/X11/Xsession
display-setup-script=/usr/local/bin/early-bg
#greeter-setup-script=
#session-setup-script=
#session-cleanup-script=
autologin-guest=true
#autologin-user=novatec
autologin-user-timeout=0
#autologin-session=UNIMPLEMENTED
#exit-on-failure=false
#
# Seat configuration
#
# Each seat must start with "Seat:".
# Uses settings from [SeatDefaults], any of these can be overriden by setting them in this section.
#
#[Seat:0]
#
# XDMCP Server configuration
#
# enabled = True if XDMCP connections should be allowed
# port = UDP/IP port to listen for connections on
# key = Authentication key to use for XDM-AUTHENTICATION-1 or blank to not use authentication (stored in keys.conf)
#
# The authentication key is a 56 bit DES key specified in hex as 0xnnnnnnnnnnnnnn. Alternatively
# it can be a word and the first 7 characters are used as the key.
#
[XDMCPServer]
#enabled=false
#port=177
#key=
#
# VNC Server configuration
#
# enabled = True if VNC connections should be allowed
# command = Command to run Xvnc server with
# port = TCP/IP port to listen for connections on
# width = Width of display to use
# height = Height of display to use
# depth = Color depth of display to use
#
[VNCServer]
#enabled=false
#command=Xvnc
#port=5900
#width=1024
#height=768
#depth=8
Re: Enable guest account on MX 19 or Debian
Posted: Wed Mar 11, 2020 11:47 pm
by Stevo
What's the difference between a "guest account" created with all that hassle and one for a user named "guest" that I can create in three seconds with MX User?
Re: Enable guest account on MX 19 or Debian
Posted: Thu Mar 12, 2020 12:21 am
by asqwerth
Stevo wrote: Wed Mar 11, 2020 11:47 pm
What's the difference between a "guest account" created with all that hassle and one for a user named "guest" that I can create in three seconds with MX User?
If you check his new additions to his first post, he is referring to the ability of the "guest" account to not save anything done within, so it's always vanilla when accessed again.
...when you launch a guest session, it will have the same preferences as you set for the user account. As you can see on the attachments, the only difference is that on the guest session, any changes done here will be deleted on logout or reboot.
That's probably the script at work, the one he extracted from the Ubuntu package. I have no idea if the same thing can be found in some separate package in Debian.
I've used this before long ago, when I had elementaryOS 12.04 on my old PC. It was enabled by default. But ultimately I chose to disable it by editing the lightdm.conf file. I didn't even know that this functionality supposedly doesn't even exist (even as a disabled option) in Debian.
Of course, using MX User, various group access and permissions are very easily enabled/disabled using checkboxes. No need for the usermod command he set out in his first post. But can the whole session and all changes be wiped upon logout or reboot in Debian without the need to import that whole script? Maybe just some commands are needed?
Hmm. That might be something to consider adding to MX User.
Re: Enable guest account on MX 19 or Debian
Posted: Thu Mar 12, 2020 9:46 am
by komer