Maps for Linux & Ubuntu

Standard

Everyone uses digital maps these days, I assume. At least I do. Since I’ve been using them more often lately, I checked if there are any apps for Linux and especially Ubuntu. The search returned 4 apps.

Maps (aka gnome-maps)

is a map application for GMONE. Its use is slick and fast. It is supposed to be simplistic
Search and directions is functional (based on MapQuest if I’m not mistaken) but geolocation isn’t. Moreover, the satellite imagery is not available at high resolution.

Maps_015.png

Continue reading

Advertisement

Solution for “Error interpreting JPEG image file (Not a JPEG file: starts with 0x89 0x50)”

Standard

I recently faced a problem opening some JPG images that I have downloaded somewhere over the internet, probably Twitter. So I though I’d share the problem and the simple solution.

When I tried opening an image I got the following error

Error interpreting JPEG image file (Not a JPEG file: starts with 0x89 0x50)

As the error states I was trying to open an image with a JPEG extension but which was not actually a JPEG image. To further verify this and know the actually format I ran this command in the terminal:

file file_name.jpg

which will give you something like this:

PNG image data, 346 x 480, 8-bit/color RGB, non-interlaced

The solution was to imply replace .jpg or .jpeg with the appropriate format, .png in this case.

References

I can’t open .jpg files, what to do?, Ask Ubuntu
Why am I getting the error: “Not a JPEG file: starts with 0x89 0x50”, StackOverflow

Installing Some Basic R Packages in Ubuntu

Standard

The following is how I configured my R workspace (and Rstudio) and this was first shared on a Coursera’s “Getting and Cleaning Data” course forums.

First make sure that R is version 3+. If not update it according to this stackoverflow question.

Java for rJava

Install Java (needed for rJava) first from a terminal:

sudo apt-get install openjdk-6-jre

which will install openjdk-6-jdk.
If this doesn’t work install all its packages:

sudo apt-get install openjdk-6-*

OR you might prefer openjdk-7-jdk

sudo apt-get install openjdk-7-*

You should find that it is installed using this command:

Continue reading

Mainframs, Unix, CERN computing center, Ubuntu driving Mercedes-Benz

Video

Here’s a couple of interesting videos I’ve watched recently:

Mainframes and the Unix Revolution

If you liked this video, I suggest you read the book “Turing’s Cathedral”. Check the review.

Continue reading

Take care of your eyes at the screen with Redshift

Standard
Before Redshit I was using f.lux [1] which seems to be broken in Ubuntu’s Unity. I searched for an alternative & found positive reviews about Redshift, which is inspired by f.lux.
By default, redshift fetches your approximate location using the internet (geoclue method) & uses it. if you prefer to manually set it, check the help. And if you, like me, prefer it to use a preset location &/or other configuration (without having to do it every time you run your system), create a text file named redshift.config under your ~/.config/ directory. You can do this from the terminal:
cd ~/.config/
gedit redshift.config
In this file, copy & edit the content below:

;This is a configuration file for the screen color temperature adjuster Redshift.

;Copy this file to your ~/.config/ directory for redshift to use.
;All lines starting with a semicolon areignored (e.g, adjustment-method).
;To change your location, edit the lat & lon numbers. If these two lines are set to be ignored, redshift will fetch your location using the internet.

; Global settings
[redshift]
temp-day=5700
temp-night=3500
transition=1
gamma=0.8:0.7:0.8
location-provider=manual
;adjustment-method=

; The location provider and adjustment method settings are in their own sections.
[manual]
lat=-22.871114
lon=-43.202591
Make sure to edit the numbers in the last two lines to correspond to your location, before saving & exiting the editor.
This way, every time redshift runs, it uses this configuration file. If you want it to automatically run on startup, add it to your Startup Applications (command: gtk-redshift for the gui & redshift for the cli).
Unlike f.lux, redshift only has a “toggle” option in the gui. The toggle toggles redshift on/off in case you need to. Other preferences are edited from within the configuration file or from the terminal.
 I’d like to thank the the code author, Jon Lund Steffensen, for making this tool; It is, to my knowledge, the only alternative to f.lux for Linux.
That’s basically it for now. May your eyes stress less while you work!

Thanks for reading