0

I execute a command on boot, before logging in, by adding it to my

/etc/lightdm/lightdm.conf.d/50-ubuntu.conf

file under [SeatDefaults].

The program executes but is unable to locate a necessary file in my home directory, which makes sense as it doesn't know which home directory to look in.

So, where can I put the file so the script is able to locate it? What is the value of ~ when the program is running?

This is a reformulation of Start Synergy client with SSL before login Ubuntu 16.04 LTS, in the hope of this question being easier to answer.

cygnus_x1
  • 102
Atnas
  • 105

1 Answers1

1

It would be easier just to manually specify the absolute path (using no relative symbols like ~) for the script.

Instead of declaring the location as ~/path/to/program.sh, make it /home/username/path/to/program/sh.


Edit: If you don't have the ability to change the defined path, the ~ location is /root by default. You can move your script to this path with

sudo mv ~/path/to/program.sh /root/
dessert
  • 40,956
cygnus_x1
  • 102