Xfce Forum

Sub domains
 

You are not logged in.

#1 2021-02-12 11:31:56

JacquesOlivier
Member
Registered: 2021-02-12
Posts: 5

Login script after opening a session

Hi,

I am using XFCE4 on ubuntu 20.04.02 LTS
I am trying to add a script, as a user, after authentification.

I tried to add these sentences in /etc/lightdm/lightdm.conf.d/myparameters.conf and also  /etc/lightdm/lightdm-gtk-greeter.conf

display-setup-script=/usr/local/bin/ur1-login-display.sh
greeter-setup-script=/usr/local/bin/ur1-login-greeter.sh
session-setup-script==/usr/local/bin/ur1-login-session.sh
session-cleanup-script=/usr/local/bin/ur1-logout.sh

all these scripts try to create a file in the homedir of the user :

#!/bin/bash
touch ~/test.txt
echo "Hello world" >> ~/test.txt

But nothing happened in the user's directory.

Am i doing something wrong ?

Offline

#2 2021-02-12 15:20:31

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: Login script after opening a session

From the /etc/lightdm.conf file:

# 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)

The easiest way to get a script to run as a user during login is via autostart (Settings Manager > Session and Startup > Application Autostart).


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

Board footer

Powered by FluxBB