Hacks by Ruddra

Manjaro Tips and Tricks

Manjaro Tips and Tricks

Recently I tried out Manjaro operating system, and did some experiment with XFCE and KDE desktop environments. Here I am going to share some tips and tricks to setup Manjaro in you machine.

This article is part of a series based on Manjaro. Tips shared here are applicable for all Manjaro desktop distributions. Now, let us dive in.

Copy bash history to ZSH

Lets say you are using bash for a long time, and now you have installed ZSH. All of a sudden all of your command history is gone, so you want to transfer you bash history to ZSH. You can do that using the following script(copy pasted from this snippet):

import sys
import time

def main():
    timestamp = None
    for line in sys.stdin.readlines():
        line = line.rstrip('\n')
        if line.startswith('#') and timestamp is None:
            t = line[1:]
            if t.isdigit():
                timestamp = t
            sys.stdout.write(': %s:0;%s\n' % (timestamp or time.time(), line))
            timestamp = None

if __name__ == '__main__':

Usage: you can run like this $ cat ~/.bash_history | python bash-to-zsh-hist.py >> ~/.zsh_history.

Backlight On using terminal

You can turn backlight from command prompt like this:

echo 2 | sudo tee /sys/class/leds/tpacpi::kbd_backlight/brightness

Install visual studio code(VS Code)

install VSCode using the following commands:

git clone https://aur.archlinux.org/visual-studio-code-bin.git
cd visual-studio-code-bin
makepkg -si

Another way is to use snap. Use snap install code --classic to do that.

Wireless headphone muddy sound fix

Wireless headphone setup/fix guide can be found here. But the most common problem is hearing muddy sound in wireless headphones, its due to lack of a2dp profile in bluetooth settings. You can do it by:

pacmd set-card-profile card_number a2dp_sink

More information can be found in this section of the Bluetooth Headset Article.

GPG verify key error fix

Sometimes when installing a package using pacman you will face an error GPG signature could not be verified, this means you are missing the required public key to verify that package or subpackage. So install that using:

gpg --search <key>
gpg --recv-key <key>

Package managers

There are serveral ways to install packages through package managers, Like

  1. AUR or build your own packages: AUR is the repository for softwares for Archlinux. You can install the packages using:

    git clone <package>
    cd <package-dir>
    makepkg -si // -sic

    You can install the following packages from AUR: 1. Dropbox: https://aur.archlinux.org/packages/dropbox/ 2. VSCode: https://aur.archlinux.org/packages/visual-studio-code-bin/ 3. Google Chrome: https://aur.archlinux.org/packages/google-chrome/ 4. Pulseaudio Bluetooth Module Git: https://aur.archlinux.org/pulseaudio-modules-bt-git.git 5. Pulseaudio A2DP Profile: https://aur.archlinux.org/packages/pulseaudio-bluetooth-a2dp-gdm-fix

  2. Pacman: It is the package manager for Archlinux. Basic usages are:

    sudo pacman -S <package>  # installing a package
    sudo pacman -R <package>  # uninstalling a package

    Here are some packages which can be installed using pacman: 1. docker 2. ifuse 3. usbmuxd 4. libplist 5. libimobiledevice 6. vsftpd 7. git 8. deluge 9. zsh 10. hugo

  3. Snap: Snaps are containerised software packages that are simple to create and install. It comes built it with Manjaro. Here are some basic usages:

    snap install <package>
    snap remove <package>

    Some packages which can be installed by snap: 1. Spotify: spotify 2. VSCode: code --classic

Bootstrap manjaro setup

Here are some gists containing useful scripts to bootstrap your manjaro setup with necessary packages:

  1. https://gist.github.com/gabrielmoreira/561ec9374e03567fa710
  2. https://github.com/hypnoglow/manjaro-bootstrap
  3. https://gist.github.com/ruddra/db73009f778c0d36ebe88a9c9006bcd1

IOS/Android file copy

Manjaro works well with andriod, but for IOS it does not have proper support(as there is no itunes). You can install the following packages to copy files from IOS:

sudo pacman -Syyuu ifuse usbmuxd libplist libimobiledevice

Rows and columns in workspaces

Although KDE has this sorted out, but XFCE has some issues with it(only one row, no columns). You can sort it out by:

xprop -root -f _NET_DESKTOP_LAYOUT 32cccc -set _NET_DESKTOP_LAYOUT 0,2,2,0

Backup and restore

As Archlinux is kind of bleeding edge thing, so updates might break your system, better to use a backup tool like timeshift.

Copy environment to other machine

You can use Aptik to do that but as its now a paid software, its upto you to decide if you want to use it or not.

Thats it for now. If you have any feedback or suggestion, then please use the comment section below.

Thanks for reading. I will see you in the next article.

Topics: Manjaro , Tips

Share Your Thoughts
M ↓   Markdown