Python 3.6 on Ubuntu 16.04

On Ubuntu 16.04, there is a version of Python installed by default.

You should not uninstall it or it will break your machine.

Install Python 3.6

sudo apt-get install software-properties-common python-software-properties
sudo add-apt-repository ppa:jonathonf/python-3.6
sudo apt-get update
sudo apt-get install python3.6

Now you can use python 3.6. Check the version by using

python3.6 -V

Install pip for Python 3.6

curl | sudo python3.6

Now pip is installed for Python3.6 and can be used to add package to this interpreter.

Install package for Python 3.6

sudo python3.6 -m pip install Flask



Xubuntu – Screensaver – Slideshow from folder

  • Install XScreenSaver
  • Set the folder to read the images fromScreenshot_2018-01-03_09-41-53
  • Set the screensaver to GLSlideShow
  • Tweak the parameters as needed
  • Add a new entry in ~/.config/autostart/xcreensaver.desktop
    [Desktop Entry]
    Exec=xscreensaver -nosplash

QCopy – ClipBoard manager – Ignore KeePass entries

I installed QCopy on Xubuntu along with KeePass2.

Of course, I don’t want my password copied from KeePass to be available in QCopy history. Everything coming from KeePass must be ignored by QCopy!

To do so, I followed the instructions from the Official QCopy documentation:

Add and modify automatic command to ignore text copied from the window:

  1. open “Command” dialog (F6 shortcut),
  2. click “Add” button in the dialog,
  3. select “Ignore Password window” from the list and click “OK” button,
  4. select “Show Advanced”
  5. change “Window” text box to match the title (or part of it) of the window to ignore (e.g. KeePass),
  6. click “OK” button to save the changes.


This new command should be at top of the command list because automatic commands are executed in order they appear in the list and we don’t want to process sensitive data in any way.



Expect script – Read / write file

Thanks to this source :

To read data from a file in an Expect script:

#!/usr/bin/expect -f

set fd "input.txt"
set fp [open "$fd" r]
set data [read $fp]

# Read line by line

foreach line $data {

puts "$line\r"


And to write data to a file:

#!/usr/bin/expect -f

set outputFilename "output.txt"
set outFileId [open $outputFilename "w"]

puts -nonewline $outFileId "A first line\n"
puts -nonewline $outFileId "A second line\n"

#Close file descriptor to ensure data are flush to file
close $outFileId

Linux – Mount a shared folder with virtualbox

To mount a shared folder (previously configured in the VM’s parameters), launch the following command:

sudo mount -t vboxsf -o uid=$UID,gid=$(id -g) NameOfSharedFolderInVMConfig PathToMount

as sudo user

For example, I have configured this shared folder : Capture

So in my VM, I launch this command to mount the shared folder under the “Labs” folder of the home folder


sudo mount -t vboxsf -o uid=$UID,gid=$(id -g) Labs ~/Labs/