5 ms·
I have a cron job which restarts my computer every day (Linux Mint Debian edition). I like waking up to a "fresh" computer, and since I know that it will restar
by dv35z 3mo ago
I have a cron job which restarts my computer every day (Linux Mint Debian edition). I like waking up to a "fresh" computer, and since I know that it will restart every day - this is a "forcing function" to (1) be diligent about saving things that are important, (2) treating browser tabs, random notes, etc as ephemeral, and bookmarking the important stuff.
I used to work at an office where we pair-programmed with clients all day (Pivotal Labs), and most of our computers had some sort of "automatically restart / restore from a known-good image". I liked this, as it resulted in less cruft over time, and some intentionality about what getting a computer into a productive state means. It also got me thinking of using automatic routines to accomplish goals, and not being so attached to my open tabs, etc. Let it gooo....
To be more specific about this - for those wanting to get into blogging/publishing, this could mean auto-opening the website project folder using VSCodium upon user login, so its ready to go for the morning coffee. More half the time I just close it - but as a "default", it makes it easy for me to do the thing I want to do.
sudo crontab -e -u root
#-----------------------------
# RESTART COMPUTER DAILY
#-----------------------------
00 04 * * * /usr/sbin/shutdown -r +5 "Rebooting in 5 minutes. Run 'shutdown -c' to cancel"
- artisinal 3mo agoA slightly more fun version: 0 0 * * * sleep $((RANDOM % 86400)) && /usr/sbin/shutdown -r +5 "Rebooting in 5 minutes. Run 'shutdown -c' to cancel"
- dv35z 3mo agoSome would say "Chaotic evil". Some would say "Always be prepared!!"
- artisinal 3mo agoChaotic evil is my favorite article from The Daily WTF: 12 22 * * * kill 21342
- kjellsbells 3mo agoSome would say, "Oh, Windows Update again"
- clickety_clack 3mo agoI’m glad _someone_ is working on bringing the windows experience to Linux!
- brettermeier 3mo agoThat is no longer up to date, Windows doesn't do it anymore (forced "random" updates with restart), at least in my experience. And I use it daily.
- Gigachad 3mo agoIf your computer has any kind of secure boot / boot chain attestation stuff going on, like all phones do now, rebooting clears out pretty much all malware. Software bugs can put the system in to a bad state which can be abused by malware, but none of it can persist through a reboot since everything is checked and measured from scratch during the boot.
- hnuser123456 3mo agoThis feels rather overstated. Your firmware check isn't going to tell you if a repo package installed/updated by your package manager got compromised, which is apparently increasingly common.
- Gigachad 3mo agoIt's more relevant on ios/Android where you can't through normal means install malware at the system level. Linux is moving in this direction with immutable OSs and better secure boot support but there isn't an easy way to have a secure linux desktop setup currently.
- Dylan16807 3mo agoOn phones malware is more restrained by the sandboxing. But now the reboot isn't necessary in the first place.
- Gigachad 3mo agoExploits break out of the sandbox for higher system access. Rebooting flushes them out because the exploits have abused some memory bug to load custom code in the system, but this can not persist a reboot since everything gets cyrptographically verified on boot. This is why things like the Nintendo Switch hacks and iphone jailbreaks have to be reloaded every time the system reboots, while they could modify the system files to try to persist the malicious code, it would simply leave the device unbootable since the boot chain attestation process would refuse to boot when the checksum doesn't match. The malware can only come back when the initial bug has been triggered again, through receiving a malicious text message attachment for example.
- ryangittins 3mo ago> Pivotal Labs RIP Pivotal Tracker, and thank you for your involvement! It was a nice piece of software.
- dv35z 3mo agoHoping someone will boot-up an open-source version. Linear seems to be the most popular alternative to Pivotal Tracker. What did you like most about Tracker? Thanks for the kind words!
- ryangittins 3mo agoAs I recall there wasn't an abundance of notice of Pivotal Tracker's sunset, but I did kind of expect someone to come up with a more 1:1 open-source replacement with a one-step migration tool. We looked at Linear and other options but ultimately ended up going with Shortcut. We wrote our own small migration script and moved over the old Pivotal IDs to keep as much historical context as we could. Shortcut's been a good tool overall, though I preferred Pivotal's Goldilocks level of compactness as far as the UI was concerned, as well as the general design. Pivotal's API was tidy and integrated nicely into our development process. We have some git aliases such as `git start <branch>` where the branch name will end with a story ID by convention. The alias would do the work of creating the branch, setting the remote to the dev's fork of our repo, marking the story as started, and assigning the dev as the owner. It saved a lot of manual steps, so thank you for your involvement in the project which allowed such a nice workflow!
- dv35z 3mo agoHere's a list of Pivotal Tracker-inspired tools. https://bye-tracker.net/ https://bye-tracker.net/ Some potentials: - Lanes: https://lanes.pm/ https://lanes.pm/ - Brooklyn Tracker: https://www.brooklyntracker.com/ https://www.brooklyntracker.com/ - Tracker Boot: https://trackerboot.com/ https://trackerboot.com/ - Story Time: https://storytime.team/ https://storytime.team/ I would love to see an open-source one exist, potentially using open formats like Markdown / SQLite which could run locally or on a network share, and could potentially "live" inside of the repository. I'm currently in LATAM, and often teach students - so having a no-cost tool which supports agile development would be so valuable (rather than having yet another tool to create a login for)
- weird-eye-issue 3mo agoRegarding browser tabs you can always just reopen Chrome and press control shift T to get your previous tabs even after a restart
- dainank 3mo agoIndeed! You can even configure it to open the last set of open browser tabs as per default, saving you a `ctrl+shift+T`.
- dspillett 3mo agoI have mine set to do this automatically, though it sometimes fails, I think after some updates (though I've not looked into it enough to be confident this is the pattern). In these cases reopening the tabs/windows with ctrl+shft+T reopens most, bit not always all of them, and the ones that are lost seem quite arbitrary (it might be something I've had open for days or longer, or something I was looking as a short time before restarting). PSA: Chrome's session restore function should not be trusted as a way of accurately maintaining state between restarts. I've not noticed the same with Firefox and Brave, though I don't currently use them as much (I'm slowly moving over to using mostly Brave or Firefox, I've not yet decided which…) so maybe they are no more reliable in this area.
- rf15 3mo ago> about what getting a computer into a productive state means Why would you do that? Is your OS not running stable? Do you not have tight control over the software that is running? Why are you unable to keep it in a productive state? Greetings from a Computer that only restarts for updates every few days, next to an airgapped machine that has been running for years.
- jcattle 3mo agoSomething something bit flips, something something stateful
- dv35z 3mo agoGood questions. For some "work" use-cases, it would be starting up Email, password tool (Bitwarden), team chat (Slack), browser (with a few tabs already open). I am trying to get into a habit of writing/publishing, so I've got my own web-page that pops up at login, along with the code/text editor that allows me to start writing. Every individual will have their own set of "things I click on / open while sipping coffee, getting the computer into a productive state". In the team / consulting environment (where we would pair-program, often with different people day-to-day), the computer would start with task tracker / backlog (at the time, Pivotal Tracker, now it would be something like Linear), team knowledge base for the project area. Under the hood, it would load up common shortcuts, terminal aliases, etc. ---- I often work with multiple clients, so something I've always wanted to do is have something close to "one Linux user per client", so that there isn't "contamination" between them. I haven't figured a great way to do this, but think of it a system-wide version of Chrome's switchable profiles.
- rf15 3mo agoThank you for putting in the time to produce this answer. Amazing and unorthodox way of using the user system, I haven't even considered that. I can see that being useful.
- deepsun 3mo agoOne more forcing function I really like is to mount a tmpfs folder, and put all browser downloads there. (Or I think making your ~/Downloads a symlink to /tmp/Downloads would do the same). That way you don't clutter the Downloads, and catalogue anything important. The unimportant is recycled on each restart.