Forums Search Login Register
New Posts Todays Posts Find Users Posts Unanswered Threads Help Mark Forums as Read

Thread Options  Subscribe to this thread Subscribed Users  Add Reply 
Posts: 1,402
I want a specific script to run every time I log out, whether it's via Settings > Power Off/Log Out > Log Out (so the computer remains on) or Settings > Power Off/Log Out > Power Off? > Restart or Power Off.

It mustn't run if I merely Suspend or Switch User.

The script is extremely simple, quick, and just for the one user, not for any other user on the system.

The answers that I've found for Ubuntu 20.04 or Gnome 3 say to edit either ~/.bash_logout, which doesn't run (even if I make it executable), or /etc/gdm/PostSession/Default, but the folder /etc/gdm doesn't exist.

I've been searching for ages, but I can't find an answer.

How can I run a logout script when I log out?

I'm using Ubuntu 20.04 with Gnome 3.36.3.
10-01-2020, 02:39 PM
Subscribe to this thread Subscribed Users  Add Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  [ubuntu] script email shell bfrankgonzaluuu 0 10 10-14-2020 07:13 AM
Last Post: bfrankgonzaluuu
  Unable to import Gedit in a Python script tintan253 0 4 10-03-2020 12:13 PM
Last Post: tintan253
  Store JSON Data in local Storage (Java Script) QuailC1945 0 12 09-16-2020 05:22 PM
Last Post: QuailC1945
  Computer restarts when I want to reboot; Grub script error? linlynn80 0 21 08-31-2020 07:44 PM
Last Post: linlynn80
  [ubuntu] Logout failure in 12.04 with Unity (and any other DE) manastassian 1 101 03-03-2020 08:53 PM
Last Post: FrankJScott
  Question about Startup Applications and Bash script orders gandalou1 0 196 09-05-2018 10:32 PM
Last Post: gandalou1
  Help : Acer Aspire One Netbook going to sleep during boot,login and logout. lonniedivers 0 163 08-13-2018 09:59 PM
Last Post: lonniedivers
  [server] Problem running startup script - CrushFTP iclarindaboltona 0 197 07-17-2018 04:50 PM
Last Post: iclarindaboltona
  [ubuntu_budgie] MSQL not running the install script MarvinR1935 0 140 07-13-2018 11:05 PM
Last Post: MarvinR1935
  Unable to start my Startup Script qkathlinewillish 0 182 07-04-2018 08:51 AM
Last Post: qkathlinewillish

Forum Jump:

User(s) browsing this thread: 1 Guest(s)

Contact Us Privacy Policy Top RSS
Forum Software By: MyBB, © 2002-2020