Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Just annotations of little "how to's", so I know I can find how to do something I've already done when I need to do it again, in case I don't remember anymore, which is not unlikely. Hopefully they can be useful to others, but I can't guarantee that it will work, or that it won't even make things worse.
Posted 10-02-2016 at 03:16 AM bythe dsc (linux-related notes)
Updated 10-02-2016 at 03:19 AM bythe dsc
You can "grep" something at /proc or whatever that tells whether there's some sound theoretically being played, but it will give a false positive when "silent sound" is being played.
A clumsy hack along these lines can detect "silent audio" as silence:
Code:
while true ; do
arecord -d 1 -D pulse > /dev/shm/test-audio 2>&1
cut -c 300- /dev/shm/test-audio | grep -a [[:alpha:]] > /dev/null && echo sound
I find annoying that, for whatever reason, it seems that some windows get "almost maximized" (I have the impression that some browsers do that by "design", even though I'm not sure), and then I end up clicking in a desktop pixel instead of the scroll bar or something. In my case that action is assigned to show the desktop/minimize all windows.
So here's what I just came up with so far, for a 1280x1024 resolution:
The original adaptation was supposed to put any misbehaving process under cpulimit leashes, I'm not sure it's working properly. I've made a more radical implementation intended for programs that are more likely to misbehave and probably hang with high cpu, when killing them after a while seems to be a good idea.
I'm not aware of there being something like a "gtk-3.0-settings.d" to preserve settings.ini options between theme changes (including involuntary ones), so that's a work-around method, adding that to the session auto-start script:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.