Enable guest account on MX 19 or Debian

Message
Author
User avatar
kamel
Posts: 4
Joined: Wed Mar 11, 2020 1:00 pm

Enable guest account on MX 19 or Debian

#1 Post 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

Code: Select all

nano /etc/lightdm/lightdm.conf
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!!!! :number1:

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:

Code: Select all

adduser username
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.

Code: Select all

usermod -aG sudo username
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.
:needcoffee:
You do not have the required permissions to view the files attached to this post.
Last edited by kamel on Wed Mar 11, 2020 4:47 pm, edited 3 times in total.
OS: MX 19 + CPU : Core2Duo, 3 GIG Mem.

User avatar
asqwerth
Developer
Posts: 7232
Joined: Sun May 27, 2007 5:37 am

Re: Enable guest account on MX 19 or Debian

#2 Post by asqwerth »

I would suggest not posting advice to install Ubuntu packages.
Desktop: Intel i5-4460, 16GB RAM, Intel integrated graphics
Clevo N130WU-based Ultrabook: Intel i7-8550U (Kaby Lake R), 16GB RAM, Intel integrated graphics (UEFI)
ASUS X42D laptop: AMD Phenom II, 6GB RAM, Mobility Radeon HD 5400

User avatar
kamel
Posts: 4
Joined: Wed Mar 11, 2020 1:00 pm

Re: Enable guest account on MX 19 or Debian

#3 Post 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.
OS: MX 19 + CPU : Core2Duo, 3 GIG Mem.

User avatar
anticapitalista
Developer
Posts: 4167
Joined: Sat Jul 15, 2006 10:40 am

Re: Enable guest account on MX 19 or Debian

#4 Post by anticapitalista »

lightdm_1.22.0-0ubuntu2.1.tar.gz
anticapitalista
Reg. linux user #395339.

Philosophers have interpreted the world in many ways; the point is to change it.

antiX with runit - lean and mean.
https://antixlinux.com

User avatar
dolphin_oracle
Developer
Posts: 20032
Joined: Sun Dec 16, 2007 1:17 pm

Re: Enable guest account on MX 19 or Debian

#5 Post by dolphin_oracle »

he just pulled the scripts out of the ubuntu package. the mx version of lightdm is still installed.
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.

User avatar
anticapitalista
Developer
Posts: 4167
Joined: Sat Jul 15, 2006 10:40 am

Re: Enable guest account on MX 19 or Debian

#6 Post by anticapitalista »

Yes, but what is in Ubuntu's guest-account.sh? Is there a reason why it is not included in Debian?
anticapitalista
Reg. linux user #395339.

Philosophers have interpreted the world in many ways; the point is to change it.

antiX with runit - lean and mean.
https://antixlinux.com

User avatar
kamel
Posts: 4
Joined: Wed Mar 11, 2020 1:00 pm

Re: Enable guest account on MX 19 or Debian

#7 Post 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.
OS: MX 19 + CPU : Core2Duo, 3 GIG Mem.

User avatar
Jerry3904
Administrator
Posts: 21962
Joined: Wed Jul 19, 2006 6:13 am

Re: Enable guest account on MX 19 or Debian

#8 Post 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
Production: 5.10, MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-23 Fluxbox and Windows 10
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin

User avatar
kamel
Posts: 4
Joined: Wed Mar 11, 2020 1:00 pm

Re: Enable guest account on MX 19 or Debian

#9 Post 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


OS: MX 19 + CPU : Core2Duo, 3 GIG Mem.

User avatar
Stevo
Developer
Posts: 12842
Joined: Fri Dec 15, 2006 8:07 pm

Re: Enable guest account on MX 19 or Debian

#10 Post 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?

Post Reply

Return to “XFCE Desktop Environment”