Fedora-OSTree-Setup-dev / Fedora-OSTree-Setup

Glorified scipt that automates the setup of Fedora Silverblue/Kinoite based on given config file.
GNU General Public License v3.0
7 stars 3 forks source link

Autostart the program after initial reboot to complete the remaining tasks #24

Open boredsquirrel opened 1 year ago

boredsquirrel commented 1 year ago

KDE Plasma and Gnome should support the ~/.config/autostart/ folder.

but other distros need a workaround: (Link, UnixStackexchange)

printf """#!/bin/sh

shopt -s nullglob # Ensure shell expansion with 0 files expands to an empty list, rather than trying to read the "*.sh" file

if [ -z "$XDG_CONFIG_HOME" ]; then
    XDG_CONFIG_HOME=~/.config
fi
for f in "$XDG_CONFIG_HOME/autostart-scripts/"*.sh; do
    test -x "$f" && . "$f" || true
done""" > ~/.scripts/autostart.sh

printf """[Desktop Entry]
Exec=~/.scripts/autostart-exec.sh
Icon=system-run
NotShowIn=KDE
Terminal=false
TerminalOptions=
Type=Application""" >/etc/xdg/autostart/exec-autostart/workaround.desktop

This may be completely irrelevant for Silverblue / Kinoite, but good for waydroid people.

iaacornus commented 1 year ago

this is autostart for?

iaacornus commented 1 year ago

what's this for? @trytomakeyouprivate

boredsquirrel commented 1 year ago

This is an autostart script autostarting scripts from the autostart folder XD

We should keep that out, its only relevant if Fedora starts shipping a Distro not KDE or GNOME, not supporting that folder.

iaacornus commented 1 year ago

This is an autostart script autostarting scripts from the autostart folder XD

We should keep that out, its only relevant if Fedora starts shipping a Distro not KDE or GNOME, not supporting that folder.

for systemd services can be used, or systemd timers, although still unsure what needs to be autostarted aside from the program itself after reboot to continue the tasks