Missing Libraries While Compiling DWM in Debian 8 Jessie

While compiling dwm – dynamic window manager in Debian 8 “jessie”, I got the following error:

dwm.c:33:28: fatal error: X11/cursorfont.h: No such file or directory
compilation terminated.
make: *** [dwm.o] Error 1

and

dwm.c:40:37: fatal error: X11/extensions/Xinerama.h: No such file or directory
compilation terminated.
make: *** [dwm.o] Error 1

The catch here is libx11-dev and libxinerama-dev packages are needed to compile dwm and that’s the workaround for the error messages. Therefore installing these packages using the following command fixed the issue:

apt-get install libx11-dev libxinerama-dev

Instaling Fonts in Debian Without Any GUI Tool

One-click-fonts-install GUI utility for installing fonts like gnome-font-viewer are available in Debian. But installing fonts without using any GUI tool is much for straightforward and fun. You just need to copy the fonts in a specific directory in which Debian would search for fonts to use. That’s all.

Debian searches for fonts in some specified directories. The directories are specified in /etc/fonts/fonts.conf file. You can open this file in your system to see which directories holds the fonts. Usually, /usr/share/fonts, /usr/X11R6/lib/X11/fonts, /usr/local/share/fonts, etc. directories hold fonts which are available system wide. Better yet, use ~/.fonts directory that would make the fonts available only for your account or userid. Understandably this .fonts directory resides in your home directory, the path being ~/.fonts, or /home/your_userid/.fonts. Therefore, copy the fonts you would use in this directory to make them available for your user account or userid.

Say, a directory named font_collections holds your desired fonts. Open terminal from this directory and execute the following command to copy all the fonts from this directory to .fonts directory in your home folder:

cp * ~/.fonts

The * (asterisk) character used here acts as an wild card; meaning it denotes every file in the specified directory. Assuming your font_collections directory holds only fonts, the above command would copy all of them in  ~/.fonts.

If your font_collections directory holds fonts and other files, then you can mention every fonts file by their extension and copy only them with the following command:

cp *.ttf ~/.fonts

Assuming your fonts are in ttf (True Type Font) format.

You can also copy the fonts without being in the directory that holds the font. Just use the following command format:

cp /path/to/the/directory/that/holds/fonts/* ~/.fonts

That would do the job of copying fonts. Now, you have to re-generate fonts cache file to make your system aware of the updated ~/.fonts directory. Open terminal and execute the following command:

fc-cache -fv

This would make the fonts available for you. Open any text/word processing application, and see the fonts appear in that application, and use them, of course!

Setting Wallpaper Using Feh in Openbox

feh is a fast, yet powerful command line image viewer. It’s a swiss-army-knife for images, and fits perfectly for setting wallpaper in openbox window manager. You can choose it to set wallpaper in openbox, instead of those GUI-based tools and get the job done with ease.

To set a wallpaper using feh, open the terminal emulator and execute the command in the following format:

feh --bg-scale /path/to/the/image/file

Wallpaper can be set in any scaling options: tile, center, fill, max or scale. Replace scale in the above command with any scaling option you like.

Mention the path of the image file replacing /path/to/the/image/file in the above command.

Once you’ve set wallpaper using feh, it creates a .fehbg file in your home directory. The path is understandably ~/.fehbg.

To have the wallpaper there that you’ve set using feh every time you login, or when you begin a new session, add the following line in your ~/.config/openbox/autostart script:

sh ~/.fehbg &

This would make your wallpaper appear evey time you start a new session.

How to Format a USB Drive With FAT32 File System in Debian or It’s Derivatives

It’s not like FAT32 is superior to EXT4 or something. But the thing is, you cannot easily use EXT4 file system in Windows. That’s why, when you have to work cross-operating system, you would better go with FAT32; at least for now. Maybe EXT4 or later version would be the de facto file system in future for both world.

However, to format a USB device in FAT32 file system format, insert the USB drive, open terminal window and execute the following command:

lsblk

This would show you all the block devices for your system. Find your USB device from the list, based on either the name or size, or both. Find it anyway. In my case, my USB device was in /dev/sdc. So I executed the following command in terminal:

sudo mkfs.fat -F 32 -I /dev/sdc

This did the job for me. If your device is located in /dev/sdXX, then execute the command accordingly.

For mkfs.fat to work, you need dosfstools to be installed in your system. dosfstools come pre-installed in Debian. If your Debian derivative distro doesn’t come with dosfstools pre-installed, which is unlikely, then execute the following command to install it first, and then execute the previous command to format your USB device.

sudo apt-get install dosfstools

No Sound in quodlibet in Debian 8 jessie Xfce

After a fresh installation of Debian 8 jessie Xfce edition everything was working just fine, except the sound in quodlibet player. Sound was working just fine in VLC player and others, but not in quodlibet. I just couldn’t hear anything while playing songs in quodlibet player. The solution was simple though. I installed gstreamer1.0-alsa package and the sound was working again.

Open the terminal and execute the following command:

sudo apt-get install gstreamer1.0-alsa

This would solve your sound problem in quodlibet player.

How to Play MP3 Songs Using gmusicbrowser in Xubuntu 15.04

Xubuntu doesn’t come with necessary codecs pre-installed to play mp3 files due to some legal restrictions in some countries. To be able to play MP3 files in gmusicbrowser, install the gstreamer0.10-plugins-ugly package using terminal emulator. Open terminal and execute the following command:

sudo apt-get install gstreamer0.10-plugins-ugly

After this is complete, you’ll be able to play mp3 music files in gmusicbrowser. Enjoy!

Firefox Hacks That’ll Make Your Browsing and Online Presence More Secure

You’re not secure online; your privacy is at risk. You can make your online presence more secure by doing some Firefox tweaks. Firefox is considered to be more secure than its counterparts e.g. Google Chrome, Chromium, Opera and other proprietary web browsers.

Courtesy for this post goes to privacytools.io

First of all, here are some about:config tweaks that will help you making your online presence more secure:

  • Type about:config in your Firefox address bar and press the Enter key.
  • Click on the button I’ll be careful, I promise!
  • Search for media.peerconnection.enabled and make its value false.

This will disable WebRTC. WebRTC is a new communication protocol that relies on JavaScript. It can leak your actual IP address from behind your VPN.

  • Search for privacy.trackingprotection.enabled and make its value true

This is Mozilla’s new built in tracking protection.

  • Search for geo.enabled and make its value false

This will disable geolocation.

  • Search for browser.safebrowsing.enabled and make its value false

It disables Google Safe Browsing and phishing protection. It’s a security risk, but improves privacy.

  • Search for browser.safebrowsing.malware.enabled and make its value false

It disables Google Safe Browsing malware checks. It’s a security risk, but improves privacy.

  • Search for dom.event.clipboardevents.enabled and make its value false

It disables that websites can get notifications if you copy, paste, or cut something from a web page, and it lets them know which part of the page had been selected.

  • Search for network.cookie.cookieBehavior and make its value 1

It disables cookies. 0 = accept all cookies by default; 1 = only accept from the originating site (block third party cookies); 2 = block all cookies by default

  • Search for network.cookie.lifetimePolicy and make its value 2

It deletes cookies at the end of the session. 0 = Accept cookies normally; 1 = Prompt for each cookie; 2 = Accept for current session only; 3 = Accept for N days

  • Search for browser.cache.offline.enable and make its value false

It disables offline cache.

  • Search for browser.send_pings and make its value false

The attribute would be useful for letting websites track visitors’ clicks.

  • Search for webgl.disabled and make its value true

WebGL is a potential security risk.

  • Search for dom.battery.enabled and make its value false

Website owners can track the battery status of your device.

Now, add the following addons on your Firefox. These will boost your security. And of course, don’t take my word for it. Read through each of them before use. It’s recommended!

  • Disconnect

Disconnect was founded in 2011 by former Google engineers and a consumer-and privacy-rights attorney. The addon is open source and loads the pages you go to 27% faster and stops tracking by 2,000+ third-party sites. It also keeps your searches private.

  • uBlock Origin

uBlock Origin is an lightweight and efficient blocker: easy on memory and CPU footprint. The extension has no monetization strategy and development is volunteered. OS: Firefox, Safari, Opera, Chromium. AdBlock Plus is not recommended because they show “acceptable ads”. The system behind that white list is lacking transparency.

  • Random Agent Spoofer

Random Agent Spoofer is a privacy enhancing Firefox addon which aims to hinder browser fingerprinting. It does this by changing the browser/device profile on a timer.

  • Self-Destructing Cookies

Self-Destructing Cookies automatically removes cookies when they are no longer used by open browser tabs. With the cookies, lingering sessions, as well as information used to spy on you, will be expunged.

  • HTTPS Everywhere

HTTPS Everywhere is a Firefox, Chrome, and Opera extension that encrypts your communications with many major websites, making your browsing more secure. A collaboration between The Tor Project and the Electronic Frontier Foundation.

These security tweaks and addons don’t guarantee your ultimate privacy and security. Security and privacy are myth these days. These will only make you more secure. That’s all.