0

I created a simple python script to change my ubuntu wallpaper. I want to this script run after whenever I logged in.

  • I tried to add command in startup application as python /bin/wallpaper_changer.py but it doesn't work.
  • I also tried to add a desktop entry in ~/.config/autostart/Myscript.desktop but it also doesn't work.
  • I also added this file path in crontab using sudo crontab -e @reboot python /bin/wallpaper_changer.py it also doesn't work.
  • I added entry in rc.local as python /bin/wallpaper_changer.py it also doesn't work
jonrsharpe
  • 115,751
  • 26
  • 228
  • 437
  • It'd be nice to see you .desktop file and the script. Perhaps there's some other interaction happening, or the .desktop file isn't quite right. It should work as long as it is okay to run as you user. – John Szakmeister Oct 27 '18 at 16:02

2 Answers2

0

Maybe this link will help you. I prefer to put a start-up command in /etc/rc.local. You can call it by typing on terminal sudo nano /etc/rc.local. You can also use crontab.

charley
  • 213
  • 2
  • 8
Anagnostou John
  • 498
  • 5
  • 14
0

I found solution for this. first make your source file executable.

chmod +x /path/to/your/file

after add it to cron tab.

sudo crontab -e

If it asks for any editor choose editor options. after it add your path when # symbols end.

@reboot /path/to/your/file