Use HTTP Clients with SOCKS Proxies (or SSH Tunnels) on GNU/Linux

On GNU/Linux, it is easy to create SOCKS proxies using programs such as ssh or tor. However, many applications on GNU/Linux, such as LibreOffice and genymotion (up to the date on which this post is written), can be configured to directly use HTTP proxies (or web proxies), but not SOCKS proxies. In this post, we will use privoxy, a non-cache web proxy, to enable these applications to use SOCKS proxies.

Continue reading

Enable Auto Completion for pip in Zsh

Pip is a package management system for installing and managing Python software packages. To enable auto completion for pip in zsh, the documentation of pip suggests adding the following line to ~/.zshrc:

eval "`pip completion --zsh`"

However, merely having this line would not enable auto completion for pip3. To enable auto completion for pip3 as well, add the following line after the line above:

compctl -K _pip_completion pip3

Enable Natural Scrolling for Trackpads Using libinput

Libinput is a library to handle input devices in Wayland and X.Org. It can be used as a drop-in replacement for evdev and synaptics in X.Org, and it is supported by a wide range of desktop environments, including GNOME and Xfce. In this post, we will see how to enable natural scrolling for trackpads using libinput. We will also leave mouses alone, i.e., no natural scrolling for mouses.

First, we need to know the name of the trackpad to enable natural scrolling for. This can be easily known by executing xinput --list. My output includes the following:

⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ bcm5974                                   id=13   [slave  pointer  (2)]

It is easy to see that my trackpad is bcm5974.

Continue reading

Send Git Patches Using GUI Email Clients

Git is a popular version control system that manages many impacting open source projects. Many of these projects, such as Linux kernel, zsh, GNU Emacs, etc. require patches and pull requests to be sent to their mailing lists. This can usually be done via git send-email or git imap-send, which, however, often takes a large amount of configuration and headaches for many people to make it work for the first time. Here, I propose a new approach to send git patches via email with GUI email clients, such as Thunderbird, Evolution, Claws Mail and Apple Mail.

Continue reading