Syndicate content
By Linux Geeks, For Linux Geeks.
Updated: 3 hours 3 min ago

Discard – Enables discard/TRIM on freed blocks

Sat, 2014-09-20 18:01

Wrote earlier about Fstrim, now let’s learn about discard. This works in most common Linux os out there, like Fedora, Foresight, Arch, Ubuntu, Opensuse, Centos and alot more.


Enables discard/TRIM on freed blocks. This can decrease performance on devices that do not support queued TRIM command, like SATA prior to revision 3.1. Alternatively, you can run fstrim command periodically.

Discard is the linux term for telling a storage device that sectors are no longer storing valid data and applies equally to both ATA and SCSI devices. ie. For ext4 filesystems, there is a discard mount option, not a trim or unmap option..

Historically this feature has not existed, but recently SSD manufacturers have requested this ability to increase the performance capability of their designs and SCSI array manufacturers have requested similar functionality to better support thin provisioning.


Other people support that discard parameter in kernel does the job better than fstrim,

other people that is has problems and slows down the system. I don’t know what is the most accurate.

If you want to test discard option rather than fstrim , you can set it in grub by editing a file called /etc/default/grub .

Again, with your preferred editor open the file and search for the line begins with


sudo gedit /etc/default/grub

and add the discard option there. Just leave a space and write discard. Don’t remove or change anything else.

The line could be become something like:

GRUB_CMDLINE_LINUX=" vconsole.font=latarcyrheb-sun16 $([ -x /usr/sbin/rhcrashkernel-param ] && /usr/sbin/rhcrashkernel-param || rhgb quiet discard"

Save the document and

you have to regenerate grub.conf for the changes to take effect

sudo grub2-mkconfig -o /boot/grub2/grub.cfg


Categories: FLOSS Project Planets

Map/Reduce with Bash – The Unix Philosophy in Action

Sat, 2014-09-20 12:47
Need Linux Training? Talk to us!

At the recent Software Freedom Day 2014 event we presented on an interesting solution we developed to a particular "business" problem we were ask to assist with. At the core the issue was how to create a map/reduce framework using only bash and command line tools for a 900 node cluster.

The Unix Philosophy

For us this became a stunning example of the power of the Unix design philosophy. The "Unix philosophy", as it is known, is an architectural approach adopted by the creators of Unix in the early years of the development of that family of operating systems which emphasizes a modular design, the creation of  single purpose utilities and tools which can be combined in different ways to produce solutions to many diverse problems.

Bash and Linux Utilities Combine for an Awesome Solution

In our proof-of-concept solution we eventually made use of GNU parallels, parallel ssh, Linux capabilities and cgroups. Cgroups, Linux capabilities and name spaces are features of the Linux kernel, some of which have been around for years, but are only now beginning to realise their potential, which will propel a whole generation of innovation on the Linux platform going forward. Docker is the one current example of this.

We indeed live in interesting times!  

Map Reduce with Bash - An Example of the Unix Philosophy in Action from Jumping Bean
Categories: FLOSS Project Planets

Fstrim – discard unused blocks on a mounted filesystem

Fri, 2014-09-19 18:48

fstrim is used on a mounted filesystem to discard (or “trim”) blocks which are not in use by the filesystem. This is useful for solid-state
drives (SSDs) and thinly-provisioned storage.

By default, fstrim will discard all unused blocks in the filesystem. The mountpoint argument is the pathname of the directory where the filesystem is mounted.


It’s very easy to create your own relevant script in this directory if you want fstrim to be executed once a week. fstrim is installed by default in Fedora 20 and FL20.

We will create a script to run once a week.

Create the script

Open your favorite editor and create a script inside /etc/cron.weekly/ directory.

sudo gedit /etc/cron.weekly/trim

Copy and paste inside the following content


#!/bin/sh # call fstrim to trim all mounted file systems which support it set -e LOG=/home/$USER/trim.log echo "*** $(date -R) ***" >> $LOG exec /usr/sbin/fstrim -v / >> $LOG


Above script will execute fstrim in root direcrory (/) only. In case you have a separate /home (or any other separate directory, under another partition) and you want to run fstrim there as well, you have to add it separately. Like

exec /usr/sbin/fstrim -v /home >> $LOG

Save the document and give execute permissions

sudo chmod 755 /etc/cron.weekly/trim

Test the script,

sudo /etc/cron.weekly/trim

if it works you will see a trim.log file in your /home directory where it indicates some information about trimming.

Categories: FLOSS Project Planets

Atleast one new blog post every day

Fri, 2014-09-19 15:22

Hello everyone that are following this blog. I’m aiming to atleast post one blog post every day. It can be from an application installation to different howto guides. If you want to see more of something, leave a comment and I can try to keep in mind to write more about that.

I hope you want to see more blog posts, but doesn’t care so much about the quality sometimes.

Categories: FLOSS Project Planets

Bad Voltage Season 1 Episode 25: On a Stick With No Fripperies

Fri, 2014-09-19 09:00

Bryan Lunduke, Jono Bacon, Stuart Langridge and myself present Bad Voltage, in which we discuss the wonderful products of the Jimmy Dean sausage empire, have unexpected bouts of poetry, lunch each other with frippery, and also discuss:

  • The final installment of the Bad Voltage Reverso Debate, which, due to a tie in the last installment, results in an awkward three-way. Jeremy and Jono are donating to Charity:Water as a result, and we are looking to raise $1500 from the Bad Voltage community to help – go and donate! (2.30)
  • Stuart reviews the EZCast and evaluates whether he can use it to rock the conference circuit on his phone (21.58)
  • We crown the winner of the Bad Voltage Mashed Voltage competition who wins a piece of tat from each member of the team. Go and listen to all the entries (33.27)
  • We cover work/life balance and discuss where the burden of responsibility is between the employer and employee in ensuring people have the balance right (39.32)

Listen to 1×25: On a Stick With No Fripperies

As mentioned here, Bad Voltage is a new project I’m proud to be a part of. From the Bad Voltage site: Every two weeks Bad Voltage delivers an amusing take on technology, Open Source, politics, music, and anything else we think is interesting, as well as interviews and reviews. Do note that Bad Voltage is in no way related to, and unlike LQ it will be decidedly NSFW. That said, head over to the Bad Voltage website, take a listen and let us know what you think.


Categories: FLOSS Project Planets

How to enable the logout option in gnome shell

Fri, 2014-09-19 03:50

The pull down menu in gnome shell at the upper right only shows a “Power Off” option. Logout is not an option. It’s possible to enable it and being able to logout instead.

Option 1

You can use a gnome extension to fix it.


Option 2

Open Terminal and write:

gsettings set always-show-log-out true


This way you will have a logout option in the menu.

Categories: FLOSS Project Planets

libreoffice 4 – Using Gnome Theme

Thu, 2014-09-18 03:07

Some might see that Libreoffice 4.0 doesn’t use the System Fonts and Colors of your System. Because you need a X Window System font support for Pango.

You need to install a package called pangox-compat. Open terminal and check if you have it installed:

conary q pangox-compat

If it’s not installed, then you can install it.

sudo conary install pangox-compat


This works in other Linux os too, like fedora, arch and others.

This is not an issue as default, but as soon you change theme to something else, the issue might appear. It’s not an issue in Cinnamon.

Categories: FLOSS Project Planets

Maxthon – Fresh Browser to try in Foresight Linux 3

Wed, 2014-09-17 11:27

Iv’e been fixing a new web browser for all users that are trying out Foresight Linux 3. It’s called Maxthon Browser. Based on Chromium and comes with pre-installed pepper-flash and much more. Here is some features:


Maxthon Cloud Browser for Linux

Maxthon Cloud Browser for Linux brings high performance and seamless browsing along with its core values of speed and a great out of the box experience. With speed and performance, Maxthon for Linux runs on an optimized WebKit core made faster by Maxthon’s in-house Webkit R&D team. That, on top of the world’s leading javascript engine — V8 – translates into lightning-fast page rendering that is evident at every stage of your surfing. Native, encrypted and free cloud features allow you to easily encrypt and share your Favorites, Quick Access and Magic Fill Data across your different devices using Maxthon. Maxthon for Linux stands apart from the minimalist, no-feature ethos common to most major browsers.

Maxthon Passport
  • A free service that allows you to encrypt and share your Favorites, Quick Access and Magic Fill Data across your different devices using Maxthon.

  • Personalized Quick Access: Set and arrange a ‘speed dial’ of your most-commonly-visited websites.
  • Mouse Gestures: execute common browser commands like ‘forward, back and reload’ by ‘drawing’ a gesture with your mouse.
  • Easy Tab Management: Right and left click close and reload last tabs visited.

Popular Tools
  • Last Session: Easy access to a page detailing your last browser session — to more easily return to your sites.
  • ‘Restore Last’ – button: One click and your browser will restore and reload your last closed tab.
  • Magic Fill: An AES 256 level encrypted password and user account prompt.

Elegant Design
  • All of this comes with an elegant design that evokes and follows the design and usability conventions from other Maxthon browsers on other platforms.



Read all about installation here:

Categories: FLOSS Project Planets

How to manage startup applications in GNOME 3

Wed, 2014-09-17 03:03

One way is to use gnome-tweak-tool, but only for a predefined set of applications. So it’s not optimized to use that application. Use gnome-session-properties instead. Open terminal and write


This way you can setup which applications should start with your computer. Will save you some time, also a great way to disable useless applications for your computer.

This works in Foresight Linux 3, Fedora 19, Fedora 20 and upcoming Fedora 21.

Categories: FLOSS Project Planets

Close lid without go hibernation – Linux

Wed, 2014-09-17 01:48

Many users wants to be able to close their lid without hibernation. Some users wants to use hibernation when the powercable isn’t in only. So we will show you how to change the way it acts when you close your lid on your laptop.

This works in Foresight 3, Fedora 19, Fedora 20 and probably in upcoming Fedora 21.

From the start, the computer enters sleep mode if you turn down the screen on your laptop. Does not matter if you have the power cable in or not.

To avoid it, you need to modify a file in the system. The file: /etc/systemd/logind.conf

Open terminal and write

sudo gedit /etc/systemd/logind.conf

Find: #HandleLidSwitch=suspend

Change to:



Make sure you removed the sign #, or it won’t work.



Save the file and reboot your system, now it won’t go into hibernation when closing lid on your laptop.


I’m not sure if I mentioned this before, but you can’t get too much information though

Categories: FLOSS Project Planets

Skype and PulseAudio has buzzing scraping sound

Wed, 2014-09-17 01:25

Got a problem with buzzing or scraping sound in skype?

Then you are not alone, this is a issue in Foresight 3 and Fedora 20.

There is a workaround to solve this issue, open terminal and write:

sudo sed -i 's/^Exec=.*/Exec=env PULSE_LATENCY_MSEC=30 skype %U/' /usr/share/applications/skype.desktop

Start skype and sound should be normal again.


Categories: FLOSS Project Planets

Faac – play CD-DA audio files

Mon, 2014-09-15 13:25

You might need faac when playing audio cd in your computer with Foresight Linux 3. And from scratch, it’s not possible. You need to install a codec called faac. Now it’s possible to install it. Also you will be able to play audio files that are located in ipad, iphone and alot more devices.

Installation information is available at:

Categories: FLOSS Project Planets

Updated – How to install Foresight 3

Mon, 2014-09-15 11:13

We noticed that netinstall will fetch latest packages and cause issues when it’s time to install conary and convert packages to conary instead of fedora.

So we updated the installation in wiki:


Categories: FLOSS Project Planets

How to install rar

Mon, 2014-09-15 09:54

As rar is a non free package, we don’t have it in default repository. You can easily install it from FLR (foresighters, foresight linux learning) repository.

All information is located here:

We will continue make useful packages available for users.

Categories: FLOSS Project Planets

MySQL: Drop all tables from Database using Script / Linux

Sun, 2014-09-14 23:00
Hello, Few days back, I got a task to do, Task was Keep the database as it is, So that we do not have to add database users, privileges and everything again and again, Just Drop all the databases tables inside the database. If there are only few tables like 5 or 10 than it […]
Categories: FLOSS Project Planets

How to launch .jar files using nautilus or nemo

Sun, 2014-09-14 10:33

This is not nautilus specific issue and will work in more tools (like other file manager, xdg-open in cli etc)

Create a run-jar.desktop in your ~/.local/share/applications/ directory with the following content:

[DesktopEntry] Encoding=UTF-8 Type=Application Exec=java -jar %f Icon=java Name=run-jar Name[zh_CN]=run-jar Comment=Run the jar file Comment[zh_CN]=运行 JAR 文件

Now when you open the file’s property dialog and go to open with tab, you can see run-jar mentioned in ‘show more app’.

To make run-jar the default action, use nautilus ‘set default’ button or the type the following command in a terminal:

xdg-mime query default application/x-java-archive

The mime type can be found with the command:

xdg-mime query filetype my_shiny_app.jar


There is other ways to do it too, like creating a nautilus script. But this feels like a better way though.

Categories: FLOSS Project Planets

How To Create Application Folders in GNOME

Sun, 2014-09-14 05:51

You might want to add some more folders into GNOME, but seems impossible from a default system. So let’s show you how to do it.

1 – Open Terminal / Install ‘dconf’


sudo conary install dconf-editor 2 – Open ‘dconf’ and edit

Open dconf and navigate to org >> gnome >> shell. You’ll see a text box say “app-folder-categories.” You’ll see only two things listed there, maybe one. Double-click it and paste the following:

['Utilities', 'Games', 'Sundry', 'Office', 'Network', 'Internet', 'Graphics', 'Multimedia', 'System', 'Development', 'Accessories', 'System Settings', 'wine-wine', 'Crossover', 'Crossover Games', 'Science', 'Education', 'Universal Access', 'chrome-apps', 'Other']

Now you have alot more folders.


Categories: FLOSS Project Planets

Help 5150 – Only 3 Days To Go

Fri, 2014-09-12 12:48
Help 5150 - Only 3 Days To Go We are a podcast community looking to help out a friend in need. Recently, our friend, 5150, lost his home that he shares with is father to a house fire. Both were able to make it out ok, but he is in the hospital with 2nd degree burns. His father is elderly and has been moved to assisted care while he is recovering. We are looking to help 5150 get back on his
Categories: FLOSS Project Planets

error: ‘SPIN_LOCK_UNLOCKED’ undeclared here (not in a function)

Fri, 2014-09-12 09:26
While writing a kernel module using the spin locks in linux, we might hit the error

error: ‘SPIN_LOCK_UNLOCKED’ undeclared here (not in a function)

This might happen if we are trying to compile the module for kernel version below 3.0 Because before kernel version 3.0 SPIN_LOCK_UNLOCKED was defined in spinlock.h

30 #define SPIN_LOCK_UNLOCKED (spinlock_t) { 0, 0 }

But this definition is no longer available, and is replaced by DEFINE_SPINLOCK in spinlock_types.h

#define DEFINE_SPINLOCK(x) spinlock_t x = __SPIN_LOCK_UNLOCKED(x)

Thus in the module remove the initialization with SPIN_LOCK_UNLOCKED and add the macro DEFINE_SPINLOCK to get around the error.
Categories: FLOSS Project Planets

Google-chrome-stable updated

Fri, 2014-09-12 01:39

Iv’e updated google-chrome-stable, if you are using it, you can update it even updateall doesn’t work at the moment.

How to install google-chrome-stable

If you install it now, you get the latest. If you already have it installed, you can run this in terminal:

sudo conary update google-chrome-stable --ignore-model Why do you need to do this?

If you installed it earlier and run sync command, it will only check if it’s installed and not to try to update it. If you use ignore-model it will check if there is a newer version available and install it. As it’s not in “main” repository, that’s why we can use update command and –ignore-model parameter.

This won’t be needed later, but for now we want you to use the latest browser and get rid of bugs in it.

Categories: FLOSS Project Planets