Category Archives: Linux Stuff

Linux Stuff

Easily Install The Latest golang Compiler, LiteIDE and Various Go-Related Tweaks In Ubuntu With A Script

Go (or golang) is a programming language initially developed by Google. It is a statically-typed language with syntax loosely derived from that of C, adding garbage collection, type safety, some dynamic-typing capabilities, additional built-in types such as variable-length arrays and key-value maps, and a large standard library. More information @ Wikipedia.
Until Canonical’s Ubuntu Developer Tools Center gets support for golang, you can use a script created by WebUpd8 reader +George, which can be used to set up everything Go-related in Ubuntu. The script downloads and installs the latest version of Go compiler and IDE (LiteIDE) in Ubuntu and it also automatically sets up most of the tings you’ll need:

  • creates a simple layout for the IDE;
  • sets the GOPATH;
  • lot of gophers use Monaco font so the script will install it for usage with LiteIDE;
  • adds the golang IDE (LiteIDE) shortcut to the Unity Launcher with a few of useful quicklists;
  • under other desktop environments, it adds the LiteIDE shortcut on the desktop (and of course, it can also be accessed from the menu);
  • adds Git support in the IDE on ctrl+` (you need to setup Git before using this though);
  • extended project templates.

LiteIDE golang Ubuntu
LiteIDE under Ubuntu 14.04 (Unity)

George says he initially created this script to help a kid who wanted to start learning Go to set up everything that was needed. However, the script got a few extra features since then and it can also be used by advanced users who should appreciate the easy and fast golang environment setup.

Download and setup

Download the golang compiler and LiteIDE installer / setup script from HERE

Once downloaded, extract the archive and simply double click on the “Install.sh” file and click “Run” (or run it via command line). Of course, feel free to checkout the script before running it to make sure it doesn’t do anything you don’t want/need.
Note that in recent Ubuntu versions, Nautilus doesn’t ask to run a script when double-clicked and instead, it opens it with a text editor by default. To change this behavior and set Nautilus to ask if it should run a script when double-clicked, use the following command:
gsettings set org.gnome.nautilus.preferences executable-text-activation ask

For Nemo, use:

gsettings set org.nemo.preferences executable-text-activation ask

Note: to update the golang compiler, LiteIDE, etc., simply run the script again.

Thanks to George for the tip!

Read More

Install Timekpr (Parental Control App) In Ubuntu 14.04

Timekpr is a parental control application which can track and control your kids’ access to the computer. The application can be used to easily limit the login time duration or access hours for your children’s user accounts, as well as lock accounts with a click.

Timekpr Ubuntu

Unfortunately, the Timekpr development stopped a while back and the application doesn’t work with the latest Ubuntu 14.04. However, thanks to Eduards Bezverhijs, you can use Timekpr in Ubuntu 14.04.
Eduards fixed all the bugs that kept the application from working in Ubuntu 14.04 and also, he added an Ubuntu AppIndicator since the old Timekpr was using a tray icon, which can’t be used under Unity.

Timekpr Ubuntu
Timekpr can limit access duration and time frame

Timekpr features:

  • limit users’ daily usage of the computer based on a time access duration and configure times of day when they can or cannot login;
  • option to lock accounts;
  • option to bypass restrictions for today;
  • add time rewards / penalties;
  • Ubuntu AppIndicator / notifications.

Note that the Timekpr indicator doesn’t show up for administrators – it is displayed under accounts for which you’ve limited the login time or access hours using Timekpr and it shows the remaining time (along with a notification which is displayed on login):

Timekpr Ubuntu

Unlike the old GNOME Nanny (which is unmaintained), Timekpr doesn’t allow you to control which websites your kids can and can’t access (you can use the hosts file or OpenDNS for that) and there are no options to choose which applications they are allowed to use either. But, even with a limited set of features, Timekpr is still a great tool if you want to make sure your kids don’t spend all their time in front of the computer, and you don’t want to mess with various configuration files.

Install Timekpr (Parental Control) in Ubuntu 14.04

To install the new Timekpr in Ubuntu 14.04, you can use Eduards’s PPA. To add the PPA and install the application, use the following commands:
sudo add-apt-repository ppa:mjasnik/ppa
sudo apt-get update
sudo apt-get install timekpr

If you don’t want to add the PPA or you want to try Timekpr under different Ubuntu versions (it was only tested under Ubuntu 14.04 so it may not work with other versions!), grab the Timekpr deb from HERE.

For bug reports, see THIS Ubuntu Forums thread.

Read More

SelekTOR: Tor GUI With Country Exit Node Selection, Useful To Bypass Country Restrictions For Various Websites

“Tor is free software for enabling online anonymity and resisting censorship. It is designed to make it possible for users to surf the Internet anonymously, so their activities and location can’t be discovered by government agencies, corporations, or anyone else”. More information @ Tor & Wikipedia

Selektor TOR gui

SelekTOR is an open source Java-based GUI front-end for the Tor Client which has a few advantages over Vidalia (the official Tor GUI), such as:
  • Simplifies the usage and configuration of Tor in client mode, SelekTOR does most of the hard stuff for you;
  • you can quickly select Tor exit nodes by country;
  • SelekTOR can continuously monitor and maintain a connection to the exit node with the best response time, with as little downtime as possible;
  • as well as proxying all traffic through the active Tor node, SelekTOR can also do selective routing of traffic through the active tor node based on URL patterns.
The option to select the Tor exit nodes by country can be used to access websites which aren’t available in your country, such as Netflix, Hulu, CBS, ABC, Pandora, British TV, HBO Go and so on (these depend on your country, obviously).

SelekTOR needs very little configuration: simply select the exit nodes country (and optionally the proxy mode) and you’re ready – you don’t have to configure your web browsers manually and there’s no need to install any browser addon. Supported web browsers include: Google Chrome, Chromium, Opera, Palemoon and Firefox.

The application also features Atlas Node details as well as built-in IP Whois:

Selektor TOR gui

Other SelekTOR features:

  • supports non-unique (Un-named) nodes;
  • nodes are filtered to ensure that they support HTTP on port 80, and thus ensuring greater reliability when used with web browsers;
  • built-in proxy pattern editor, Import and Export pattern files as a single zip file;

Install the Tor client in Ubuntu / Linux Mint

To be able to use SelekTOR in Ubuntu / Linux Mint and derivatives, you must firstly install the Tor Linux client. In Ubuntu 14.04 and newer, install it from the repositories, using the following command:
sudo apt-get install tor

For older Ubuntu / Linux Mint versions (or if you just want to install the latest Tor version), you can install the latest Tor by using its official Ubuntu repository. Add the Tor repository and install Tor using the following commands:
sudo sh -c 'echo "deb http://deb.torproject.org/torproject.org/ $(lsb_release -cs) main" >> /etc/apt/sources.list.d/tor.list'
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 886DDD89
sudo apt-get update
sudo apt-get install tor

Once installed, you should disable the Tor service from starting automatically (so it’s started by SelekTOR) by editing the /etc/default/tor configuration file and replacing RUN_DEAMON=”yes” with RUN_DEAMON=”no”. To do this automatically (and also stop the tor service in case it’s running), simply copy/paste the following commands in a terminal:
sudo sed -i 's/RUN_DAEMON="yes"/RUN_DAEMON="no"/' /etc/default/tor
sudo service tor stop

Download and install SelekTOR

Download SelekTOR (select to download the binary, not the source code)

1. SelekTOR requires either the latest Oracle Java 7 or the latest OpenJRE 1.7. Either search for OpenJRE 1.7 in Ubuntu Software Center / Synaptic or whatever and install it, or install Oracle Java 7 as explained HERE.

2. Once you install Java, it’s time to install SelekTOR. Firstly, extract SelekTOR in your home folder, then run the following commands to install it:

– for Debian-based Linux distributions (Ubuntu, Linux Mint, Debian, etc.)

cd ~/SelekTOR*
sudo ./install

– for other Linux distributions:

cd ~/SelekTOR*
su -c ./install

That’s it. SelekTOR should now be installed and it should show up in your menu / Unity Dash.

If later on you want to uninstall SelekTOR, use the commands below:

– for Debian-based Linux distributions (Ubuntu, Linux Mint, Debian, etc.)

sudo /opt/selektor/uninstall

– for other Linux distributions:

su -c /opt/selektor/uninstall

Important: to make sure SelekTOR works properly on your system, read the instructions from HERE.

How to unblock websites using SelekTOR

Selektor TOR gui

To be able to access a website that’s blocked in your country (or whatever other reason you have for using Tor), using SelekTOR, you have two options:
1. Use “Geoblock Bypass” which uses Tor only for websites that match a certain pattern. To use this, select the country you want to use (the country which isn’t blocked by the website you want to access) from the SelekTOR drop-down and then from the SelekTOR menu choose Menu > Proxy Pattern Editor – here, click “Add new” and enter the pattern for the website you’re trying to access (use the already existing patterns as an example), then click Save.

This option has the advantage of allowing you to only use Tor for the websites you want (like Netflix for instance), leaving all other traffic / websites unproxified. There’s a disadvantage too: if some website, like Netflix for instance, uses code placed on some other domain, to check your country, this method will fail so for such cases, use “Anonymous (Proxy all traffic)” (see below).

2. By selecting “Anonymous (Proxy all traffic)” from the Proxy Mode drop-down, all the traffic is proxified (so there’s no need to enter any patterns) so simply select the country you want to use from the “Active Country” drop-down and you should be able to access the blocked website(s).

app seen @ +LinuxNewsHere

Read More

Dual Boot: Fix Time Differences Between Ubuntu And Windows

Quick tip for users who dual boot Ubuntu and Windows: if the time is off on your computer when you reboot and switch between Ubuntu and Windows, here’s how to fix it.

If you dual boot and there are time conflicts between Windows and Ubuntu, this occurs because Ubuntu store the time on the hardware clock as UTC by default while Microsoft Windows stores the time as local time, thus causing conflicting times between Ubuntu and Windows.
The fix is pretty easy and it can be applied from both Ubuntu and Windows.

Fix time differences between Ubuntu and Windows

Before proceeding, note that according to the Ubuntu wiki, “the advantage of having the hardware clock as UTC is that you don’t need to change the hardware clock when moving between timezones or when Daylight Savings Time (DST) begins or ends as UTC does not have DST or timezone offsets“.

A. To fix the UTC / local time difference between Ubuntu and Windows from Ubuntu by making Ubuntu use local time, you must edit the /etc/default/rcS file and replace “UTC=yes” with “UTC=no” (both without the quotes). To do this automatically, simply copy/paste the following command in a terminal:
sudo sed -i 's/UTC=yes/UTC=no/' /etc/default/rcS

And then reboot.

B. To fix this from Windows (it should work with Vista SP2, Windows 7, Server 2008 R2 and Windows 8/8.1), by making it use UTC instead of local time, download THIS Windows registry file and simply double click it.

Then, to disable the Windows Time service (which still writes local time to RTC regardless of the registry setting above, on shutdown), run Command Prompt as Administrator and paste this command:
sc config w32time start= disabled

And reboot.

How to revert the changes

A. From Ubuntu: reverting this change from Ubuntu is pretty easy. All you have to do is replace “UTC=no” with “UTC=yes” in the /etc/default/rcS file. To do this automatically, copy/paste the command below in a terminal:
sudo sed -i 's/UTC=no/UTC=yes/' /etc/default/rcS

And then reboot your computer.

B. From Windows: reverting this change is a bit more complicated from Windows. 

Firstly, open the .reg file downloaded when applying the fix for Windows (see download link above) with a text editor and change the “RealTimeIsUniversal” value from “dword:00000001” to “-” (without the quotes). Here’s how the file should look like after making this change:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlTimeZoneInformation]
"RealTimeIsUniversal"=-

Then save the file and double click it.

Next, run the following command in Command Prompt (which you need to run as Administrator) to re-enable the Windows Time service:
sc config w32time start= demand

And finally, reboot.

References / more information:

image via

Read More

Recent Update Broke Ubuntu Desktop On Some Nvidia Optimus Laptops [Fix]

Nvidia Optimus Ubuntu

According to a bug report, a recent Ubuntu 14.04 update broke the desktop for some Nvidia Optimus users:

Until yesterday the 14.04 install on this Thinkpad T530 (nvidia Optimus) with nvidia-331 drivers worked just fine, including excellent multi-monitor behavior. Yesterday the set of packages below [1] was updated. I shut down, booted this morning and found out that I was not shown the lightdm login screen: I was stuck at the purple screen that precedes it (into which I enter my disk encryption password)“.

– lp #1365695 bug

This bug doesn’t affect all Nvidia Optimus users though. In fact, my laptop has Nvidia Optimus and this bug doesn’t occur for me. That’s why I can’t guarantee that the solution below will work 100% however, I don’t see why it wouldn’t (and it was confirmed  by users in the bug report comments).

Until the Ubuntu developers fix this Nvidia Optimus issue (the bug itself is caused by the ubuntu-drivers-common package), here’s a work-around / temporary fix that you can use to get your Ubuntu desktop back. Press CTRL + ALT + F1 (because, if you’re affected by this bug, you can’t access the desktop), log in via the command line and type the following command:
sudo apt-get install ubuntu-drivers-common=1:0.2.91.4 nvidia-common=1:0.2.91.4
The command above downgrades the ubuntu-drivers-common and nvidia-common packages to the last working version available in the repositories (0.2.91.4).

Then reboot your system using:

sudo reboot
Note that you must not upgrade to the latest nvidia-drivers-common 2.91.6 (or to 2.91.7 from the Ubuntu Proposed repositories) because both seem affected by this bug. Check the bug report to see when the bug is fixed and only then upgrade this package.
Thanks to Fabio Colella for the tip! Image via

Read More

Drab Desktop? Try These 4 Beautiful Linux Icon Themes

iconsUbuntu’s default icon theme hasn’t changed much in almost 5 years, save for the odd new icon here and there. If you’re tired of how it looks we’re going to show you a handful of gorgeous alternatives that will easily freshen things up.

The post Drab Desktop? Try These 4 Beautiful Linux Icon Themes first appeared on OMG! Ubuntu!.

Read More

Unofficial MEGAsync Nemo Extension Available For Download

A couple of days ago we wrote about the new MEGA Linux desktop client (MEGASync), which consists on two parts: a tray / appindicator application and a Nautilus extension and unfortunately, they didn’t release a Nemo extension, even though the code is pretty much the same as for the Nautilus extension.
Well, the MEGAsync source was briefly available for download so I decided to convert the Nautilus extension to Nemo and package it as a deb so both Ubuntu 14.04 users who use Nemo with Unity patches as well as Linux Mint 17 (Cinnamon) users can use it easily.

The MEGAsync Nemo file manager extension lets you see the sync status of your MEGA folder (using emblems) and also, it can be used to copy a file share link or upload a file outside your MEGA folder to MEGA.co.nz.

Here are a couple of screenshots with the MEGAsync Nemo extension:

Notes:
  • you can’t install both the MEGAsync Nautilus and Nemo extensions in the same time. Installing the MEGAsync Nemo extension will automatically remove the Nautilus extension!
  • the MEGAsync Nemo extension depends on the main MEGAsync for Linux app so firstly install that before installing the Nemo extension.

Download MEGAsync Nemo file manager extension

Since MEGAsync freeware, I couldn’t upload the package to the WebUpd8 Nemo PPA. However, you can download it using the links below (it only works with Ubuntu 14.04 / Linux Mint 17!):

Once installed, restart Nemo (you’ll be prompted to do this after installing the package, but it can fail sometimes):
nemo -q

That’s it.

Read More