Skip to content

Instantly share code, notes, and snippets.

@k-amin07
Last active January 17, 2021 21:52
Show Gist options
  • Save k-amin07/d9dff461e8c96bc3b7e67105b4d94fa8 to your computer and use it in GitHub Desktop.
Save k-amin07/d9dff461e8c96bc3b7e67105b4d94fa8 to your computer and use it in GitHub Desktop.

A collection of guides for some tasks in Linux.

Index Title
1. Mounting ISOs
2. Disable WebRTC in Firefox
3. Merge Title and Tab bar in Firefox
4. KGet integration in Chrome
5. SDDM not starting fix
6. Dolphin Terminal
7. Kvantum Theming fix on Artix
8. Watching Youtube videos in terminal (ASCII)
9. Mount NTFS partition on boot
10. Using different wallpapers on each virtual desktop in KDE

1. Mounting ISOs:

To mount an ISO file, issue the following commands.

mkdir /mnt/iso
sudo mount /path/to/iso /mnt/iso

If the mounted iso is smaller in size or has files missing, use this instead:

sudo mount -o loop /path/to/iso /mnt/iso

2. Disable WebRTC in Firefox:

When using custom DNS, this would prevent DNS leaks.

  1. Write “about:config” into your browser bar and hit Enter.
  2. You will be prompted with a warranty warning. Click on “I accept the risk!”.
  3. Search for “media.peerconnection.enabled”.
  4. Double click on it so that the value changes to “false” and the status changes to “modified”

3. Merge Title and Tab bar in Firefox:

While pretty straight forward to do in other browsers, merging the tab bar with title bar is not an option in firefox settings. It can be enabled as follows:

  1. open about:config
  2. set browser.tabs.drawInTitleBar to true

4. KGet integration in Chrome:

Kget is a download manager for KDE plasma. It has a hassle free integration with the KDE browser Konqueror but not with other browsers. Here is how to integrate it with Chrome.

  1. Clone this repository.

  2. Open terminal and navigate to the cloned repository.

  3. Run:

    cp kget-integrator /usr/bin/kget-integrator && chmod +x /usr/bin/kget-integrator

    sudo cp Conf/com.kgetdm.chrome.json /etc/opt/chrome/native-messaging-hosts

  4. Open chrome://extensions

  5. Click Load unpacked

  6. Select kget-integrator/chrome folder

  7. Copy extension ID from chrome

  8. Edit /etc/chromium/native-messaging-hosts/com.kgetdm.chrome.json

  9. Paste the following in the file. Replace <Extension ID Goes here> with the extension ID:

    "allowed_origins": [

    "chrome-extension://<Extension ID Goes here>/"

    ]

  10. Do not remove the last '/' after the extension ID. Save the file. KGet should work with Chrome now.

5. SDDM not starting fix:

I once accidentally removed mesa-git package which resulted in SDDM (Simple Desktop Display Manager/login screen) to not start. To fix it, do the following:

  1. Press ctrl-alt-f2 to get a terminal.
  2. Enter login credentials.
  3. Type nmtui and press Enter to get a terminal based network manager interface.
  4. Use nmtui to connect to the Internet.
  5. Run sudo pacman -S mesa
  6. Reboot.

6. Dolphin terminal:

Pressing f4 in Dolphin file manager opens the terminal which changes directory with Dolphin.

7. Kvantum Theming fix on Artix

Some themes were not being applied properly on Artix (KDE). To fix it, remove qt5-styleplugins using pacman. artix-gtk-presets and artix-qt-presets depend on it. Remove them too.

8. Watching Youtube videos in terminal (ASCII):

A cool little tool to play youtube videos in terminal using ASCII art.

  1. Install mpv from git
  2. Install youtube-dl package from pacman: sudo pacman -S youtube-dl.
  3. Run the command after replacing with the video URL you want to play: env CACA_DRIVER=ncurses mpv -quiet -vo=caca "<Video url goes here>"

9. Mount NTFS partition on boot:

Linux usually does not mount an NTFS formatted drive on boot. To make it automatically mount the drive on boot, do the following.

  1. Create a file in a location of your choice. I usually use /usr/local/bin by issuing the command: sudo touch /usr/local/bin/ntfs-mount

  2. Add the following lines to the file. #!/bin/bash

    gio mount -d /dev/sdb4

  3. Run chmod +x /path/to/this/script. Replace path with your path (/usr/local/bin in my case).

  4. There are several ways of making this script run automatically at boot. I use autostart feature in KDE system settings. Go to settings, find autostart, click add and select the script.

10. Using different wallpapers on each virtual desktop in KDE

  1. Install Vallpaper.
  2. Right-click desktop, select Configure Desktop and Wallpaper.
  3. Change wallpaper type to vallpaper.
  4. Select one or more picture as the picture source.
  5. Rinse and repeat for all virtual desktops.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment