LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Blogs
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.
Old

Rather basic realization on scripting logic, it may be often better to let C programs do "excessive" work than trying to spare them w/ Bash

Posted 06-01-2023 at 12:29 PM by the dsc (linux-related notes)
Updated 06-01-2023 at 12:34 PM by the dsc

"C" stuff will be much faster than scripts, so sometimes even a "dumb" use of a C program will be more optimal (take less time) than trying to sort out a more minimal task for the C program with bash.

Like
Code:
 grep -h -m 1 THING-TO-GREP index_*
versus

Code:
 < ... some bash-script logic that tries to figure out the most likely index_NNNN files
 so grep has only to work with a few, not all ... > 

 grep
...
Member
Posted in Uncategorized
Views 77 Comments 1 the dsc is offline
Old

For those who don't like notify-send exhibiting its title ("notify-send") on LXQT

Posted 02-24-2023 at 06:03 PM by the dsc (linux-related notes)
Updated 02-24-2023 at 06:04 PM by the dsc

(Or anywhere using lxqt-notificationd, like in otherwise pure Openbox, which happens to be my case)

The "proper" way would be to have it always explicitly setting something else with "-a," but apparently one can emulate the title-less implementation of other notification daemons with an wrap-around script like this:

Code:
#!/bin/bash

if [[ ! "${@}" =~ "-a " ]] ; then

/usr/bin/notify-send -a ""
...
Member
Posted in Uncategorized
Views 73 Comments 0 the dsc is offline
Old

Generate random mixes of youtube playlists on some command line, to watch it on some browser

Posted 02-16-2023 at 10:10 AM by the dsc (linux-related notes)
Updated 02-16-2023 at 10:51 AM by the dsc

I eventually became somewhat youtube-dependent for media consumption, but I don't quite like the natural flow of youtube's algorithms' "play next" suggestions, which are probably even minimally bearable when I'm logged in.

So it can be interesting to have a shuffle of a series of chosen playlists to be played when we're doing whatever. The arguably best-ish way for doing it is to save YT playlists (the list of URLs, not the video files themselves) on disk, then do some bash/sed...
Member
Posted in Uncategorized
Views 169 Comments 0 the dsc is offline
Old

May be a valid solution for huge .xsession-error files

Posted 06-25-2022 at 03:57 PM by the dsc (linux-related notes)
Updated 06-25-2022 at 04:04 PM by the dsc

Having something like ~/.cache as a tmpfs, and setting up xsession-errors to be there.

Of course, everything will be lost in the next reboot, and, depending on for how long the session goes, it may be too big for the set-up tmpfs space as well, for the people who use their PCs on a never-really-turn-off/reboot kind of regimen.

If one needs eventually something saved from session to session, maybe one can have a daemon that will tail/pipe the xsession-errors to some...
Member
Posted in Uncategorized
Views 229 Comments 0 the dsc is offline
Old

If you prefer kdialog over "gtkdialog" on chrome-based browsers, you may need to uninstall xdg-portal-gtk, apparently

Posted 01-25-2022 at 04:29 AM by the dsc (linux-related notes)

It's likely there is a more proper way of doing it, not needing to uninstall, but I just lost my patience at this point.

Maybe still needs the non-GTK versions, a "neutral" one and a kde and a qt5 one, I can't really tell. I was about to uninstall them all, but occurred to me to try to uninstall just the gtk one, and voilá, I had kdialog on chrome-based-browsers again.


Why can't things be set by text files or environment variables with sane standards?...
Member
Posted in Uncategorized
Views 323 Comments 0 the dsc is offline

  



All times are GMT -5. The time now is 04:11 PM.

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
Open Source Consulting | Domain Registration