I have this script in ~/.X.d
BOOTCODES="$(cat /proc/cmdline)"
XEXEC="$(echo $BOOTCODES | grep -o 'xexec=".*"')"
if [ -n "$XEXEC" ] ; then
XEXEC="$(echo $XEXEC | sed 's:.*xexec="\(.*\)".*:\1:')"
else
XEXEC="$(echo $BOOTCODES | grep -o 'xexec=.*' | cut -d '=' -f2 | awk '{print $1}')"
fi
[ -n "$XEXEC" ] && sh -c "$XEXEC" &
It checks the boot codes for xexec= and, if found, executes whatever value it contains.
This can be useful if something should be executed on almost every boot, but with the possibility of excluding it from boot code if desired.
Of course, it's also possible to add anything to run it just for the current boot.
In my case, I start Firefox and a script that starts my 3G modem connection, so I have this in my boot loader's config:
xexec="firefox & /opt/net_connect.sh"
The thing is, if the 30-days I have payed for are over, I can still go online, but I would pay for the amount of downloaded data which is ridiculously expensive.
--
I think there are other solutions to this posted on the forum, but I couldn't find them right away so I came up with this.
As always, recommendations welcome.