Misc
Below is assorted software-related stuff and pacthsets which never got into upstream. Primarily for my own use, but feel free to grab whatever you wish.
Working gimp-python for Debian 11 (Bullseye)
Diagnostic hallmark of problems with your favourite scripts – Gimp’s screaming on the console about wrong python version of missing gimpfu import. The reason behind is that bullseye dropped python2 and Gimp does not know python3 yet, therefore maintainers dropped gimp-python package, which provided API for pythonic scripts.
These instructions made my python scripts (esp. python-fu) work again with Gimp under Debian 11 (bullseye). It’s not bulletproof your scripts might use more broad set of functions. Note also that these are not instruction for newbies - they can break other things in your distro later - namely having python2 as default and mixing python-pkg-resources version from buster is invitation for troubles. So you should do it only if gimp-python scripts are absolutely necessary and you know what you are doing or how to fix forthcoming problems. You have been warned...
- Make "python" command available again/set it to python2 by choosing from these candidates:
apt-get install python
apt-get install python-is-python2
- Download from packages.debian.org the buster version of .deb files below (amd64 is here for my convenience, you should not probably trust anonymous binaries from here ;) Then install them (ordering matters, also no guarantees that some additional deps from *bullseye* aren’t missing, I was not working from vanilla system).
dpkg -i libffi6_3.2.1-9_amd64.deb
dpkg -i python-gobject-2_2.28.6-13+b1_amd64.deb
dpkg -i python-pkg-resources_40.8.0-1_all.deb #bullseye will try to update this one later
dpkg -i python-numpy_1.16.2-1_amd64.deb
dpkg -i python-cairo_1.16.2-1+b1_amd64.deb
dpkg -i python-gtk2_2.24.0-5.1+b1_amd64.deb
dpkg -i gimp-python_2.10.8-2_amd64.deb
If dpkg fails while you experiment, it’s good to know about this one: apt --fix-broken install . Bullseye will try to update python-pkg-resources later, in my test update did not broke the scripts here, but YMMV. You can alway use apt-mark hold to fix older version if necessary.
Important note: You have to remove all the python2 packages (esp. python-numpy) before upgrading to Debian 12! Otherwise you’ll upgrade process will fail in the middle with manual hard-to solve dependecy problems.
Working gimp-python for Debian 12 (Bookworm)
The same warning applies as for Debian 11 recipy. Don’t mess with your system unless you know how to deal with dependency breakages. The manual installs of the deps above (Deb 11) won’t work anymore. If you are ok with loosing python3-numpy on your system (there is file collision with python-numpy) this worked here:
- allow (add) *buster* repositories in /etc/apt/sources.list && apt-get update
deb http://ftp.cz.debian.org/debian/ bullseye main contrib non-free
deb http://deb.debian.org/debian-security/ bullseye-security main contrib non-free
deb http://ftp.cz.debian.org/debian/ bullseye-updates main contrib non-free
- apt-get install gimp-python
- comment buster repositories in /etc/apt/sources.list && apt-get update
BiBtex style for the journal Cerebral Cortex.
The original file was provided by Rajeev Raizada and was slightly edited to fix small interpunction issues. At this stage it’s mainly @article bibtex entry tuned, but you can easily change the rest.
Patchset against LyX 2.3.x/2.4.x
- Viewing external URLs via context menu
- Error checking of missing citations and references
- encrypting pathnames of images in xHTML export
- allow external launchers for citation inset (i.e. view pdf belonging to the citation)
- Various small UI bits
Patchset against mutt 1.5
- Persistently deleted threads (any new msg in deleted thread automatically gains D flag)
- Read-thread stays in msg-read mode and jumps to next thread
- Automatic jump to new msg
Patchset against Eterm 0.9.5
- Sanitize CZ dead keys
- Binding external script to URLs
BFS-like movement through directories
Like your ’cd’ bash command, except it searches through the directory structure to find the given nearest directory/file. Starts in your current directory and crawls in a wave-like manner through adjacent sup/subdirectories (breadth-first search).
By default
- it does not crawl above your home directory (unless started outside it)
- it’s case insensitive
- only prefix instead of full name is needed
- all above can be trivially changed on command line, just check via “jp --help”.
For proper functioning you will need to add lines like the below to your .bashrc (or .profile or similar file loaded by your default shell):
function jp { cd "`j "$@"`"; }
function jf { eval "`jj "$@"`"; }
- Directory search: source Find & cd to a given directory.
- File search (cd into directory where given file was found.
Configuration file
.jp in your home will help you to setup excluded names and suffixes in the search.
Commandline examples:
$ jp dir #cd to closest dir starting with ’dir’, e.g. ../dir/i/dont/remember/directory
$ jp dir. #cd to closest dir containing name ’dir’
$ jp dir= #cd to closest subdir starting with ’dir’
$ jf fil #cd to closest dir containing file which name starts ’fil’
$ jf fil/ #cd to closest dir containing file which name starts ’fil’ and immediately open it in vi(m)