The One with the Thoughts of Frans

Archive for Linux

Bash autocomplete broken?

There’s the obvious check if bash-completion is installed, but what I didn’t realize is that .bashrc needs to contain a few things as well. If you lost it, the simple solution, at least in Debuntu, is as follows:

cp /etc/skel/.bashrc ~/

CommentsTags: ,

GUN Tar

A while back a typo evaded me. GNU Tar is a utility originally conceived for writing (t)ape (ar)chives, a type of backup, whereas GUN Tar presumably doesn’t exist. Even if it did, it wouldn’t have anything to do with the GNU part of the equation.

Curious about the prevalence of this typo, I quickly found some unrelated but very interesting pictures. A guntar is a a combination of a gun and a guitar — obviously. 😉

Btw, there’s a picture of a guntar here (via)

a guntar, a guitar with a hunting rifle on it

a guntar, a guitar with a hunting rifle on it

Here’s a random video of Frank Klepacki playing some songs from Red Alert on his “Vengeance” guitar. I’m not really into guitars, but they can be quite interesting visually.

The typo itself is actually surprisingly rare. I searched for "gun tar" -guns -military -shot -shoot -shooting -foam but it’s still showing a lot of noise. Only one result was about GNU Tar, namely and embarrassingly, the typo made it into a published book: Utilizing Open Source Tools for Online Teaching and Learning: Applying Linux. Adding an extract at the end, i.e., "gun tar" -guns -military -shot -shoot -shooting -foam extract greatly improves on the ratio of typo results.

CommentsTags: , , ,

Geany Regex Replace

Geany has a nice story about named matching groups in the manual, but those don’t seem to work in the actual find & replace dialog. Instead, you can refer to them by number. Less convenient, but generally workable.

I’ll give you a concrete example. I copied my list of games from Humble Bundle to be able to examine them better locally. I didn’t see an obvious way, so I just copied them from the website (by deactivating the user-select: none CSS property). Long story short, I ended up with a list like this:

Anomaly Korea
11 bit studios

Anomaly Warzone Earth
11 bit studios

Another World
DotEmu

Aquaria
Bit Blot

Avadon: The Black Fortress
Spiderweb Software

BIT.TRIP BEAT
Gaijin Games

Blackwell 1: Legacy
Wadjet Eye Games

Blackwell 2: Unbound
Wadjet Eye Games

Blackwell 3: Convergence
Wadjet Eye Games

Bladeslinger
Kerosene Games

Bridge Constructor
Merge Games

Using the regex pictured above, that turns into this:

Anomaly Korea;11 bit studios

Anomaly Warzone Earth;11 bit studios

Another World;DotEmu

Aquaria;Bit Blot

Avadon: The Black Fortress;Spiderweb Software

BIT.TRIP BEAT;Gaijin Games

Blackwell 1: Legacy;Wadjet Eye Games

Blackwell 2: Unbound;Wadjet Eye Games

Blackwell 3: Convergence;Wadjet Eye Games

Bladeslinger;Kerosene Games

Bridge Constructor;Merge Games

After optionally stripping out the double newlines (replace \n\n with \n), you can save the file as a .csv and open it in Calc. And there you have it. My complete list of Android games:

CommentsTags: , , , ,

Run Enpass on Debian Buster (testing)

Steam is working problem-free these days, unlike last year, but a recent update broke Enpass. Hopefully it’ll be fixed again soon, but in the meantime:

OPENSSL_CONF=/etc/ssl/ /opt/Enpass/bin/runenpass.sh

Otherwise you’ll have to contend with this fun error:

$ /opt/Enpass/bin/runenpass.sh
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
QLayout: Attempting to add QLayout "" to QPasswordEdit "", which already has a layout
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
Auto configuration failed
140475586791488:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library:dso_dlfcn.c:185:filename(libssl_conf.so): libssl_conf.so: cannot open shared object file: No such file or directory
140475586791488:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244:
140475586791488:error:0E07506E:configuration file routines:MODULE_LOAD_DSO:error loading dso:conf_mod.c:285:module=ssl_conf, path=ssl_conf
140475586791488:error:0E076071:configuration file routines:MODULE_RUN:unknown module name:conf_mod.c:222:module=ssl_conf
QMutex: destroying locked mutex
Segmentation fault!

Comments (1)Tags: ,

Steam Scaling on Linux

Since I don’t use Steam that much I don’t know when it was added, but it’s nice that Steam is no longer tiny on my UHD monitor.

CommentsTags: ,

Is Thunar the first Gtk file browser to implement breadcrumbs almost right?

The biggest issue with breadcrumbs in Nautilus and Nemo is that suddenly you can only reach the full path by pressing the keyboard shortcut Ctrl + L or with too precise clicking somewhere far from where you need to be. Thunar has always shared this problem, but it looks like it was silently fixed in the 1.8.x release. (That is, I couldn’t find anything about it in the NEWS file.)

Note how everything to the right of the breadcrumbs is a giant button to activate location entry. Very elegant. Next, let’s have some “Open terminal here” on the breadcrumbs!

CommentsTags: ,

Three-finger middle click on modern touchpads in Xfce

I went with a mildly deceptive clickbait title since this is generic, not specific.

The simplest way is to add synclient TapButton3=2 to your ~/.bashrc:

echo synclient TapButton3=2 >> ~/.bashrc

CommentsTags:

Mimic Windows Touchpad Gestures in Xfce with libinput-gestures

Windows and Mac have added some conveniences over the past decade that I’m missing to some degree, also see my post on mimicking Windows snap hotkeys in Xfce. There’s something called libinput-gestures, supposed to be an interim solution but it is nonetheless extremely useful. The website contains installation instructions but here’s the rundown based on my installation notes.

libinput-tools is a required package to install for people like me who use Debian and derivaties, xdotool is to automate X11, mostly through faking keyboard presses. Docs here.

sudo apt install libinput-tools xdotool

Compile and install the actual program:

git clone http://github.com/bulletmark/libinput-gestures
cd libinput-gestures
sudo make install

Copy the global config to your user dir so you don’t need sudo to edit:

cp /etc/libinput-gestures.conf ~/.config/libinput-gestures.conf

Ensure you have permission to read input from the touchpad:

sudo gpasswd -a $USER input

NB Normally if you’re not a part of a group by default it’s for sensible security reasons. In this case you’re giving more programs access to your input so the negative implications are fairly self-evident.

The program can now be controlled through the libinput-gestures-setup command. You probably want to set it up to autostart:

libinput-gestures-setup autostart

While playing around with the configuration you’ll probably be using libinput-gestures-setup restart a fair bit.

As the docs say, log out of your session and log back in (or just restart) to make it work.

There are some default gestures of possible use, but I’d rather keep it closer to Windows insofar as I don’t dislike what it does to reduce disconnects when switching between systems. As such I’d stick with three finger swipe up (away from yourself) to mean window switching. For example, if you have Nimbler or something equivalent installed you can use xdotool to trigger it, whether through the default F10 or my preferred Alt+`. On various systems you also have overviews similar to Windows and Exposé. Of course I’d be remiss if I didn’t point out that as far as I know Compiz Scale preceded it, but that aside.

gesture swipe up 3	xdotool key F10
gesture swipe up 4	xdotool key alt+F1

That Alt+F1 is to trigger the global menu in Xfwm. It’s just something I’ve got in there as an experiment. We’ll see how it goes.

Should you decide to use the default gestures for back & forward in the browser, you still have to customize them because they go in the wrong direction by default. Left is back, not forward, and vice versa.

gesture swipe left	xdotool key alt+Left
gesture swipe right	xdotool key alt+Right

It’s a little rough around the edges but definitely a lot better than nothing.

Useful links

Comments

Sort Folders Before Files in the Gtk3 Filechooser

It’s quite simple to do but surprisingly hard to find. Mixed files and folders confuse me. They seem disorganized.

CommentsTags: ,

How To Play Mark of the Ninja on Debian Stretch

To resolve the weird “ERROR: Missing required OpenGL extensions,” set the environment variable force_s3tc_enable=true.

force_s3tc_enable=true ./start.sh

An alternative, more permanent solution consists of isntalling libtxc-dxtn-s2tc:

sudo apt install libtxc-dxtn-s2tc

Thanks to the game’s forum.

CommentsTags: ,

Older Entries »