0

Running lubuntu 18.04 LTS with LXDE

So, I need to run a simple SH script inside terminal session on startup after login, but I'm struggling to get it running.

I've tried: rc.local trick, /.config/lxsession/Lubuntu/autostart trick, crontab trick, creating a service and enabling it with systemctl enable and adding it to autostart via built-in tool "Default applications for LXSession" but none of them bring terminal window up and run my script when I've logged into PC.

The commands I've tried to run in these tricks: sh /path/to/script/file.sh, /bin/sh /path/to/script/file.sh, lxterminal -e sh /path/to/script/file.sh

The system is fresh install of latest distro available on Lubuntu website, it has nothing in it. What script does is bring up Chromium window and echo some stuff to terminal periodically.

upd: script is:

chromium google.com --kiosk
while [ true ]
do
  echo Quit this terminal to kill chromium
done

Thanks in advance.

  • Maybe sharing the script would help? – Justice for Monica Aug 17 '18 at 10:40
  • @DKBose edited question according your request. As I said earlier, this script is really simple. – Артём Doe Aug 17 '18 at 10:51
0

I think you should create a system user unit file. This will be located at:

/home/<user>/.config/systemd/user/<name>.service

It is created like a normal unit file. You enable it by:

systemctl --user start <name>

This will start the service at login.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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