Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Any app or applet can easily power off specified device?
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
fpemud
Guru
Guru


Joined: 15 Feb 2012
Posts: 349

PostPosted: Mon Mar 11, 2013 2:20 am    Post subject: Any app or applet can easily power off specified device? Reply with quote

I want to power off or suspend some device on my computer in some scenarios.
I can do this by writing values to sysfs files manually, but its very inconvenient.
Writing a script is better, but it's vulnerable to hardware change.

Is there some app or applet that auto detects hardware devices and show me a list, then I can power them off by simple mouse click?
Back to top
View user's profile Send private message
avx
Advocate
Advocate


Joined: 21 Jun 2004
Posts: 2152

PostPosted: Wed Mar 13, 2013 3:00 am    Post subject: Reply with quote

Not ready made, at least not that I know of.

But, you could write a script using things like lspci, lsusb or whatever you require for your hardware to be identified. On top of that, you can add a simple GUI using tools like f.e. zenity (gtk) or kdialog (qt) or whatever you see fit for your environment.

Depending on how complex you want/need the UI to be, 5-20 lines of simple bash should suffice, plus whatever you need to identify the hardware.
_________________
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.
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