Archives for March 2018

libPath in R fucked up

In case of libPath not working correctly, something like that should do the trick:

mkdir -p ~/R/x86_64-pc-linux-gnu-library/3.4

And add in ~/.Renviron


Remote graphics on linux server

So you have a great ubuntu server running somewhere and you want to display graphics from the server?

Visualize the current user desktop

That is actually really easy through VNC in ubuntu:

  1. On the server use Desktop sharing (simply enter “Desktop sharing” in the Dash)
    1. click on “Allow users to see your desktop”
    2. click on “Require … password” and set a password
    3. Give the ip address (click on the screen icon at the top of your screen to see it) and the password to the person
  2. On the (ubuntu) client
    1. start “Remote desktop viewer”
    2. select VNC protocol, enter IP address
  3. User on the server need to accept the connection

All set! I used these more complete instructions.

Open an independant graphic session

The problem with the vnc approach is that you cannot have two different users on the same server at the same time.
The best option I found for now is to use xRDP, the windows protocol. The set up is very well described here. Hereafter a short summary.

Server set up

It requires to install xrdp and xfce4 on the server, It’s quick, don’t worry:
sudo apt-get install xrdp xfce4

Then for each user allowed to connect simply run users terminal:
echo xfce4-session >~/.xsession

When done for all users, restart xrdp:
sudo service xrdp restart

Then give the ip to the users, you can get it in the terminal with hostname -I.

Client connection

  •  Windows: simply open “Desktop client”, enter your ip address and user name on the ubuntu machine
  • Ubuntu: I recommand installing Remmina
    • Be sure to choose “RDP” protocol, enter IP and linux user name
    • play with the options to make sure you have the best possible experience with your network
  • RDP should work ok under mac but I didn’t test it (yet)
    • Install from the mac app store
    • start it and enter IP and linux user name
    • Works ok but for non qwerty keyboard that are not correctly recognized

With a ubuntu client this is the best experience I had (careful though, if the user is already connected graphically, some softwares may not like to be relaunched, firefox typically doesn’t like it).

Just launch graphic application through ssh (slow)

If nothing else is possible, you can always to simple X11 forwarding under ssh, but it’s slow.

Specific linux client


Specific mac client

You need to first install XQuartz
Then open, and in the terminal follow intructions for all clients.

Specific windows client

Install putty, and enable X11 Forwarding

All clients

In the terminal:
ssh -X myserver
Then you can test xdisplay with
You can even launch a file explorer:
It’s real slow for the set up but then file exploration is ok.
This solution still is really slow (try for example plotting complex graphics in R…

Are we more bacteria than human ?

Didn’t you have this discussion with your scientific minded friends: so many bacteria in your intestine, on your skin etc. that actually you may be more bacteria than human? I sure had this discussion with two Ivy League university professors who were 100% sure there was more bacteria than human DNA in the typical 70kg man.

So what are the orders of magnitude?

A recently published PNAS article sets the records straight:

  1. There are slightly (<3%) more bacteria than human cells in a human body
  2. Their total mass is 350 times less than that of human cells

That implies that total DNA content is about 1000 times less than total human DNA as the number of cells is about the same and the human genome at ~3 billion base pair is 1000 times the typical bacterial genome size.

Of course that’s without counting mitochondria which might be considered as endosymbiotic bacteria.

So sure, bacteria in a human body are important, but not completely overwhelming our “own” genetic information :-)