1

I'm using Kubuntu 16.10.

What are my options to run a bash-script after login and after logout as root using SDDM?

I already tried switching to lightdm in order to create a /etc/lightdm/lightdm.conf file executing my script. However, this results in a boot loop.

Thank you for your help!

2
  • upstart might do the trick for you.
    – FelixJN
    Feb 27, 2017 at 15:28
  • You are right, I should probably try that if nothing else works. But isn't it somehow possible to configure systemd to run my script? I have not managed to do that so far.
    – C11235
    Feb 27, 2017 at 15:58

1 Answer 1

0

sddm sources /etc/profile (common for all users). In case that users's $SHELL is bash then following files are checked. First file found will be executed:

  1. $HOME/.bash_profile
  2. $HOME/.bash_login
  3. $HOME/.profile

Have a look at /etc/sddm/Xsession for more details or for files sourced by different shell. As comment in the file above states:

Note that the respective logout scripts are not sourced.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .