Archive for March, 2015

duplicate the current tab in Firefox

March 12, 2015 Leave a comment

Alt+d, then Alt+Enter (no need to release the Alt key)

Categories: firefox Tags:

disable “quiet splash” during boot

March 12, 2015 1 comment

Today my laptop froze and I switched it off with the power button. Well, after this it didn’t boot :( The splash screen appeared, but after a few seconds the HDD led stopped blinking and nothing happened. What’s wrong?

As long as you have that stupid splash screen, you won’t see what the problem is. Upon boot you can switch it off temporarily. In the GRUB menu choose “Advanced options”, then at the bottom you will see thet with “e” you can edit the commands (press “e”). Find the line that starts with “linux” and delete “quiet splash” at the end of its line. With CTRL-X you can continue the boot. (See this thread for screenshots.) Now you will see what the problem is.

In my case the root partition got corrupted a bit and had to run “fsck” on it manually. But I could only see this problem when the splash screen was deactivated. Fortunately it was nothing serious and my system is back to normal.

After this the first thing was to edit “/etc/default/grub” and remove “quiet splash” permanently (don’t forget to run update-grub after editing this file).

Categories: linux Tags: , , ,

Big Data

March 11, 2015 Leave a comment

Today I read the following on Reddit and it describes perfectly the hype around Big Data:

Big data is like teenage sex: everyone talks about it, nobody really knows how to do it, everyone thinks everyone else is doing it, so everyone claims they are doing it…

Categories: fun Tags:

An awesome book for Scala

March 10, 2015 Leave a comment

scalaI decided to learn Scala as a new language. I’ve heard a lot of good things about it. I looked at some basic stuffs in it and it seems to be a cool language. It’s based on the JVM, thus it stands on the shoulders of giants :)

I found an excellent book for learning it called “Scala for the Impatient” (Amazon link). Here you can download the first 9 chapters legally, and they nicely cover the basics that let you get started. I just finished the first chapter (13 pages) and it teaches you a lot. At the end of each chapter there are exercises, so you can test your knowledge and you have a feedback of your progress. I think a programming book without exercises is worthless.

Last week I started to work with the book “Programming in Scala” 2nd ed., which is written by the author of the language. I read the first four chapters (116 pages) but it goes in all directions. It talks about advanced stuffs at the beginning and it doesn’t explain the basics well. After the four chapters I had the impression that I still know nothing about Scala…

“Scala for the Impatient” seems better to my taste. I should buy the complete book.

[manjaro] /tmp is too small, cannot install new software

March 10, 2015 Leave a comment

I have a Manjaro virtual box and I ran into the problem that tmpfs is too small, thus /tmp has not enough space to install a new software.

I could increase the size of tmpfs with the following command:

$ sudo mount -o remount,size=2G,noatime /tmp

The previous size was 512 MB, now it’s 2 GB. After this I could install JDK 8 :)

Note that these settings are reset when you reboot the machine.

Categories: manjaro Tags: ,

edit crontab with emacs

March 8, 2015 Leave a comment

You can edit your crontab file with “crontab -e“. It worked fine as long as I used vim. However, when I switched to emacs and set the EDITOR environment variable to point to emacs, I couldn’t edit my crontab file normally. Emacs is started in the background and somehow it caused problems.

I made a script for editing my crontab file. This script sets EDITOR back to vim, thus “crontab -e” opens vim. Here is the script:

#!/usr/bin/env bash

# crontab_e

crontab -e

I call this script “crontab_e”, so it’s easy to remember its name.

Categories: bash Tags: , ,

set the desktop wallpaper under Xfce4

March 8, 2015 1 comment

You use the Xfce4 desktop environment (e.g. with Manjaro), and you want to change the desktop wallpaper from the command line.

Get the path of the current wallpaper:

$ xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitorLVDS-0/workspace0/last-image
/trash/wallpapers/hd_wallpapers_forbackground_2015.jpg  # sample output

Set the wallpaper to a new background image:

$ xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitorLVDS-0/workspace0/last-image -s PATH_OF_NEW_IMAGE

Where PATH_OF_NEW_IMAGE is the absolute path of the image you want to set (to avoid problems, use absolute paths).

Xfce properties
(This paragraph is based on this post). How to list Xfce channels and their properties:

for channel in $(xfconf-query -l | grep -e '^\s'); do echo "Channel: $channel"; xfconf-query -c $channel -l; echo ''; done

This will give you a full listing of all the properties of each channel. You can query the value of a property this way:

xfconf-query -c <channel> -p <property>

Update (20150731)
I wanted to use this method on another machine of mine and it turned out that the property to be set is called differently! If I want to set the background, instead of /backdrop/screen0/monitorLVDS-0/workspace0/last-image I had to set /backdrop/screen0/monitorDVI-I-2/workspace0/last-image. Great :( So here is my updated method:

First, query all properties that end with “last-image“:

$ xfconf-query -c xfce4-desktop -l | grep "last-image$"

Sample output on my machine:


Then set the value of each of these properties to the absolute path of the background image.

Categories: manjaro Tags: , ,