Difference between revisions of "Leo:Ubuntu config"

From DiLab
Jump to: navigation, search
(Secured Filesystem)
(Python)
 
(67 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{TocRight}}
{{TocRight}}
This list gets updated as I remember or install new essentials for my Ubuntu environment.
This list gets updated as I remember or install new essentials for my Ubuntu environment.
Older versions are also available for [[Leo:Ubuntu_config_18.04 | 18.04]]


A related list is my [[Ubuntu setup for a class]]


== Private config==
== Private config==
Line 15: Line 17:
One could keep the configuration in Dropbox or similar cloud storage, but I choose not to because of security reasons.
One could keep the configuration in Dropbox or similar cloud storage, but I choose not to because of security reasons.



== Before setup, BACKUP! ==
Remember to back up your old machine before tearing it down or installing over:
* home directory
cp -prx /home/myuser /media/backup/home/myuser
* /etc
* /var
* machine ssh keys, if you want to preserve them (from /etc/ssh)
* possibly mount points to other disks (from /etc/fstab)
* mysql (and other) databases. May need to dump to files, or stop the server before backup. Also make sure you know the path to the database files, they may be somewhere else.
* NFS config for the server or client, if you have one

== Ubuntu 18.04+ specific ==
Some things are gone or different since Ubuntu ~18.04. Here are the new solutions or workarounds.

If snap command is not found:
sudo apt install snapd

How to install pdftk (removed from apt sources)
sudo snap install pdftk

How to install blender
sudo snap install blender


== Config ==
== Config ==
Line 24: Line 49:
# Save file
# Save file
sudo acpid restart
sudo acpid restart


=== Restore machine key ===
Backup the old (source) machine keys (before the teardown or reinstall) from <code>/etc/ssh</code>, then copy to the target machine, same location. Modify the path below as needed.
cp -prx /etc/ssh /etc/ssh


== System essentials==
== System essentials==
Line 30: Line 60:
SSH server for remote access, subversion
SSH server for remote access, subversion


sudo apt-get install openssh-server subversion
sudo apt-get install openssh-server subversion git


====Desktop alternative====
====Gnome 3 Desktop ====
Gnome 3 and others


Gnome 3 is default in Ubuntu 18+, however if it is not, you can add it like this:
sudo apt-get install gnome-shell
sudo apt-get install gnome-shell

For Ubuntu 18+ use gnome-tweaks to add the date to the time in the top bar
sudo apt install gnome-tweak-tool
gnome-tweaks

'''[https://extensions.gnome.org/local/ Gnome extensions]''' management from the browser and gnome plugins:
* Install the GNOME Shell integration for your browser ([https://chrome.google.com/webstore/detail/gnome-shell-integration/gphhapmejobijbbhgpjhcjognlahblep?hl=en e.g. Google Chrome]).
* Install the host connector:
sudo apt-get install chrome-gnome-shell

Useful Gnome extensions:
* [https://extensions.gnome.org/extension/906/sound-output-device-chooser/ Sound Input & Output Device Chooser]


====Tweak tools====
====Tweak tools====
sudo apt-get install unity-tweak-tool
sudo apt-get install gnome-tweak-tool
sudo apt-get install compizconfig-settings-manager


The latest
Add [https://launchpad.net/~tualatrix/+archive/ubuntu/ppa Ubuntu-tweak]
[https://launchpad.net/~tualatrix/+archive/ubuntu/ppa Ubuntu-tweak]
is not in standard repos, so add the latest:
sudo add-apt-repository ppa:tualatrix/ppa
sudo add-apt-repository ppa:tualatrix/ppa
sudo apt-get update
sudo apt-get install ubuntu-tweak
sudo apt-get install ubuntu-tweak

The other tweak tools:
sudo apt-get install unity-tweak-tool
sudo apt-get install compizconfig-settings-manager


== Development environment==
== Development environment==
====Editors and IDEs====
====Editors and IDEs====


sudo apt-get install mc emacs-snapshot geany texinfo
sudo apt-get install mc geany texinfo


Install [http://www.sublimetext.com Sublime Text editor] from http://www.sublimetext.com/3
Install [http://www.sublimetext.com Sublime Text editor] from https://www.sublimetext.com/docs/linux_repositories.html
* My [[Sublime_Text_cheat_sheet]] for useful and magic keyboard shortcuts.
* My [[Sublime_Text_cheat_sheet]] for useful and magic keyboard shortcuts.


====Build and test tools====
====Build and test tools====
sudo apt-get install build-essential gtkterm
sudo apt-get install build-essential gcc gtkterm cmake

====Java====
sudo apt install default-jre
or for JDK:
sudo apt install default-jdk

====Python====
sudo apt-get install python python-pip python3-pip python3-numpy python3-matplotlib


====Version control====
====Version control====
Line 61: Line 115:


May also consider installing [http://sourceforge.net/projects/freefilesync/ FreeFileSync] for convenient file synchronization across directories or filesystems.
May also consider installing [http://sourceforge.net/projects/freefilesync/ FreeFileSync] for convenient file synchronization across directories or filesystems.
sudo add-apt-repository ppa:freefilesync/ffs
sudo apt-get update
sudo apt-get install freefilesync


=====Set up git=====
Set up your username and email from CLI:

git config --global user.name "myusername"
git config --global user.email "myemail"

If you use HTTPS:// for github access and want to cache your credentials (remember password for one hour):

git config --global credential.helper cache
git config --global credential.helper 'cache --timeout=3600'

Alternatively, you can switch to ssh access URL and [https://help.github.com/articles/generating-ssh-keys/ add your public key to github].

====File transfer====
sudo apt-get install gftp

====Cloud storage====
* Back up the dropbox files
* Download the latest deb from [https://www.dropbox.com/install Dropbox]
* Install this for key verification
sudo apt install python3-gpg
* Dropbox setup should start soon after reboot

====Development for msp430====
Install the toolchain for the msp430 tools

sudo apt-get install gcc-msp430 binutils-msp430 msp430-libc msp430mcu

You may need to add your user to dialout group to access serial/USB ports:
sudo usermod -a -G dialout <myuser>

== Documents and Latex ==

Sublime text editor

wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
sudo apt-get install apt-transport-https
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
sudo apt-get update
sudo apt-get install sublime-text

Latex tools:
sudo apt-get install texlive texlive-latex-extra texlive-xetex texlive-fonts-recommended texlive-publishers texinfo

PDF tools:
sudo apt-get install pdftk

Starting Ubuntu 18 pdftk is no more in the repositories. Do instead:
sudo snap install pdftk

Writing over PDF documents (filling forms, etc)
sudo apt-get install xournal


== Media ==
== Media ==
Line 67: Line 176:
=== Photos and graphics ===
=== Photos and graphics ===
sudo apt-get install gimp
sudo apt-get install gimp

=== Audio playback and edit ===
sudo apt-get install audacious audacity


=== Video playback and edit ===
=== Video playback and edit ===
sudo apt-get install ubuntu-restricted-extras flashplugin-installer mplayer avidemux vlc
sudo apt-get install ubuntu-restricted-extras flashplugin-installer mplayer vlc


To get DVDs playing nicely
To get DVDs playing nicely
Line 78: Line 190:
Media centers: Kodi/XBMC is now in Ubuntu repository. But I prefer the newer team-xbmc/ppa
Media centers: Kodi/XBMC is now in Ubuntu repository. But I prefer the newer team-xbmc/ppa


sudo apt-get install python-software-properties pkg-config
sudo apt-get install python-software-properties pkg-config software-properties-common
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:team-xbmc/ppa
sudo add-apt-repository ppa:team-xbmc/ppa
sudo apt-get update
sudo apt-get update
sudo apt-get install xbmc
sudo apt-get install kodi


Common codecs:
Common codecs:
sudo apt-get install libxine1-ffmpeg gxine mencoder totem-mozilla icedax tagtool easytag id3tool lame nautilus-script-audio-convert libmad0 mpg321
sudo apt-get install gxine mencoder icedax tagtool easytag id3tool lame nautilus-script-audio-convert libmad0 mpg321


== Latex ==
== Windows stuff ==


sudo apt-get install wine
sudo apt-get install texlive texlive-latex-extra texlive-xetex texlive-fonts-recommended texlive-publishers texinfo
sudo apt install winetricks

===Latest version of Wine===
Alternative to Ubuntu repository you might want to get the latest from WineHQ:
wget -qO - https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -
sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ focal main'
sudo apt update
sudo apt install --install-recommends winehq-stable
Now check the installation and configure for the Windows 7 or 10 or the version you want
wine --version
wine winecfg

===Wineprefix===
Create 32 bit wineprefix (as the default). I replaced the 64-bit one.
rm -rf .wine
WINEPREFIX=~/.wine WINEARCH=win32 winecfg
or(?)
WINEPREFIX=~/.wine WINEARCH=win32 wineboot

Then install windows programms as desired.
* Irfaview
* MS Office

Alternatively, get a prefix from backup, for example, a ".wine" prefix with irfanview and office installed. Copy it instead of the default ".wine" prefix. Then add the following files, properly configured, possibly also from backup:
* .local/share/applications/mimeapps.list
* .local/share/applications/mimeinfo.cache
* .local/share/applications/irfanview.desktop
* .local/share/applications/MS_Excel.desktop
* .local/share/applications/MS_PowerPoint.desktop
* .local/share/applications/MS_WinWord.desktop
* .local/share/applications/wine-extension-doc.desktop
* .local/share/applications/wine-extension-docx.desktop
* .local/share/applications/wine-extension-ppt.desktop
* .local/share/applications/wine-extension-pptx.desktop
* .local/share/applications/wine-extension-xls.desktop
* .local/share/applications/wine-extension-xlsx.desktop
* .local/share/icons/* - icon files for the apps, as pointed to by the desktop files.

=== Acrobat Reader on Wine ===
==== Install via Snap ====
snap install acrordrdc
snap connect acrordrdc:removable-media
snap connect acrordrdc:cups-control

==== Install by hand via Wine ====
Install some prerequisites
winetricks atmlib
winetricks riched20
winetricks wsh57
winetricks mspatcha

You may also want to get Windows fonts, from here:
* https://www.w7df.com/7/download.html
Copy them to /usr/share/fonts and run:
sudo fc-cache -vf


Then get the Acrobat reader installer (from https://get.adobe.com/reader/otherversions ) and run it:
wine AdbeRdr11008_en_US.exe


== Microsoft fonts ==
== Microsoft fonts ==
Line 97: Line 265:
sudo fc-cache -fv
sudo fc-cache -fv


Lately I have been repeatedly getting annoying message that getting the fonts has failed:

::Failure to download extra data files
::The following packages requested additional data downloads after package installation,but the data could not be downloaded or could not be processed.
:::ttf-mscorefonts-installer
::The download will be attempted again later, or you can try the download again now. Running this command requires an active Internet connection.

Here is how to fix this annoying message:
sudo apt-get remove --purge ttf-mscorefonts-installer
sudo apt-get install ubuntu-restricted-extras


== Virtual Box==
== Virtual Box==
Line 107: Line 285:
Cloud file storage such as Dropbox is nice. Even nicer if it is encrypted. Here is how:
Cloud file storage such as Dropbox is nice. Even nicer if it is encrypted. Here is how:


Install prerequisites:
====Install prerequisites====
sudo apt-get install encfs libpam-mount
sudo apt-get install encfs libpam-mount
sudo adduser <<yourusername>> fuse
sudo adduser <<yourusername>> fuse


For syncing you may want [https://raymii.org/s/articles/Set_up_your_own_truly_secure_encrypted_shared_storage_aka_Dropbox_clone.html dvcs-autosync for syncing with your own servers]:
Set up the mount for secured filesystem:
sudo apt-get install dvcs-autosync

====Set up the mount for secured filesystem====
encfs path-to-mountpoint-dir path-to-storage-dir-for-encrypted-files
encfs path-to-mountpoint-dir path-to-storage-dir-for-encrypted-files


Line 123: Line 304:
* ‘n’ for per-file initialization vectors
* ‘n’ for per-file initialization vectors
* ‘n’ for block authentication code headers
* ‘n’ for block authentication code headers
* '0' for no random bytes to each block header
* ‘y’ for file-hole pass-through
* ‘y’ for file-hole pass-through


Note, the mounted directory may not be able to use hard links to files due to chaining enabled.
Note, the mounted directory may not be able to use hard links to files due to chaining enabled.


Setup auto-mount at login:
====Setup auto-mount at login====
sudo gedit /etc/security/pam_mount.conf.xml
sudo gedit /etc/security/pam_mount.conf.xml


Line 137: Line 319:


Credit for this goes to [https://pragmattica.wordpress.com/2009/05/10/encrypting-your-dropbox-seamlessly-and-automatically/ this site].
Credit for this goes to [https://pragmattica.wordpress.com/2009/05/10/encrypting-your-dropbox-seamlessly-and-automatically/ this site].

====Alternative: Add encfs password to keyring====

Put the EncFS password into the keyring:
python gkeyring.py --set -n "Dropbox Private" -p encfs=dropbox --keyring login
> Password: <enter EncFS password here>

Mounting the EncFS folder with a Python script.
Add this script to the list of start-up applications:
#!/usr/bin/python2.6
import os.path
import subprocess
import sys
import gtk
import gnomekeyring as gk
# paths constants:
PATH_ENCRYPTED = os.path.expanduser("~/Dropbox/Encrypted")
PATH_DECRYPTED = os.path.expanduser("~/Private")
# get the encfs-dropbox item:
try:
items = gk.find_items_sync(gk.ITEM_GENERIC_SECRET, {"encfs": "dropbox"})
item = items[0] # clean up your keyring if this list has multiple items
except gk.NoMatchError:
print("no entry in keyring")
sys.exit(1)
# run encfs:
cmd = ["encfs", "-S", PATH_ENCRYPTED, PATH_DECRYPTED]
p = subprocess.Popen(cmd, stdin=subprocess.PIPE)
err = p.communicate(input="%s\n" % item.secret)[1]
# either there is an error or we are done:
if err:
print(err)
sys.exit(1)

Credit for this goes to [http://obensonne.bitbucket.org/blog/20100130-encfs-keyring.html this site]

== 3D printing support ==

We have Ultimaper 3D printer in the lab, and need the "Cura" slicer software for it. This can be installed from github or the [https://launchpad.net/~thopiekar/+archive/ubuntu/cura PPA], like this:

sudo add-apt-repository ppa:thopiekar/cura
sudo apt-get update
sudo apt-get install cura




== SSD tweaks==
== SSD tweaks==

Latest revision as of 18:35, 31 October 2024

This list gets updated as I remember or install new essentials for my Ubuntu environment. Older versions are also available for 18.04

A related list is my Ubuntu setup for a class

Private config

I have my private config in a SVN repository, so I can update my various workspaces. Some examples for stuff in my configuration:

  • startup scripts: .bashrc and various dot-files
  • aliases
  • ~/bin - various custom scripts
  • ~/lib - custom libraries
  • icons
  • work environment configurations, for example, custom menus in Nautilus

One could keep the configuration in Dropbox or similar cloud storage, but I choose not to because of security reasons.


Before setup, BACKUP!

Remember to back up your old machine before tearing it down or installing over:

  • home directory
cp -prx /home/myuser /media/backup/home/myuser
  • /etc
  • /var
  • machine ssh keys, if you want to preserve them (from /etc/ssh)
  • possibly mount points to other disks (from /etc/fstab)
  • mysql (and other) databases. May need to dump to files, or stop the server before backup. Also make sure you know the path to the database files, they may be somewhere else.
  • NFS config for the server or client, if you have one

Ubuntu 18.04+ specific

Some things are gone or different since Ubuntu ~18.04. Here are the new solutions or workarounds.

If snap command is not found:

sudo apt install snapd

How to install pdftk (removed from apt sources)

sudo snap install pdftk

How to install blender

sudo snap install blender

Config

Power button to shutdown, no prompts

sudo gedit /etc/acpi/events/powerbtn
  1. Add # to comment the line: # action=/etc/acpi/powerbtn.sh
  2. Add a new line: action=/sbin/poweroff
  3. Save file
sudo acpid restart


Restore machine key

Backup the old (source) machine keys (before the teardown or reinstall) from /etc/ssh, then copy to the target machine, same location. Modify the path below as needed.

cp -prx /etc/ssh /etc/ssh

System essentials

Communication, access

SSH server for remote access, subversion

sudo apt-get install openssh-server subversion git

Gnome 3 Desktop

Gnome 3 is default in Ubuntu 18+, however if it is not, you can add it like this:

sudo apt-get install gnome-shell

For Ubuntu 18+ use gnome-tweaks to add the date to the time in the top bar

sudo apt install gnome-tweak-tool
gnome-tweaks

Gnome extensions management from the browser and gnome plugins:

  • Install the GNOME Shell integration for your browser (e.g. Google Chrome).
  • Install the host connector:
sudo apt-get install chrome-gnome-shell

Useful Gnome extensions:

Tweak tools

The latest Ubuntu-tweak is not in standard repos, so add the latest:

sudo add-apt-repository ppa:tualatrix/ppa
sudo apt-get update
sudo apt-get install ubuntu-tweak

The other tweak tools:

sudo apt-get install unity-tweak-tool
sudo apt-get install compizconfig-settings-manager

Development environment

Editors and IDEs

sudo apt-get install mc geany texinfo

Install Sublime Text editor from https://www.sublimetext.com/docs/linux_repositories.html

Build and test tools

sudo apt-get install build-essential gcc gtkterm cmake

Java

sudo apt install default-jre

or for JDK:

sudo apt install default-jdk

Python

sudo apt-get install python python-pip python3-pip python3-numpy python3-matplotlib

Version control

sudo apt-get install git subversion rapidsvn meld

May also consider installing FreeFileSync for convenient file synchronization across directories or filesystems.

sudo add-apt-repository ppa:freefilesync/ffs
sudo apt-get update
sudo apt-get install freefilesync
Set up git

Set up your username and email from CLI:

git config --global user.name "myusername"
git config --global user.email "myemail"

If you use HTTPS:// for github access and want to cache your credentials (remember password for one hour):

git config --global credential.helper cache
git config --global credential.helper 'cache --timeout=3600'

Alternatively, you can switch to ssh access URL and add your public key to github.

File transfer

sudo apt-get install gftp

Cloud storage

  • Back up the dropbox files
  • Download the latest deb from Dropbox
  • Install this for key verification
sudo apt install python3-gpg
  • Dropbox setup should start soon after reboot

Development for msp430

Install the toolchain for the msp430 tools

sudo apt-get install gcc-msp430 binutils-msp430 msp430-libc msp430mcu 

You may need to add your user to dialout group to access serial/USB ports:

sudo usermod -a -G dialout <myuser>

Documents and Latex

Sublime text editor

wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
sudo apt-get install apt-transport-https
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
sudo apt-get update
sudo apt-get install sublime-text

Latex tools:

sudo apt-get install texlive texlive-latex-extra texlive-xetex texlive-fonts-recommended texlive-publishers texinfo

PDF tools:

sudo apt-get install pdftk

Starting Ubuntu 18 pdftk is no more in the repositories. Do instead:

sudo snap install pdftk

Writing over PDF documents (filling forms, etc)

sudo apt-get install xournal

Media

Photos and graphics

sudo apt-get install gimp

Audio playback and edit

sudo apt-get install audacious audacity

Video playback and edit

sudo apt-get install ubuntu-restricted-extras flashplugin-installer mplayer vlc

To get DVDs playing nicely

sudo apt-get install libdvdread4 
sudo /usr/share/doc/libdvdread4/install-css.sh

Media centers: Kodi/XBMC is now in Ubuntu repository. But I prefer the newer team-xbmc/ppa

sudo apt-get install python-software-properties pkg-config software-properties-common
sudo add-apt-repository ppa:team-xbmc/ppa
sudo apt-get update
sudo apt-get install kodi

Common codecs:

sudo apt-get install gxine mencoder icedax tagtool easytag id3tool lame nautilus-script-audio-convert libmad0 mpg321

Windows stuff

sudo apt-get install wine
sudo apt install winetricks

Latest version of Wine

Alternative to Ubuntu repository you might want to get the latest from WineHQ:

wget -qO - https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -
sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ focal main'
sudo apt update
sudo apt install --install-recommends winehq-stable

Now check the installation and configure for the Windows 7 or 10 or the version you want

wine --version
wine winecfg

Wineprefix

Create 32 bit wineprefix (as the default). I replaced the 64-bit one.

rm -rf .wine
WINEPREFIX=~/.wine WINEARCH=win32 winecfg
  or(?)
WINEPREFIX=~/.wine WINEARCH=win32 wineboot

Then install windows programms as desired.

  • Irfaview
  • MS Office

Alternatively, get a prefix from backup, for example, a ".wine" prefix with irfanview and office installed. Copy it instead of the default ".wine" prefix. Then add the following files, properly configured, possibly also from backup:

  • .local/share/applications/mimeapps.list
  • .local/share/applications/mimeinfo.cache
  • .local/share/applications/irfanview.desktop
  • .local/share/applications/MS_Excel.desktop
  • .local/share/applications/MS_PowerPoint.desktop
  • .local/share/applications/MS_WinWord.desktop
  • .local/share/applications/wine-extension-doc.desktop
  • .local/share/applications/wine-extension-docx.desktop
  • .local/share/applications/wine-extension-ppt.desktop
  • .local/share/applications/wine-extension-pptx.desktop
  • .local/share/applications/wine-extension-xls.desktop
  • .local/share/applications/wine-extension-xlsx.desktop
  • .local/share/icons/* - icon files for the apps, as pointed to by the desktop files.

Acrobat Reader on Wine

Install via Snap

snap install acrordrdc
snap connect acrordrdc:removable-media
snap connect acrordrdc:cups-control

Install by hand via Wine

Install some prerequisites

winetricks atmlib
winetricks riched20
winetricks wsh57
winetricks mspatcha

You may also want to get Windows fonts, from here:

Copy them to /usr/share/fonts and run:

sudo fc-cache -vf

Then get the Acrobat reader installer (from https://get.adobe.com/reader/otherversions ) and run it:

wine AdbeRdr11008_en_US.exe

Microsoft fonts

...so that MS documents look better.

sudo apt-get install msttcorefonts
sudo fc-cache -fv

Lately I have been repeatedly getting annoying message that getting the fonts has failed:

Failure to download extra data files
The following packages requested additional data downloads after package installation,but the data could not be downloaded or could not be processed.
ttf-mscorefonts-installer
The download will be attempted again later, or you can try the download again now. Running this command requires an active Internet connection.

Here is how to fix this annoying message:

sudo apt-get remove --purge ttf-mscorefonts-installer
sudo apt-get install ubuntu-restricted-extras

Virtual Box

Get the latest VirtualBox for Linux here.

After that, restore your saved VirtualBox images. The location depends on your current version and setup, but here are a few usual suspects: ".VirtualBox", "VirtualBox VMs"


Secured Filesystem

Cloud file storage such as Dropbox is nice. Even nicer if it is encrypted. Here is how:

Install prerequisites

sudo apt-get install encfs libpam-mount
sudo adduser <<yourusername>> fuse

For syncing you may want dvcs-autosync for syncing with your own servers:

sudo apt-get install dvcs-autosync

Set up the mount for secured filesystem

encfs path-to-mountpoint-dir path-to-storage-dir-for-encrypted-files

Enter the relevant parameters and the password (Same as for the logging in, if you want to auto-mount this at login). 'p' for paranoia parameters work, but 'x' for expert may yield better performance with the following options:

  • ‘1’ to use the AES cipher algorithm
  • ‘256’ for the key size
  • ‘1024’ for the block size
  • ‘1’ for block filename encoding
  • ‘y’ for filename initialization vector chaining
  • ‘n’ for per-file initialization vectors
  • ‘n’ for block authentication code headers
  • '0' for no random bytes to each block header
  • ‘y’ for file-hole pass-through

Note, the mounted directory may not be able to use hard links to files due to chaining enabled.

Setup auto-mount at login

sudo gedit /etc/security/pam_mount.conf.xml

Look for the line:

<!-- Volume definitions -->

Add this new line below:

<volume user="<yourusername>" fstype="fuse" path="encfs#/home/<yourusername>/<encfs-storage-dir>" mountpoint="/home/<yourusername>/<encfs-mountpoint>" />

Credit for this goes to this site.

Alternative: Add encfs password to keyring

Put the EncFS password into the keyring:

python gkeyring.py --set -n "Dropbox Private" -p encfs=dropbox --keyring login
> Password: <enter EncFS password here>

Mounting the EncFS folder with a Python script. Add this script to the list of start-up applications:

#!/usr/bin/python2.6

import os.path
import subprocess
import sys
import gtk
import gnomekeyring as gk

# paths constants:
PATH_ENCRYPTED = os.path.expanduser("~/Dropbox/Encrypted")
PATH_DECRYPTED = os.path.expanduser("~/Private")

# get the encfs-dropbox item:
try:
    items = gk.find_items_sync(gk.ITEM_GENERIC_SECRET, {"encfs": "dropbox"})
    item = items[0] # clean up your keyring if this list has multiple items
except gk.NoMatchError:
    print("no entry in keyring")
    sys.exit(1)

# run encfs:
cmd = ["encfs", "-S", PATH_ENCRYPTED, PATH_DECRYPTED]
p = subprocess.Popen(cmd, stdin=subprocess.PIPE)
err = p.communicate(input="%s\n" % item.secret)[1]

# either there is an error or we are done:
if err:
    print(err)
    sys.exit(1)

Credit for this goes to this site

3D printing support

We have Ultimaper 3D printer in the lab, and need the "Cura" slicer software for it. This can be installed from github or the PPA, like this:

sudo add-apt-repository ppa:thopiekar/cura
sudo apt-get update
sudo apt-get install cura


SSD tweaks

These may become obsolete as the new OS versions take in account the SSD particularities automatically.

  • Add noatime option for the partition on SSD in /etc/fstab
UUID=my-partition-key  /  ext4    noatime,errors=remount-ro 0       1
  • Create /tmp in RAM by editing /etc/fstab
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
  • Set the scheduler to deadline (as opposed to cfq) in grub
    • Check for the options:
cat /sys/block/sda/queue/scheduler
    • Temporary change the scheduler
sudo su
echo deadline > /sys/block/sda/queue/scheduler
  • Move Firefox cache to /tmp/...
    • open [about:config] in firefox
    • create new string browser.cache.disk.parent_directory and set value to /tmp
  • Check the read speed of your HD:
sudo hdparm -t /dev/sda