this post was submitted on 30 Jul 2026
32 points (92.1% liked)

Linux

66746 readers
922 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 7 years ago
MODERATORS
 

Hello,

I am looking for a program that can force me to stop using Linux when I need to do something else, like eating dinner or going to bed.

This time enforcement could be as simple as changing the user password and then logging me out at a certain time (of course it should also change the password back later)

It should also require a password (different from the user password) to change its settings or uninstall it, so that I can't tamper with it in a weak moment.

Is there such a program for Linux?

top 27 comments
sorted by: hot top controversial new old
[–] comrademiao@piefed.social 12 points 2 days ago (3 children)

Why’re you wording this as if the act of using Linux is what’s addictive? Lol

[–] Remy@lemmy.today 1 points 15 hours ago (1 children)

Not necessary the operating system it self, but the things I do with Linux, like researching stuff, enganging in discussion's and playing games, are addictive for me

[–] comrademiao@piefed.social 1 points 8 hours ago (1 children)

Researching what? Engaging what? What aspect of this has to do with Linux?

[–] Remy@lemmy.today 1 points 4 hours ago

I do them with Linux, why is this so hard to understand?

[–] Cysioland@lemmygrad.ml 1 points 1 day ago

I've done three lines of AUR and injected some systemd today but I can quit anytime I want, I promise

[–] eldavi@lemmy.ml 0 points 1 day ago

how is it not addicting? lol

[–] barryamelton@lemmy.world 9 points 2 days ago* (last edited 2 days ago) (1 children)

Starting from version 50, Gnome (the desktop stack) has screen time block configurable in the settings. So it's just built-in if you use Gnome.

[–] Remy@lemmy.today 1 points 1 day ago

Will it be possible to set multiply block times?

[–] Cyber@feddit.uk 18 points 2 days ago

Not a direct answer for you, but a different approach.

Psychologically the carrot is better than the stick, meaning you'll keep fighting the lock-out mechanism, eventually resenting it and removing it.

Having an alert to remind you that you wanted to stop will be more pursuasive. (I have a "go to bed" alarm with a gentle, gradually increasing volume on my phone)

What's even better is tying a habit you want (eating, going to bed, etc) into another habit which already exists, but obviously, I don't know you well enough to suggest anything specific, but perhaps something else happens near those times you want to stop and that'll help?

[–] sudoer777@lemmy.ml 5 points 2 days ago (1 children)

Pipe /dev/random to passwd for your user and put it in a chron job, then have another chron job that echos your original password back

[–] JamesBoeing737MAX@sopuli.xyz 4 points 1 day ago (1 children)

That sounds like a great way to permanently lock yourself out.

[–] communism@lemmy.ml 3 points 1 day ago

It wouldn't permanently lock you out if it failed because you can boot into a live ISO to change your password back if it fails to change it back to your original password.

[–] solrize@lemmy.ml 15 points 2 days ago* (last edited 2 days ago) (2 children)

cron job that launches the lock screen at the specified time and unlocks it later?

My idea for this has always been a battery powered computer, where the battery gets charged by a pedal powered generator. So I can use the computer as much as I want, but I have to at least get some exercise to keep it running.

[–] anotherspinelessdem@lemmy.ml 10 points 2 days ago

but I have to at least get some exercise to keep it running.

Fuck that's brilliant

[–] Remy@lemmy.today 2 points 2 days ago (1 children)

cron job that launches the lock screen at the specified time and unlocks it later?

Is there a way to only allow changing it when entering a password (that is different from the user password)

[–] solrize@lemmy.ml 2 points 2 days ago (1 children)

Yes the cron job would run as root.

[–] Remy@lemmy.today 2 points 2 days ago* (last edited 2 days ago) (1 children)

So I can't stop it or change it because it has a higher rank and a different password then my main user?

[–] solrize@lemmy.ml 2 points 2 days ago (1 children)

Usually the password is different, yes. If you're unfamiliar with Linux system administration you might ask for more specific help. Root is the administrative account that lets you add and delete user accounts, access all the system's files, and that sort of thing. Ultimately though, it's like the joke about how many psychiatrists it takes to change a light bulb (just one, but the light bulb has to want to change). If you want to break through your time limiting software, you will find a way to do so. So you have to be willing to go along with it.

[–] Remy@lemmy.today 1 points 2 days ago

I think if it will take longer then 5 minutes to circumvent it, then I will do the right thing

[–] CallMeAl@piefed.zip 10 points 2 days ago (2 children)

I haven't personally used it but I think that is what pam_time is for.

[–] Remy@lemmy.today 1 points 2 days ago (1 children)

Is this the Github of it: https://github.com/linux-pam/linux-pam ?

Could I pam_time root or something that has a higher rank and a different password then my main user?

[–] RIotingPacifist@lemmy.world 3 points 2 days ago (1 children)

You can prevent root login entirely using sudo and no root password.

Of course you could then override your init to give you a root shell, which you could avoid by having a grub and bios password.

But you'd be able to reset the bios password if you have physical access anyway.

[–] Remy@lemmy.today 1 points 15 hours ago

As I only use sudo to update my system, I could use a user that doesn't has sudo access and set up some a cron job to do updates once a day. And flatpak instalation and updating doesn't require sudo at all

[–] SingularEye@lemmy.blahaj.zone 1 points 2 days ago

looks right

[–] panda_abyss@lemmy.ca 6 points 2 days ago

Write a script that installs one random AUR package a day.

Then you’ll either never be able to leave, or distrust your system forever and want to spend less time on it.

[–] MangoCats@feddit.it 5 points 2 days ago (1 children)

It all depends on how "forced" you want to be.

Generally, in Linux, if you've installed it, you have the power to uninstall it. Once your lockout gets put in effect, you can boot from USB, mount the hard drive, modify the files necessary to bypass your lockout, then reboot and proceed as if your lockout didn't exist.

Given that perspective: wouldn't a nag reminder popping over your screen that you actually pay attention to be better than "locking your account" with locks so easily picked?

[–] Remy@lemmy.today 1 points 2 days ago

It all depends on how “forced” you want to be.

I would say: It should take at least 3 minutes (better more) to circumvent it.

Generally, in Linux, if you’ve installed it, you have the power to uninstall it. Once your lockout gets put in effect, you can boot from USB, mount the hard drive, modify the files necessary to bypass your lockout, then reboot and proceed as if your lockout didn’t exist.

This sounds like it would take me around 10 minutes, so its enough for me to stop and do what I should be doing instead.