The One with the Thoughts of Frans

Archive for Operating Systems

kdenlive: use a background color clip for composite and transform transition

A quick little note on kdenlive: to use the composite and transform transition it needs something to composite to. Just the regular black background won’t do. I normally only use color clips for colors other than black, so I was a touch confused by the transition not working.

If you don’t know how to add one, it’s in the top left (or wherever you put the project bin).

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:

KOReader Beta 20180602

As one of the maintainers of KOReader, a versatile a document and image viewer for E Ink devices, I’m proud to announce the latest release.


This release debuts the new KOReader logo, courtesy of @AliLozano. We’re very happy with it!

koreader-logo

MuPDF has been updated to version 1.13, which means there is now basic support for tables in EPUB in that rendering engine.

We’d like to thank all contributors for their efforts. Some highlights include:

Full changelog

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: ,

Mimic Windows Snap Hotkeys in Xfce

It’s quite simple. Open Settings → Window Manager → Keyboard. Then find the various “Tile window to the…” options. Finally, pick your desired keys.

You can’t make it function quite as smoothly as in Windows 10, but it certainly helps.

Of course you can also just drag the window against the side of the screen with the mouse. But sometimes the keyboard is faster.

CommentsTags: ,

KOReader Beta 20180410

As one of the maintainers of KOReader, a versatile a document and image viewer for E Ink devices, I’m proud to announce the latest release.


This release significantly improves usability on non-touch devices thanks to @onde2rock. @dengste dotted the i’s and crossed the t’s of natural light support by implementing an automatic setting for warmth. KOReader now also supports the Pocketbook Inkpad 3 (PB740). Last but not least, this release debuts an AppImage for Linux desktop computers.

Besides the emboldened introduction, there’s been a small change with big consequences. KOReader will now start in CoverBrowser view by default (#3834). If you want to change to a different view, choose the file browser menu (top left) → Display modeClassic/Mosaic/Detailed.

Automatic warmth

NB Only the Kobo Aura One and the Kobo H2Ov2 support warmth. The new automatic warmth settings look like this:

automatic_warm

So what is this “AppImage”?

Simply put, it’s a portable app for Linux, which has been a long-standing request (#1417). After you download the file, you’ll first need to allow it to run as a program. You can do so by right clicking in your file manager, choosing PropertiesPermissions and checking the box that reads Allow this file to run as a program or something equivalent. If you prefer to use the terminal, run chmod +x koreader-appimage-x86_64-linux-gnu-v2015.11-1644-ge39ed90_2018-04-09.AppImage.

The AppImage is a release version of what we KOReader developers call “the emulator.” It has existed since all the way back in 2011 to ease the development process. Until the past few weeks it didn’t have any of the regular desktop amenities, but I’ve added a few over the past weeks. The improvements include dragging and dropping a file onto the window to open it, a title that indicates the currently opened file, a basic albeit imperfect form of window resizing and a filechooser dialog accessible through Ctrl + O. For now the filechooser will only work if your system has Gtk3 installed.

Because the AppImage is built on top of the emulator, you can set default window sizes and DPI through the command line. EMULATE_READER_W=2000 EMULATE_READER_H=1500 EMULATE_READER_DPI=180 ./koreader-appimage-x86_64-linux-gnu-v2015.11-1644-ge39ed90_2018-04-09.AppImage. You could also try out other debugging aids such as EMULATE_READER_FLASH=100. There’s also another more practical use besides just reading documents: you could use the AppImage to verify whether a bug is specific to your device or if it’s inherent in the program.

All of the improvements I mentioned above, such as dragging a file onto the window, were merely part of making the emulator easier to use. There’s not much point to emulating the limitations of a Kindle or a Kobo if you’re just trying to figure out why a document crashed the program! But a better emulator is also a better desktop app. What actually pushed me over the edge into creating the AppImage, which was surprisingly easy in spite of the somewhat sprawling yet vague documentation, was @onde2rock‘s efforts to make the program properly usable on the Kindle 4NT and other older non-touch devices.

After the program became usable without touch, I thought it’d be a fun experiment to implement game controller support (#3819). The control scheme is depicted below, and you can use it in the AppImage. It’s currently equivalent to the functionality offered by the Kindle 4NT.

It might sound slightly odd, but it’s rather nice to just lean back with a gamepad while having some document on your screen. I implemented it as a half joking “wouldn’t it be cool if…” but it turned out to be a killer feature, at least to me. It’s what made me think that having KOReader easily available as a desktop app just might be a worthwhile endeavor.

Gamepad button Action
1 Left stick & d-pad Arrow keys (menu navigation)
2 Right stick Page up & down
3 A button Press/enter (also opens bottom reader menu)
4 B button Escape/back
5 Left bumper Page up
6 Right button Page down
Start/Menu button (not shown) Open menu

We’d like to thank all contributors for their efforts. Some highlights include:

Full changelog

CommentsTags:

Fix “sign_and_send_pubkey: signing failed: agent refused operation”

Thanks to gnome-keyring you won’t get a useful error message. If you uninstall it, you’ll get the real culprit right where it matters, but in retrospect ssh-add gives you the same error message:

$ git pull upstream master 
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for '/home/frans/.ssh/id_rsa' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key "/home/frans/.ssh/id_rsa": bad permissions
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

That means something like this, or maybe just read:

So much for the GitHub help. 🙂

Comments

Less Noise and Louder Voice from Low Quality Microphone in Audacity

The basic problem: the various mics I own are all pretty terrible in their own way. This is how to lift it from unacceptable to bad, but similar principles apply to better mics as well. This post is dedicated to those who don’t put up annoying video tutorials lasting several minutes. Admittedly I could’ve recorded and uploaded this in a few minutes rather than the ten or so it took me to write this post, so that probably explains.

Disclaimer: I’m not an audio recording hobbyist, or I would have at least a low-end reasonable mic like the BM-800. This merely describes something incredibly basic I should’ve done last year with the integrated audio recorded by a Sony HDR-CX280E camera.

I’m not sure whether the mic on my phone or the one on my webcam is the best for voice. I think it might be my webcam, so that’s what I used for these samples.

The Recording

I recorded the phrase, “Etymologically, harvest and herfst are the same word.” (See here.)


Pretty terrible. This is how I sound on Skype.

Noise reduction

Luckily Audacity is clever enough to filter out noise. Select some noise, EffectNoise Reduction… and click Get Noise Profile. Then make sure to select the whole track, or at least everything where you want to apply the noise filter, and actually do it.


Compressor

The final step is to apply a compressor, again through the Effect menu.


Limiter

Finally, you could consider limiting your finished audio file. In this case it doesn’t really do anything but it can prevent clipping.


CommentsTags:

Older Entries »