The reason I prefer Fedora over other Linux distributions

fedora logoAs you may know from my previous posts and tweets, I am a Linux user. I use it everyday at home; however, my office PC is still hosting a Windows OS (I am doing my best to migrate to Linux there too). There are lots of distributions to choose from when migrating to Linux and people sometimes ask why I’ve chosen Fedora over more that 100 other distros. Well… There are a few reasons:

The installation process

Beside Fedora, I like Arch too. But the problem with Arch is that the installation process is very complex. On the contrary, Fedora’s Anaconda provides one of the coolest and easiest installation processes you may have ever seen. By less than 7 clicks, the OS will be installed on you machine.

An up-to-date OS

There is something you have to choose when deciding to work with a distro. Do you want being stable or up-to-date?

Most debian-based distros like Debian and Ubuntu (especially the LTS version) are very stable; but, since I am a developer, I prefer an up-to-date distro over a stable one. Although Fedora doesn’t have “the most” up-to-date kernel and packages; but, it’s fine. The kernel version it uses is usually one version before the latest (Fair enough).

For instance, if the latest kernel version is 4.8.7, Fedora uses 4.8.6. While stable distros like Debian are using 3.18 or 4.1 which are the long-term support versions.

However, if I want to be on the cutting-edge, I will go with Arch which always has the latests; but, most of the times (90%) Fedora is OK.

Built-in apps

One of the coolest things about Linux is the ability to customize everything. Some people change their window manager to their favorite and this is OK. But one of the reasons I’ve chosen Fedora is that it has most of the apps and services I use out of the box; so, I have to install just a few other apps to get going. For example, GNOME is the window manager I use and it has it built-in. I also have a setup script that I run every time I install a fresh copy of Fedora. It installs and configures everything I need in few minutes.

DNF

There are lots of package managers out there. Apt, pacman, yum, portage and a lot more and I have worked with most of them. I don’t know why but I really like DNF. DNF is the new package manager for Fedora that replaces the old yum. It has everything I need and very satisfied. I also like pacman which is Arch’s package manager. But, since I am on Fedora most of the times, I use DNF much more than pacman. DNF has lots of functionalities and very easy to use. Another cool thing about DNF is the group installation feature. For example you can install everything you need to start developing C/C++ applications but using the following command:

sudo dnf install @c-development

Conclusion

The fact is that, Fedora doesn’t have the community Ubuntu has; but, It’s a very smooth and easy to use Linux distro. It provides tools and everything you might need to do something. From development tools to educational applications. It also has a reasonable app store and a pretty impressive package manager which can be used to install any software.

If you haven’t tried Fedora before, give it a try https://getfedora.org

A way to (temporarily) solve the X11 crash when updating systemd-udev

Fedora 24

Fedora 24 is released a few month ago and I’m a big fan of it. I use it as my primary OS and very satisfied (Maybe I blog about why I like Fedora over other Linux Distros in the future). My main computer is a HP G62 with hybrid graphics (An Intel HD 4000 and an ATI Readon).

After upgrading to Fedora 24 (I usually perform a clean install), I’ve noticed that X crashes whenever I update systemd-udev package. I have searched a lot over the internet but couldn’t find anyways to solve the problem until today when saw this post. I realized that this is a known issue (Bug #1341327 and #1378974).

However, I found a way to temporarily solve this and upgrade systemd-udev. Whenever you saw an update available for systemd-udev, simply do the following:

  • Logout to Gnome login window
  • Press Alt+Ctrl+F2 to launch a new terminal
  • Login as root
  • Upgrade the systemd-udev package by using dnf upgrade systemd-udev
  • After the upgrade process finished, press Alt+Ctrl+F1 to get back to the login window. Done!

I know this may sound ridiculous; but, by the time of this post, there is no other ways 🙂

Hope it helps

Choose an appropriate programming language before start a new project

programming_langs

Last night my wife asked me about ways to create GUI applications using C++ (She’s currently teaching C++ fundamentals to some high school students). I suggested her to use frameworks like MFC on Windows and Qt for cross-platform development.

After she described the project more, I instantly suggested her to use C# rather than C/C++. Her project was a simple GUI app that simply shows some messages according to user’s input. In addition, she wanted the app to run on Windows OS only.

Low-level languages like C or C++ should be used for low-level developments such as drivers, kernels, etc. Companies like Microsoft and Oracle created much simpler to use languages; so, why should we use such low-level languages for simple apps?

As a developer, I know using low-level languages are much cooler and geekier; but, in most cases, high-level languages does the work much easier and faster!

Before start any project please analyze and choose an appropriate programming language.

How to install VirtualBox on Fedora 23

VirtualBox is probably the most popular visualization product ever. It’s free, open-source and cross-platform. I used VirtualBox on plenty of operating systems such as Windows, Mac, and Ubuntu Linux and was very satisfied.

Linux distros such as Ubuntu, Debian, etc. prefer to be more stable rather than being up-to-date while, on the other hand, distros like Fedora, Arch, etc. are always running the latest version of Kernel. For apps like VirtualBox, that need to install a kernel driver alongside the app, being compatible with always-up-to-date distros is such a difficult work. It’s not as easy as a sudo apt install VirtualBox. In this post I am going to show how you can install the latest version of VirtualBox on Fedora 23.

I always keep my machines OSs up to date. My Linux machine which has a Fedora 23 complies the same rule. The Kernel version on it is 4.3.5 (The latest Fedora update to date) and VirtualBox doesn’t offer a driver for this specific version; so, lets see how we can Install and run a virtual machine on it.

By default, Fedora dnf/yum repositories don’t have VirtualBox; therefore, you need to add it manually:

Create a file name virtualbox.repo in the /etc/yum.repos.d/virtualbox.repo and add the following lines in it:

[virtualbox]
name=Fedora $releasever - $basearch - VirtualBox
baseurl=http://download.virtualbox.org/virtualbox/rpm/fedora/$releasever/$basearch
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://www.virtualbox.org/download/oracle_vbox.asc

Then simply do a sudo dnf check-update to update the repository cache and check for updates.

After that, Install VirtualBox using the following command:

sudo dnf install VirtualBox kmod-VirtualBox-5.0.14-1.fc23.x86_64 kmod-VirtualBox

Note: At the time of writing this post, VirtualBox 5.0.14 is the latest version.

In addition to that, you need to install the kernel headers so you can compile the VirtualBox kernel driver:

sudo dnf install kernel-devel-$(uname -r)

This will install the appropriate kernel header according to your current kernel version.

Now you need to compile the kernel driver. To do that, simple run the following command:

sudo akmods

Akmods checks the akmod packages and rebuilds them if needed.
Restart you computer, run the VirtualBox and you’re done 🙂

Introducing cmus: The best Linux music player I have seen so far

I believe one of the things that made Linux, Linux is its terminal. Most Linux users (especially developers) prefer to use the terminal for all of their tasks. VIM is a good example. Most Linux developers prefer to use VIM while there are plenty of GUI-based code editors; because, it’s the editor you’ll fall in love with.

When it comes to music playback on Linux, people usually use apps like VLC or Rhythmbox. I know they’re all good; but, to be able to use them, you have to leave the lovely terminal environment 😉 I searched a lot over the internet to find a good music player for terminal and found cmus!

cmus-2.4.3-osx. Photo taken from: https://cmus.github.io/#home

In one sentence:

cmus is a small, fast and powerful console music player for Unix-like operating systems.

cmus supports nearly all popular music formats and it has a very cool user-interface since it uses ncurses to display song list and other information. It has a completely configurable keybindings and the good part is that the default keybinding configuration is very similar to VIM! For instance, you can use j and k to move and up and / to search.

If you’re a big fan of terminal based apps as I am, check their GitHub page, download, install, contribute, and enjoy 🙂

Barca vs. Celta: Lionel Messi Penalty was outstanding!

I am a FC Barcelona fan and usually watch their matches. In their yesterday match against Celta Vigo, the referee announced a penalty after Celta Vigo defender blocked Messi in the penalty area. Messi has done a great job, passed the ball instead of shooting it to help Luis Suarez claim his hat-trick. That was a very amazing (practiced) goal and I hadn’t been seen such a goal before. The following video shows you the details:

VIM Cheat Sheet: The editor you’ll fall in love with

Well… I have migrated to Linux. I was a Windows user for more than a decade and now a 4 month old Linux user. I learned a lot about Linux and its components in these 4 months.

One of the tools I really liked is the VIM editor. I know most of you are probably familiar with VIM but it was a surprise for me as a new Linux user. In the early days of moving to Linux, I installed Sublime Text editor. There’s no doubt that Sublime is one of the most powerful editors out there but when I got comfortable with VIM, decided to remove Sublime from my machine.

As you may know, VIM is based on shortcut keys. If you get comfortable with them, your text-editing speed will be boosted unbelievably. After spending a lot of time exploring VIM, I came across the idea of creating a cheat-sheet so I can easily memorize its shortcut keys. Although there is a very amazing website for this; but, what I wanted was a document that could be printed on a standard A4 paper so I can place it somewhere in front of my eyes. Something like this:vim_cheat_sheetI have created a PDF document that contains the most important (in my opinion) VIM shortcut keys and have printed it for myself. I thought that would be useful to share it with you as well. You can download it from here: VIM Cheat Sheet

Note: The PDF I have created does not contain all VIM shortcuts. I have picked some of the most important ones due to the limitation of an A4 paper. If you’re looking forward to a full list check out: http://vim.rtorr.com/

If you think there are other important shortcut I should have mentioned in the document, please let me know. I will post more about VIM editor in the future because it is one of the most exciting editors of all time 🙂

Update: Marco Hinz has done a great job creating a GitHub project that gives you Everything you need to know about VIM which covers almost everything about VIM. Check it out.

The way Windows 10 updates machine’s drivers is awesome

I am a Windows (10) fan and I am proud of it. I am telling this because these days most people I meet prefer to use non-Windows operating systems such as Linux and OS X. In fact, in the community I am dealing with these days, working with non-Windows operating systems is a way of showing geekness.

But I love Windows 10 and I am using it almost everyday and I am proud of it.

One of the cool things Microsoft has done in Windows 10 (It started to test it in Windows 8.1) is the way it updates your machine’s drivers. Previously, you had to visit a hardware manufacturer website to get the latest drivers for your machine but with Windows 10, you don’t need to do such a thing anymore. I think Microsoft negotiated with hardware manufacturing companies such as AMD, Intel, etc., and told them to send their drivers to Microsoft every time they released a new version so the driver updates can be shipped to users via Windows Update automatically.

The following picture shows that Windows Update automatically updated my graphic cards and printer drivers:

Windows Update updates drivers automatically

This way of upgrading has lot of advantages over the previous ways. First of all, it prevents the user from downloading a incompatible driver. Windows recognizes the model of each hardware and installs the appropriate driver. Second, since most Windows users turn the automatic update option on, they always have the latest driver. The latest driver you have, the more reliable your machine works. Last but not least, you don’t have to be worry about anything; it just works.

I know most of you may had bad experiences using previous versions of Windows; but Windows 10 is a very reliable OS and I highly recommend you to start using it if you haven’t yet.

A better cross-platform client for Longman dictionary

During past 7 years, I have always been into learning English; not only because it’s the language I really like, but learning a new language opens new gates into a new world with new people and new ideas.

Although English is a key language in worldwide communications, but if your native language is English, it’s also good to learn a new language such as French or Spanish.

When it comes to learning a new language, having a good dictionary is a must. For me, Longman dictionary is a good one. Because the dictionary is for learners (Built for those who are learning English) not native speakers, it has lots of examples and the definitions are very easy to understand.

When I’m using my Windows machine, I use its wonderful app. It’s one of the bests, in my opinion. But, when it comes to Mac, unfortunately, I realized that the app DVD doesn’t have any OS X app included.

ldoce_earthI Googled about it and suddenly came across an app called LDOCE5 Viewer. The app uses the Longman dictionary database as the source and acts like its client.In fact, it does things that the Longman official app itself doesn’t!

Once you launch the app for the first time, you will be asked to specify the Longman database. The Longman database is a folder in the official DVD called “ldoce5.data”. To be able to use the app, you need to copy that folder to a place in hard drive; then, specify that folder to the app. Once the data folder specified, the app starts indexing the dictionary data. It may take a few minutes to complete according to your machine’s performance. The app is also  available for Windows and Linux as well.

To download it visit its official website at: https://forward-backward.co.jp/ldoce5viewer/