LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Blogs > linux-related notes
User Name
Password

Notices


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.
Uncategorized Entries with no category
Old

Silent pulse audio output detection/indication, with bash + arecord

Posted 10-02-2016 at 03:16 AM by the dsc (linux-related notes)
Updated 10-02-2016 at 03:19 AM by the 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
...
Member
Posted in Uncategorized
Views 320 Comments 0 the dsc is offline
Old

Bash xdotool+wmctrl "daemon" that maximizes "almost maximized" windows

Posted 10-01-2016 at 07:16 PM by the dsc (linux-related notes)
Updated 12-16-2016 at 04:04 AM by the dsc
Tags openbox, wmctrl

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:

Code:
while true ; do sleep 3
...
Member
Posted in Uncategorized
Views 449 Comments 0 the dsc is offline
Old

Script to watch potentially misbehaving processes and kill them if needed

Posted 09-30-2016 at 10:09 AM by the dsc (linux-related notes)
Updated 10-02-2016 at 02:04 PM by the dsc (small improvements / bug fixes)
Tags cpu, hang, kill

A second adaptation of an adaptation of this script:
http://searchenterpriselinux.techtar...sses-with-Bash

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 think...
Member
Posted in Uncategorized
Views 204 Comments 0 the dsc is offline
Old

Autostart script method to fix the GTK3 scroll-warp feature-bug

Posted 09-27-2016 at 07:41 PM by the dsc (linux-related notes)
Updated 09-27-2016 at 07:44 PM by the dsc

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:

Code:
! grep warps-slider $HOME/.config/gtk-3.0/settings.ini && echo "gtk-primary-button-warps-slider = false" >> $HOME/.config/gtk-3.0/settings.ini
But that of course only works after a new login (not mentioning...
Member
Posted in Uncategorized
Views 329 Comments 0 the dsc is offline
Old

Poor, but acceptable, work-around to the lack of image previews for XCF and ORA (maybe other formats as well)

Posted 09-18-2016 at 10:35 PM by the dsc (linux-related notes)
Updated 09-18-2016 at 11:58 PM by the dsc
Tags gimp, ora, xcf

Apparently there isn't much system-wide preview support for formats such as XCF and ORA. It used to be better at some point, at least when KDE was mostly QT4, at some point I had fancy thumbnail previews of everything. Everything! Gwenview apparently was also at some point able to preview ORA and maybe the others, but I've never seen that.

So, unfortunately I'm not a programmer or anything, so I can only look for poor man's solutions like a script that converts such files into more...
Member
Posted in Uncategorized
Views 626 Comments 2 the dsc is offline

  



All times are GMT -5. The time now is 06:43 AM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration