Welcome to SparkyLinux forums
Zapraszamy również na polsko-języczne Forum https://forum.linuxiarze.pl

auto wallpaper switcher

Started by genek, December 13, 2020, 07:36:40 PM

Previous topic - Next topic

genek

Hi
I wanna switch user wallpaper into my picture via network from host 172.16.1.56

I do scritpt /bin/tlo
Quote
#!/bin/bash
sshpass -p password scp uczen@172.16.1.56:rules/tlo.sh /home/uczen
/home/uczen/tlo.sh

tlo.sh
Quote
export DISPLAY=:0.0
pcmanfm-qt --set-wallpaper="/home/uczen/.config/172921.jpg"
touch /home/uczen/t.txt

All work fine (I have some preinstalled pictures in .config directory), but only if I execute in terminal window "tlo"
But doesn't work from
crontab -l
Quote
@reboot sleep 44 && /bin/tlo
neither with file
/home/uczen/.profile ending with
Quote
sleep 44 && /bin/tlo

Any suggestion - WHY?

pavroo

Hi
I don't know what is your desktop, but if you run pacman-qt I guess it is LXQt, so add your script to the LXQt Session Settings-> Autostart instead of the .profile file.
Make sure the script has exec chmod:
sudo chmod +x /path/to/yourscript
Nothing is easy as it looks. Danielle Steel
Join #sparkylinux.org at [url="//irc.libera.chat"]irc.libera.chat[/url]

genek

I have chmod 755 on that scripts. It works, when i write commnad manually.
And unfortunatelly, adding it to autostart daesn't help :(

Quote from: pavroo on December 13, 2020, 08:47:33 PM
Hi
I don't know what is your desktop, but if you run pacman-qt I guess it is LXQt, so add your script to the LXQt Session Settings-> Autostart instead of the .profile file.
Make sure the script has exec chmod:
sudo chmod +x /path/to/yourscript

pavroo

Try other way.
Remove your file from the LXQt autostart.
Create a your.desktop file in the system's autostart:
sudo nano /etc/xdg/autostart/your.desktop
paste into the file:
[Desktop Entry]
Encoding=UTF-8
Name=My wallpaper
Exec=/bin/tlo
Terminal=false
Type=Application

Then reboot your OS.
Nothing is easy as it looks. Danielle Steel
Join #sparkylinux.org at [url="//irc.libera.chat"]irc.libera.chat[/url]

View the most recent posts on the forum