Tag: ubuntu

How to connect externally from a WSL (Ubuntu) running on a windows 10

I had to move to a Windows 10 computer for work, and even if I’m not working a lot on code and so forth, I need sometime to create an ipython notebook or try to launch some code I’ve got from github.

Having the ability to install the ubuntu distribution via the WSL2, directly form the Microsoft Store is a great help. The ability to use Visual Studio which connects to these “magic” area of the filesystem makes also the editing nice and easy.

Usually I like to go with the console, and I’m using the Windows Terminal, which is able to launch several environments in a native way.

However there is a little snag: you cannot contact the outside world or the internet, because by default the Windows firewall says no.

It’s easy to fix, thogh: Open the PowerShell as Administrator and launch:

`New-NetFirewallRule -DisplayName “WSL” -Direction Inbound -InterfaceAlias “vEthernet (WSL)” -Action Allow`

as shown below

Power Shell running as Admin

After that, you are golden. Unfortunately, for me, I have to re-run that every time I re-boot or come back from a Suspend. I would be very interesting to know if someone figure out how to do it in a permanent way.

How to get WebEx running on an Ubuntu smoothly

Being 2016, there are a lot of ways to get on a video link between people.

While Skype, Viber, Whatsup or anything else can open a video connection and can be used between friends, in business world the options are a little bit more limited.

One of the option that is on par with the time is google hangout, and if your company has google apps, you can set up nice meeting, directly attached to your calendar invitation. It’s awesome and I like it a lot. My choice.

However, in biz space old habits are hard to die, therefore people stick to things like gotomeeting, which is not too bad, or the worse thing ever supported on Linux, WebEx.

To run the WebEx on Linux is a nightmare, to put it mildly. The WebEx is a java application, but they made sure that you can only run the 32 bit, and you can launch the applet only using a Firefox 32 bit installation. As I said, they may have their own reasons, but honestly I don’t really get it, and I think it is super crazy.

After battling with it for at least 4 hours, I found a reproducible way to get it going.

Here are the steps:

1) Install Firefox an 32 bit and some libraries for nice appearance.

sudo apt-get install firefox:i386 libcanberra-gtk-module:i386 gtk2-engines-murrine:i386 libxtst6:i386

2) Download the jre from oracle:

This is the link where you can pick the jre. Get the tar package, not the rpm http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html

3) Create a dedicated dir and untar it there

mkdir ~/32bit
cd ~/32bit
tar xvf ~/Downloads/jre-8u73-linux-i586.tar.gz

4) Add the plugin to firefox

mkdir ~/.mozilla/plugins

5) Link the plugin

ln -vs ~/32bit/jre1.8.0_73/lib/i386/libnpjp2.so ~/.mozilla/plugins/

Now you are all set!

In my test I was able to share the screen, to use the audio from the computer, and everything was working ok.

Good luck, and honestly, if you can, avoid WebEx.

Running Ubuntu on an old Mac Book Pro

ubuntu_on_mac

Ubuntu on a Mac, because of reasons

Prolugue

My computer served me well up to now, however it started to show it’s age. It is an old DELL XPS 13 inches, from 2008. The .. emh, beast, has one CPU, virtualized to two and a whopping 4 Gb of RAM (which is not bad). However the right hinge cracked not too long ago, and it was becoming too slow when trying to play with new toys (docker, I’m looking at you).

This fact, together that the operating temperature was always around 80/90 degrees, had transform it on a very cumbersome machine to work on. Maybe with an external monitor/keyboard and mouse could have improved the situation a little, however I tend to work always on the go, and I do not have a proper working desk, mostly working in the kitchen.

Therefore I’ve started to look in the market for a replacement. The problem was I want a unicorn laptop, which does not exist due to physics’ laws.

Let me explain: I’ve wanted the latest badass videocard from NVIDIA, the craziest Intel CPU and the laptop should also run both quietly and cool.

Now this sounds pretty insane specs, and they are. There are laptop out there, especially the gaming ones, that have super powerful CPUs and video card, however they run pretty hot, and the fans are always on, making them quite noise and not exactly a pleasure to work with.

On top of this the battery also gets a beating, due to the extra power used by these hungry appliances.

Therefore nothing was fitting the bill.

Ubuntu on Mac Book Pro

Given the fact I was not really falling in love with any computer out there, I start to look for other solutions. It turned out that my girlfried had an old Mac Book Pro (2010) that she was not using any more, because she upgraded to a mac book air a bunch of years ago.

This left a decently powerful computer (4 virtualized CPUs, 8 Gb of RAM) available, so I’ve decided to test drive it.

There was never an option to use OSX because: a) I’m not a fan, b) I really like Linux and the freedom that comes with it, c) it’s impossible to get it to do what you need to do it.

I guess also, having used Linux for more than 15 years as my primary system, and loving it for development and data science, has influenced my view on this.

Few constraints I had before attacking the problem:

  1. the OSX partition must remain and still be useful. Was not a must but a nice to have thing
  2. The data attached to that OS should be conserved, and having access to them via the OSX would be the best solution

We are going for dual boot (oh yeah!!!), without blowing up the whole disk (oh double yeah!!!).

This laptop sports a 500 Gb harddrive, and the total amount of space used by the OSX plus the data is around 150 GB, hence I was able to cut more or less 350 GB to use for Ubuntu as I pleased.

How I did it:

  • I’ve installed rEFIt on it to manage the dual boot (yep, it’s been abandoned, but it does the job)
  • I’ve installed Ubuntu 14.04 from a live CD (you need to press the Alt Left or also known as Option key to get the machine to read the CD at boot)
  • I’ve tried to use the Nvidia driver, failed badly, given up and sticked with the opensource nouveau, which do a pretty decent job.

For the partition I’ve followed the same strategy I’ve written about here

Impressions so far

  • The computer is quieter than my previous one, and it’s a lot snappier. Tha fan do work, once you have installed the macfanctld package
  • The keyboard is nice, however I’m not used to the layout of the Command key and the Alt key. So I may look into re-mapping them.
  • The Fn button together with the Function key (F1-F12) are inverted. This means that to press F4 you have actually to press (wrong) Alt-Fn-F4. Basically I’m better off to click close with the mouse.
  • The right click can be obtained touching the trackpad with two fingers at the same time, ’cause we’ve got only one button.
  • The layout picked does not really match the keyboard anyway, but I do not care, ’cause I’m using my muscle memory, and I’m doing just fine (the is where there is the “, for example).

So I’ve gained in speed and got a slightly odd keyboard and right click, which I need to relearn (no other option for the right key), and maybe re-map for the keys. I guess if I have used this layout all the time, these were not an issue.

I’ll keep it, for now.

One or two things you should know about the desire

Htc Desire - a Droid with power. A lot of power.

It works.

It works very well.

After upgrading to the latest Android system (2.2) and resetting the phone with a data connection (I’m on O2 bolts on for internet, 7.50 £ per monthe for 500 Mb) the phone works very well.

This morning I just transferred a Pdf file from my computer (which runs ubuntu 10.04.. I mean GNU/Linux …) to the phone using bluetooth.

Just start the service, making the pc and the phone discorevable and then it was done. No black magic.

Now I’m back home, one of my job failed at the cluster. (Read my mail on HDSPA.) My internet is down ’cause virgin is having troubles for two days, right now.

So I’ve just shared the connection from my phone and I’m using it to go online, submit the failed job after correcting the problem and writing this post.

I don’t know what do you think, but I think this is sweet 🙂

Skype and Ubuntu 8.10

If you wondering why Skype is not anymore working with your new shiny Intrepid Ibex 8.10 you’re not alone.

It seems pulseaudio is somehow responsible for this bad behaviour. To bring back everything to the normal situation:

killall pulseaudio
sudo apt-get remove pulseaudio
sudo apt-get install pulseaudio ubuntu-desktop

This should solve the problem. It worked here at least. 🙂

Update: I found out that only the command
killall pulseaudio
is enough.
After that you have to launch skype and it should work.

The annoying bit is that you required to do that every time you want to use skype…

Java and gtk error

Problem: ugly program (no theme applied)
If you get an error like:

/usr/share/themes/Unity/gtk-2.0/gtkrc:41: error: lexical error or unexpected token, expected valid token

when you launch a java program under a GTK enviroment (GNOME) and the program looks really ugly or even it doesn’t start at all you may want to try the following..

Solution: Upgrade to the last 1.6 jdk.

To updgrade to the latest sdk in ubuntu follow this info:

sudo apt-get install sun-java6-jre

and select as the blessed ones:

sudo update-java-alternatives -s java-6-sun

check it:

java -version

If everything is ok launch you program 🙂

P.S.: Check that the program that you’re launching is not using a proper jre (so 1.5) otherwise all your effort will be useless.

And it works. Out of the box

Oggi, dopo varie telefonate/mails alla DELL mi arriva il famoso remote control dell’XPS

Allora metto la pila e sono già pronto a compilare il kernel 7-8 volte, giusto per non farsi mancare niente, leggermi tutto il forum di ubuntu, mezzo quello di debian e scaricare qualche pacchetto da qualche oscuro sito…

Prima però metto una presentazione e clicco il pulsante avanti.

E… si. La slide cambia. Si passa dalla 1 alla due. La cosa continua tranquilla. Poi arrivo ad una slide con le animazioni.. Le animazioni vengono eseguite correttamente e la slide non viene saltata.

Funziona!!! It works!!

A questo punto, ci viene l’idea malsana di provarlo con Rhythmbox. Lancio rhythmbox e… ops it did again!

Funziona!! Posso cambiare la canzone, mettere in pausa/play/stop, alzare,abbassare il volume ed azzerarlo.

Funziona tutto.

Sono impressionato. I vecchi gloriosi giorni sono finiti. Linux funziona. Semplicemente è un dato di fatto, con prove scientifiche a supporto.

Piccoli risoluzioni e problemi marginali

Ho fatto l’upgrade da feisty a gutsy ed ho scoperto due cose importanti:

L’ avanzamento viene eseguito con

update-manager -d -c

senza utilizzare sudo, perchè l’update-manager si interfaccia con D-Bus e non c’è nessun D-Bus funzionante per l’utente root. Quindi dovete farlo da utente normale.
Evolution, subito dopo l’aggiornamento fà un casino bestia con lo SPAM, perchè il nuovo plugin di default è bogofilter. Siccome a me non funziona e Spamassasin si è sempre comportato molto bene ho deciso di riutilizzare quello. Dovete ricordarvi di installarlo però.

sudo apt-get install spamassassin

Firefox fa un pochino casino con il suono quando ci sono i video col sonoro (credo un conflitto con skype o cose del genere).