0

Is there a startup file which is executed when LXDE is started and after the following three startup files are executed?

~/.profile    
~/.config/autostart/*.desktop  
~/.config/lxsession/LXDE/autostart

Ideally I am looking for the startup file which gets executed the last or as late as possible. Thanks.


Background:

I have a bash script which modifies the cpu frequency on Ubuntu 16.04 with LXDE. I would like the script to be automatically run when Ubuntu is started.

I add a command to run the script in any of the following startup files which are executed when LXDE is started:

~/.profile    
~/.config/autostart/change-cpu-frequency.lxsession    
~/.config/autostart/change-cpu-frequency.desktop

In any of the three files, the script indeed gets run when LXDE starts up (I verified that by logging the output of the commands that runs my script to a file). But for some unknown reason the change made to the cpu frequency is always reverted back to the system default settings at some unknown point later. I am looking for any startup file which is executed after the three startup files, so that I can run my script in the startup file to see if the change can be persistent.

Thanks.

1

You can open Preferences / Default Applications for LX Session and click the Autostart tab, then add your script(s) there.

  • Thanks. The way you suggested is the same as what I did in one of the three files: add @/path/to/myscript to "~/.config/lxsession/LXDE/autostart". So nothing new here. – Tim Apr 19 '18 at 12:25
  • I'm sorry, I guess I didn't understand? What do you want to happen that doesn't happen by autostarting your script this way? I'm asking seriously because I learn by trying to answer these questions, and if I'm missing something, I'd like to know. – Organic Marble Apr 19 '18 at 12:30
  • "In any of the three files, the script indeed gets run when LXDE starts up. But for some unknown reason the change made to the cpu frequency is always reverted back to the system default settings. I am looking for any startup file which is executed after the three startup files, so that I can run my script in the startup file to see if the change can be persistent." – Tim Apr 19 '18 at 12:42

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.