2

I have found many things on how to do that.

I tried with upstart, but it didn't do anything. I think I found some post that tells it doesn't come out of the box with upstart anymore. This is why this question is not a duplicate of this post.

I tried using the "Autostart" application, but whenever I add my script there, close the window and reopen it, it's gone.

I would like to execute a bash script when my user is logged in and the GUI is ready (because the script is going to open and set-up some applications). What is the best way (preferably through command line) to achieve that?

1 Answers1

0

I followed DK Bose's and dessert's advice and came up with this script located in ~/.config/autostart-scripts/

#!/bin/bash

# Wait for the GUI to be ready
while [[ ! $(pgrep plasmashell) ]]; do sleep 1; done

# Do what I want

And it works well!