Search This Blog

Tuesday 27 January 2015

Betty: Turn Generic English Into Linux Terminal Commands


By Filed in CodingTools

The Linux terminal can be a complex beast, and it would be handy to have something like Siri to help make things easier. Sure, there’s often no need to go into the terminal for regular users, but there are some advantages to using the terminal over the graphical user interface. You can do a lot of things with the terminal that aren’t as easy to do in graphical user interfaces – besides, there’s just this odd nerdy pleasure in doing as much as possible from a command line interface.
Betty
Getting to grips with the terminal and terminal commands isn’t the easiest thing, but Bettymight just make things a lot easier. Betty is a Linux tool that can translate plain English commands into Linux terminal commands. In a sense, it’s a bit like Siri or Google Now for the Linux terminal.
The whole motivation behind the development, according to the GitHub page, was to allow users to use the terminal using natural language input, letting you do a lot of things without ever leaving the terminal or having to look up obscure terminal commands on the Internet.

Installing Betty

You’re going to have to delve into the Linux terminal to install Betty, but it’s a straightfoward process; just make sure you type these commands in exactly, and make sure your Linux install is up-to-date.
First off, you need to install Ruby, Curl and Git. Enter these commands into the terminal (if you already have these installed then you can skip these steps):
$ sudo apt-get install ruby curl
$ sudo apt-get install git
Once you have Ruby, Curl and Git installed, it’s time to install Ruby and set up an alias for easier usage. This assumes you have installed Betty into your Home folder.
$ cd ~ && git clone https://github.com/pickhardt/betty
$ echo "alias betty=\"~/betty/main.rb\"" >> ~/.bashrc
$ source ~/.bashrc
Also, if you’re running older versions of Ubuntu (such as 12.04), you might have to update Ruby to 1.9.1 to avoid getting a lot of errors when you run Betty commands. Just run these two commands:
$ sudo apt-get install ruby1.9.1
$ sudo update-alternatives –config ruby
When you run the second command, you’ll be prompted to choose your version of Ruby. Just select Ruby 1.9.1 by typing its selection number, press Enter and you’re good to go.
Choosing Ruby Version

Using Betty

Once you’ve completed the installation process, you can start using Betty. There’s quite a bit you can do with Betty, and there’s a list of commands on the official GitHub page, with more and more commands being added as development progresses.
But let’s just look at some examples of what Betty can do. Let’s start with some basics. Betty can provide basic information such as time and date. Just type in Betty what time is it to get the time, and Betty what is the date to get the date.
Time And Date
Betty can also fetch and return other basic information such as your username, IP address, other logged in users, and so on.
Username And IP
You can also use Betty to compress and uncompress files and folders.
Compressing Folder
In addition to actions related to your machine, Betty also has a web mode that will let youexecute Internet queries. These queries include checking the weather, translating words and even looking up people, things and places.
Web Query
A couple of things to note: firstly, these are only a handful of examples of what Betty can do. Some experimentation, and a quick look at the list of commands available on the GitHub, should reveal everything else Betty can do (including controlling iTunes and Spotify).
Secondly, since Betty aims to understand natural language input, there are a lot of different ways to word the same request – you just need to experiment to find out what they are.

Conclusion

Betty is quite a useful tool for anyone interested in using the Linux terminal, as well as for anyone with a passing interest in the development of natural language input systems for computers.
The fact that Betty shows the commands it executes also makes it great for anyone trying to learn Linux terminal commands, since it helps you associate often abstract commands with natural English-like sentences.
It may still be a bit limited in what it can do, but the fact that it’s under active development means that it’s definitely a tool to keep an eye on even if it’s yet to be your cup of tea in its current state.

Black Diamond Night

Black Diamond Night (a coal miner’s cemetery) 

Where the ebony, we call “NIGHT”,

Old black rocks sit under the twilight. 
Diamond shape eyes unclear and lonely,
Sinister through hostile spirits only,

I stumble across these stones without a bone.
A solitary confinement alone,
From a barren zone the light transcend. 
Only in time, our minds will mend.

Endless valleys and limitless stones.
These bones- these bones they sit alone.
The abyss, of rotten cavities with no fill,
A system no power can unwell the drill 
The blood that passed over without a spill. 
Peaks collapse into a spellbinding chill. 
They are trapped! 
They are trapped
Another diamond in the rough. 
Is what they left.

Obsessed with the dead without a death.

 A death that impatiently awaited their last breath.
 Gushing, into the gems of dead chemistry,
 Diamonds holding its own intensity, 
These lonely graves, on top of sycamore hill.
 Coal mining hearts that will never heal.
 If only shiny eyes could see?
 These lonely bones inside of me!
 Moving in every direction possible 
Flowing in every direction noticeable. 
Sockets without eyes.
 Stones hiding under the cobalt skies.
 The mad sparkles, the madness dies. 
Throughout this mess,
 we held in the blasphemous.
 Intervening lots of gems so miraculous.

Into a stone of self-religion,
 A black night filled of legions. 
Acknowledging the soul's capacity of free.
 Near the frail bones that sit alone,
 Alone they sit in a morbid home.
 Through a path unclear and all alone,
 Troubled by the visions of my own stone.
 Where the night takes place in the dark.
 The ebony rides under the diamond bark.
 Along with the coal miners who never got to see the;
 “Diamonds of another day!”

Read more at: http://www.poetrysoup.com/poem/black_diamond_night__413127

10 Most Asked Questions About Linux


By Filed in DesktopWeb 2.0
You have probably heard of Linux as the free alternative to Windows and OS X. It’s one of the most popular free PC operating systems out there and chances are, you are already using it without realizing. Did you know that your Android phone is powered by Linux? It is an incredibly versatile piece of code that can fit the needs of almost any user.
Linux
If you are looking for something different to try on the desktop besides Mac and Windows, you should really give Linux a try. Not only is it free, it is extremely customizable. Similar to Android on the smartphone, you can customize Linux to your heart’s content. But let’s not get ahead of ourselves. In order to get into Linux, there are probably a few things you should know first before diving in. In this guide, we will cover what you should know about a Linux operating system on the desktop.

1. What Is Linux?

When someone mentions Linux, it’s always in conjunction with another name, e.g. Fedora Linux, Ubuntu Linux, Android powered by Linux; the list goes on and on. What exactly is Linux anyway? ‘Linux’ refers to the Linux kernel, which is a program that interfaces between the application software and the hardware of a computer. What they all have in common is that they all use the same kernel as the interface between software and hardware. In cases where the computer is referred to as ‘running Linux’, it is running an OS with Linux as the kernel.
via Wikipedia
Some of you may encounter some people insisting that it be called GNU/Linux. This refers to the fact that most of the operating systems that uses Linux gets a large portion of their code from the GNU Project, without which, the Linux kernel itself cannot function. Calling it GNU/Linux is a way to give credit where credit is due. For the sake of simplicity, we will refer all operating systems using the Linux kernel as Linux.

2. Why Is It Free?

Most people know Linux as the free operating system, free here meaning free of charge. That’s right, free of charge, but it also refers to free speech. What this means is that the source code for Linux is available for everyone to view, study and modify, along with sharing their changes with anyone who would like a copy.
Free And Open Source
Compare this to Windows and OS X which, while still popular, are closed source, cannot be studied and cannot be distributed freely. This open nature is one of the main reasons thatLinux derived operating systems have been successful, with many people and companies creating their own derivative versions of Linux.

3. What Is A Distro?

‘distro’ refers to a distribution of the Linux Operating System, where a person, group or company builds upon Linux and releases it under their name. Examples of popular Linux distros include Ubuntu, Fedora, OpenSUSE, among others. While all of them use the Linux kernel, they are all different with what software they include. From the the default software to even the user interface and experience, no two distros are alike.
via Linux Mint Tumblr Page
Each distro brings something different to the table, offering up specific features for specific user sets. However, for a beginner, it is best to start simple, with a distro that offers a simple user experience for people that are new to Linux. The most recommended Linux distro for beginners would be Ubuntu Linux, as it is relatively easy to set up and use and has a lot of support.

4. Will My Hardware Support It?

It used to be that hardware support for Linux was spotty at best, with many components and peripherals not working properly or not working at all. Fortunately, most of that is in the past with the majority of Linux distros being able to run on modern hardware with little to no problem. So chances are your hardware will be able to run it.
via Tom’s Hardware
I say ‘little to no problem’ because there may be times when you might run into an issue or two. While the Linux community have done an amazing job in making sure that the OS will be able to use your hardware, it may still not run. You will have to shoot down for atroubleshooting guide or hope that the manufacturer has provided a proprietary Linux driver for the hardware.

5. Can I Try Before I Install It?

The great thing about most Linux distros is that you are able to try them before installing what you like on your computer. Linux providers provide you with an easy way to try out the OS by way of a Live CD. Download an ISO, burn it, and from there you can boot from the disc so that you can try out a distro before committing to it.
via NotebookNotes.com
If you decided not to install Linux but the idea of carrying a spare OS around with you sounds useful (and really there are many cases where you might want one), you can create a Live USB. Just like a Live CD, a Live USB is a bootable USB drive that can boot Linux on most computers. This way you can have the Linux experience without installing over your computer’s OS.

6. What Is A Desktop Environment?

As you may have noticed when looking over all the various distros, not allLinux Operating Systems have the same look. This is because they are using different desktops environments such as GNOME, KDE, Unity, etc. This is similar to Aero for Windows 7 or Aqua for OS X; they govern the overall ‘look and feel’ of the operating system and the way you use them, having different features and ways of getting things done.
via Wikipedia
The most popular of the desktop environments and the one’s that most distros ship with are GNOME and KDE. As with everything about Linux, if you don’t like something, you have the freedom to change it. If your chosen distro comes pre-installed with an environment that doesn’t suit your taste, you can install your own preferred one instead.

7. Can I Run My Old Windows/Mac Apps?

There is currently no way of running any of your Mac apps on Linux but there is a way to run some of your Windows apps. This is done through the use of a program called Wine, which will allow you to run some of your Windows programs on Linux at native or near-native speed. Not all of your apps will run though, and even when they do, you may encounter some incompatibilities, such as graphical glitches or features that are not working.
via Invasao
Wine is free to download and install but new users may find it difficult to use. In which case there are third party tools that make using Wine much easier to use and are preconfigured to make running certain Windows software much smoother on Linux, a prime example being CrossOver Linux.

8. How Do I Get Apps?

Now that you have a fresh install of Linux, naturally you will want to look at the apps it has to offer. Installing apps on Linux is a different experience compared to Windows or Mac. Unlike the two, where you have to hunt down an EXE or DMG, on Linux you will have to search through your distro’s repository to find what you are looking for.
via Wikipedia
Most of the distros make it easy by having a GUI for you to navigate; Ubuntu easier still by creating their own app store. Sometimes you may not find what you are looking for in the repository, in which case all you have to do is add another repository that contains the item you seek. Updating is also easier due to the repository system, as the OS can find and update all of your installed apps in one go, instead of one at a time.

9. How Do I Get Support?

Just like when you first started using Windows or OS X, you have a few things to learn when starting to use Linux. The good thing is that nowadays Linux is pretty simple to figure outin terms of how to install and use, as most distros have focused on ease of use for the end user. If the majority of your computing task is relatively simple, i.e. web browsing, word processing, chances are Linux will pose no trouble at all.
via Ubuntu
However, there may be times when you need a little help with your operating system. Never fear as Linux has a large fan base and community ready to help you on any issue that you may encounter. Most of the time, troubleshooting Linux will not be that hard, as many can be resolved by typing in something in a command line, of which the community will help you with step-by-step.

10. Can I Still Run My Old OS?

So you’ve installed Linux and while you feel it’s a great OS, you find that there are some things that are just better on your previous one. Usually this pertains to games and and other apps you cannot run on Linux or Wine. The good news is that you can still have the open goodness of Linux alongside your favorite OS. This is done by either using a virtual machine or dual booting.
via VirtualBox
With virtual machines, you get the best of both worlds, running Linux and your default OS at the same time. You could either run Linux or your OS in a virtual machine, depending on which you use more, as this method can eat up your systems resources. On the other hand, you have dual booting, where you run one OS at a time but can switch between them with a reboot. Either method is great depending on what you need and you can switch to Linux without worrying about getting access to your favorite OS.

10 Linux Desktop Environments You Probably Don’t Know


By Filed in DesktopTools
Unlike Windows and Mac OS, Linux offers a variety of desktop environments for its users. Each desktop environment (interface) has its own appearance, style and features and a user can install any one of these desktop environments on the basis of his/her requirements. Some of these desktop environments are also suited for machines with low hardware configurations.
If you’re not sure which Linux desktop environment is the most suitable for you then don’t worry, we’ve put together 10 Linux desktop environments along with their features to assist you in selecting the best one for your needs.
More on Hongkiat.com:
1. Cinnamon
Cinnamon is based on Gnome library files and designed for Linux Mint. It is an easy to use powerful desktop environment which is flexible and combines the traditional layout with advanced features.
Cinnamon consists of 3 main things: a single panel located at bottom, a clock and system tray and various other things located on the right, and the application menu on the left side of the screen. You can also customize the application menu by adding applications of your choice. To ensure that this runs smoothly, your machine should have a powerful graphics card and updated drivers. [Get it here]

2. GNOME 3.X

A few years back, GNOME (GNU Network Object Model Environment) was the most popular and widely used Linux desktop environment. The transition of GNOME to GNOME 2.x seriesbrought simplicity and ease of use that attracted a large number of Linux users to move to the GNOME 2.x series.
GNOME 3.x was introduced to provide easy access to all of your data by integrating it withonline accounts. Some other important features offered by GNOME 3.x are Activities Overview, side-by-side windows to view several documents, and an easy way to deal with notifications comfortably. [Get it here]

3. KDE

KDE (K Desktop Environment) is one of most popular Linux Desktop environments and also a contender for GNOME. It resembles the Windows Desktop so if you want to experience a desktop similar to Windows OS, this is the option for you. While KDE comes with a visually intriguing GUI and a bunch of powerful features, the combo makes it a resource-hungry desktop environment.
This means you may not be able to run it smoothly on older desktop/laptop computers withlow hardware configurations. [Get it here]

4. MATE

Despite its popularity with earlier versions, the simplistic design of GNOME 3 didn’t sit too well with many GNOME users. The Linux community decided to continue development of GNOME 2 and designers came up with MATE. MATE offers a GNOME 2 environment with new features and improvements to assure users of an improved computing experience. [Get it here]

5. LXDE

LXDE (Lighweight X11 Desktop Environment) is a fast-performing desktop environment. It’s designed for cloud systems that usually have low hardware configurations (less CPU power and less RAM) and older desktop/laptop systems.
Although it is a lightweight desktop environment, it still has a simple and attractive user interface. It also provides multi-language support and on top of that it supports standard keyboard shortcuts and allows tabbed file browsing among other things. [Get it here]

6. Xfce

Fact: the abbreviation for Xfce doesn’t really stand for anything. It’s a traditional desktop environment which is very lightweight but in terms of functions, it is similar to GNOME 2.Xfce has its own lightweight programs as well as some GNOME programs to provide a balance in between performance and functions. [Get it here]

7. Unity

Currently, Unity is the native desktop environment for Ubuntu, replacing GNOME. It comes with an application dock which can be scrolled if the number of applications exceeds the screen view area. You can also search a particular file or application by typing its name in the searchbar. Unity works smoothly on a system with good hardware configuration. [Get it here]

8. Openbox

Openbox is a desktop environment which is lighter than LXDE and Xfce due to itsminimalistic design and appearance. It is a highly configurable desktop environment and has a completely bare desktop which makes the loading process really fast. Right clicking anywhere on the desktop to open the application menu.
You can also combine the functionality of GNOME or KDE with the speed of Openbox to make your desktop faster and cleaner. Openbox is ideal for Linux users with low power systems. [Get it here]

9. Razor – Qt

Razor – qt is a fairly easy and lightweight desktop environment for Linux users. It bears similarities with KDE but it is designed to offer simplicity with speed. It comes with minimal built-in applications; you can install the applications you need yourself (find the list of third-party apps youc an get on Razor-qt here. It should work smoothly with older systems with low hardware configurations. [Get it here]

10. Xmonad

Xmonad is actually a tiling window manager which means instead of overlapping windows on your desktop, it will automatically arrange them in a non-overlapping order, leaving behind an organized desktop. It does not come with too much of a decorated user interface but that makes it a fast, user-friendly and stable desktop environment. [Get it here]

Fahad Khan is a writer for Hongkiat.com. He is an energetic engineer and teacher with a love for stimulating technology and handy tools, apps and services.