• 5 Posts
  • 165 Comments
Joined 7 months ago
cake
Cake day: March 31st, 2024

help-circle














  • 2 notes.

    Timers are not needed luckily, you can but the timer in the .service file and call it a day. I love chatGPT for that as the syntax is annoying.

    sudo cat > /etc/systemd/user/rsync-backup.service <<EOF
    [Unit]
    Description=do rsync backups with some conditions
    # After=network-online.target
    
    [Service]
    Type=oneshot
    # require a power connection (optional)
    # ExecStartPre=sh -c '[ $(cat /sys/class/power_supply/AC/online) = 1 ]'
    
    # require battery over 40%
    # ExecStartPre=sh -c '[ $(cat /sys/class/power_supply/BAT0/capacity) -ge 40 ]'
    
    # require the connected network to NOT be "metered"
    # ExecStartPre=sh -c '! $(nmcli -t -f GENERAL.METERED dev show | grep -q 'yes')'
    
    ExecStart=/home/user/.local/bin/rsync-backup
    # you might add everything you need
    # ExecStart=/path/to/something/else
    
    # delete old logs (disabled for testing)
    # ExecStartPost=rm -f /var/log/rsync-backups.log
    # log the updates
    # ExecStartPost=sh -c 'echo "Last backup: $(date)" > /var/log/rsync-backup.log'
    # write errors to log
    StandardError=file:/var/log/rsync-backups.log
    
    # GUI message
    #ExecStartPost=/usr/bin/notify-send -t 0 -a "Backup" "rsync backup finished." "$(output of some command if you want infos about the backup)"
    
    # run with low priority, when idling
    # Nice=15
    IOSchedulingClass=idle
    
    # when conditions were not met, try again after 15 minutes
    # Restart=on-failure
    # RestartSec=900
    
    [Timer]
    OnCalendar=daily
    Persistent=true
    
    [Install]
    WantedBy=multi-user.target
    EOF
    

    That is a slightly modified variant of my automatic rpm-ostree system updates which took an hour or so with the help of ChatGPT and a lot of testing around.

    Systemd services are lit.

    If you add a “repeat when conditions are not met” you need another timer to start it. Like 2 loops, one big loop to start the process, and one small loop to keep trying until conditions are met. I do that with my system updates to prevent them being done

    • with low battery (or even using an AC requirement)
    • over a metered network
    • when the system is busy


  • I think their concept is just as flawed as “dash to dock”. Desperately trying to “not be Windows” (while mimicking mac lol)…

    You have a huge top bar that is mainly unused space. You have no hitbox at the top right edge, because of the bad GNOME decorations (also in Firefox) and because of that stupid top bar.

    Then having a dock with empty space around it, where you could easily fit clock, quicksettings and menu, why??

    Dash to panel fixes most, just not the bad hitboxes to the top edge. And luckily it is very actively maintained.

    Ubuntu meanwhile keeps that useless top bar and also places a bar at the edge. This is good for regular screens. But it is annoying when tiling in half.

    And they dont fix it, as they still keep the silly top bar.

    And the main issue is their theming, which breaks apps.







  • To my knowledge they did some horrible “performance” fixes like disabling Windows Defender.

    Windows requires you to install random software. If you are really careful, you could live without antivirus, but honestly just dont.

    If your PC doesnt tolerate the overcomplicated Windows 11, any Linux distro is lighter.

    I recommend to give Fedora Kinoite a shot. It is a very modern distribution model.

    Fedora Discussion is a good resource for help, and I am always down to fix the small Kinoite issues like video codecs or flatpaks.