Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
i3 - shutdown as user after some time, comfortably
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
CooSee
Veteran
Veteran


Joined: 20 Nov 2004
Posts: 1438
Location: Earth

PostPosted: Mon Sep 13, 2021 9:50 pm    Post subject: i3 - shutdown as user after some time, comfortably Reply with quote

hello,

never used i3 before and i like it more and more, while using it with polybar.

i always watch some flix on a streaming site with chromium only and i use a terminal with su to shutdown the computer after some time, e.g shutdown -P +120.

( shutting down over polybars powermenu also don't work somehow :roll: )

now, sorry for such a noob question, but is there a comfortable way to initiate a pause on currently running stream with a mouse klick, close chromium without killing it and shutting down after some time and all this as the current logged in user, without sudo on openrc system:?:

thx
_________________
" Die Realität ist eine Illusion, die durch Mangel an ehrlicher Kommunikation entsteht "
---
" Der Mensch ist von Natur aus neugierig, was am Ende übrig bleibt ist die Gier "
Back to top
View user's profile Send private message
Irets
Apprentice
Apprentice


Joined: 17 Dec 2019
Posts: 222

PostPosted: Mon Sep 13, 2021 10:30 pm    Post subject: Reply with quote

I don't know how you'd automate that (someone else ought to know), but if you use elogind on your system, you may control your computer's power state with loginctl <state>.
For example, on my system loginctl poweroff powers off the machine without prompting for a password or require logging into root.

More on that at https://wiki.gentoo.org/wiki/Elogind
Back to top
View user's profile Send private message
CooSee
Veteran
Veteran


Joined: 20 Nov 2004
Posts: 1438
Location: Earth

PostPosted: Mon Sep 13, 2021 10:50 pm    Post subject: Reply with quote

Irets wrote:
I don't know how you'd automate that (someone else ought to know), but if you use elogind on your system, you may control your computer's power state with loginctl <state>.
For example, on my system loginctl poweroff powers off the machine without prompting for a password or require logging into root.

More on that at https://wiki.gentoo.org/wiki/Elogind


can i give loginctl a time designation ?
_________________
" Die Realität ist eine Illusion, die durch Mangel an ehrlicher Kommunikation entsteht "
---
" Der Mensch ist von Natur aus neugierig, was am Ende übrig bleibt ist die Gier "
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21602

PostPosted: Tue Sep 14, 2021 1:18 am    Post subject: Reply with quote

According to the output of loginctl --help, yes:
Code:
  poweroff [TIME] [WALL...] Turn off the machine
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum