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

Getting back some python-2 functionality (pip) on Debian 11/bullseye

Posted 09-07-2021 at 09:28 PM by the dsc (linux-related notes)
Updated 09-07-2021 at 09:29 PM by the dsc
Tags debian, python2

If you don't actually know python enough to rewrite old scripts you use for python3, you may want to restore some functionality:

Code:
wget https://bootstrap.pypa.io/pip/2.7/get-pip.py
python2 get-pip.py
Then you'd use "pip2 install package"

From https://blog.emacsos.com/pip2-in-deb...-bullseye.html
Member
Posted in Uncategorized
Views 1042 Comments 0 the dsc is offline
Old

Simple idea for a debug verbosity tool on bash scripts

Posted 09-07-2021 at 09:06 AM by the dsc (linux-related notes)
Updated 08-05-2023 at 08:37 PM by the dsc
Tags bash, debug

I used to just have lots of "echos" around my scripts printing where it is on a loop or whatever, so I have a better idea of whats happening, often somewhat more clear than with "bash -x", even though that also may help, of course. But the odds are that I'd at some point just leave such debug echos there while the script runs on a daily basis on the background, just helping .xsession-errors to become enormous, for no good reason, since it's working and I'm not reading it. And...
Member
Posted in Uncategorized
Views 445 Comments 0 the dsc is offline
Old

Upgrading Debian 10 to Debian 11, three annoyances and a solution for one of them

Posted 09-06-2021 at 12:04 PM by the dsc (linux-related notes)
Tags gtk3

The good thing I've found is how to get away with GTK3's "animations," which make the UI render somewhat visibly slower even in other aspects (like browsing Geeqie's images), despite xorg.conf settings that give me the best performance, as assessed by gtkperf.

Code:
# [...]
# https://wiki.archlinux.org/index.php/GNOME/Tips_and_tricks#Disable_animations
# gsettings set org.gnome.desktop.interface enable-animations false
gtk-enable-animations=0
...
Member
Posted in Uncategorized
Views 452 Comments 0 the dsc is offline
Old

Xterm's title displaying current directory and running process, plus bash prompt also an abbreviated $PWD

Posted 08-19-2021 at 07:19 PM by the dsc (linux-related notes)
Updated 08-19-2021 at 07:41 PM by the dsc

Just found out, adapting from this answer on unix-stackexchange.

I had to adapt it somewhat because I already had "history -a" running all the time, so it would display it by default, which I don't like. Instead, the current directory would be better. So, the relevant bits of my ~/.bashrc are probably these, I think:

Code:
shopt -s histappend histreedit histverify cdspell dirspell no_empty_cmd_completion cmdhist checkwinsize autocd
...
Member
Posted in Uncategorized
Views 212 Comments 0 the dsc is offline
Old

Simple script-command to mount partitions by label

Posted 08-15-2021 at 02:43 PM by the dsc (linux-related notes)

Largely based on this answer on askubuntu. I hope nothing atrocious results from some situation where it ends up trying to mount something a given user should not, or something. May require tweaking either the script or one's sudo permissions for the commands doing the hard work, I don't know how "default" my settings are.

Code:
#!/bin/bash

echo ${@} | while read input ; do 

for label in /dev/disk/by-label/${input} ; do 

label=$(basename
...
Member
Posted in Uncategorized
Views 625 Comments 0 the dsc is offline

  



All times are GMT -5. The time now is 04:19 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
Open Source Consulting | Domain Registration