Hi there!
I am not sure if this is the right place to post this question, but this was the only sub-forum I found with a reference to scripts.
I am running open-rc and would like to change my wallpaper (automatically) before shutdown, but my searches result in almost exclusively systemd cases.
I will appreciate any tips, maybe links ?
Thanks in advance!
I guess you have to write openrc
wallpaper_change script, put it in /etc/init.d and add it to shutdown runlevel:
sudo rc-update add wallpaper_change shutdown
@Ambie : Thanks for prompt answer!
This was exactly the info I was looking for. I will now start looking into how to write the script.
This may be of help:
http://openrc.run/
I wrote a script and placed it in ''/etc/init.d/':
~$ less /etc/init.d/byt_wallppr.sh
#!/bin/sh
sudo xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitorLVDS1/workspace0/last-image -s /usr/share/backgrounds/xfce/paltanen.jpg
Tried to add it to shutdown runlevel:
~$ sudo rc-update add /etc/init.d/byt_wallppr.sh shutdown
* rc-update: service `/etc/init.d/byt_wallppr.sh' does not exist
changed perms:
$ sudo chmod 770 /etc/init.d/byt_wallppr.sh
still:
$ sudo rc-update add /etc/init.d/byt_wallppr.sh shutdown
* rc-update: service `/etc/init.d/byt_wallppr.sh' does not exist
~$ ls -l /etc/init.d/byt_wallppr.sh
-rwxrwx--- 1 root root 147 17 feb 21.56 /etc/init.d/byt_wallppr.sh
Don't know what. Is there anything wrong with my script? Have I missed any typo????????
Wonder whether it would be better to move this thread to subforum Open-rc and in that case how does one move it?
That's not a valid openrc script.
It needs to call openrc-run with the shebang a la
#!/usr/bin/openrc-run
This is one I use to call another script which sets up my fans at boot
#!/sbin/openrc-run
name=$RC_SVCNAME
command="/usr/local/bin/fanspeed"
command_args=""
pidfile="/run/${RC_SVCNAME}.pid"
depend() {
after modules
}
It could be better I guess as openrc complains about it at shutdown but it works.
It might make more sense to pick a new wallpaper at boot rather than shutdown as openrc will be terminating things and unmounting.
You could just use rc.local to run your command if you struggle with the script.
Thanks
@gripped !!!!! Had been searching for this info for a couple days!
I will try at boot.