Xfce Forum

Sub domains
 

You are not logged in.

#1 2021-10-24 18:28:58

danielm7
Member
Registered: 2021-10-24
Posts: 1

Making a program run on a new user's first login, then never again

Hi, I have created a simple desktop welcome/introduction program, which I would like to be run on a new user's first login to Xfce, then never again. How can I achieve this?

Welcome program location: /usr/bin/desktop-welcome
Xfce version: 4.16
Display manager: LightDM with GTK greeter

Offline

#2 2021-10-25 10:43:54

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 12,390

Re: Making a program run on a new user's first login, then never again

Hello and welcome.

Some options off the top of my head:

  1. You could create an autostart entry for this program and when its run that first time, it would disable the autorun entry.

  2. You could have it start all the time but the first thing it does is check for the existence of a hidden file - if the file exists, don't run. Naturally, this program would create this hidden file on its first run.

  3. You could have the program check the output of "last" - and it an entry doesn't exist for the current user then run the program.

Since all of these imply the program autostarting in some manner, you would probably want to create an autostart entry for it in /etc/skel/.config/autostart so all new users inherit it.


Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.013 seconds, 9 queries executed - Memory usage: 549.27 KiB (Peak: 550.11 KiB) ]