Getting started

Getting Started with Linux at the Department of Geosciences

Welcome! The department has quite a few options for Linux users, but some things need some explanations. This page (and the accompanying pages) tries to do just that.

Shortcuts: Distros | Root | Hardware | Login | WiFi | Mail | Print | Focus | Zoom | Storage : snapshot cloud | Modules: matlab python | Windows: view calendar RDP

You can connect to our servers, or run Linux on your own machine.


Supported Distributions

If you want Linux on your own machine, you need to decide on a Linux distribution. Note that dualboot is not supported at UiO.

On UiO, only RedHat Enterprise Linux and Fedora Linux is supported — typically the last two major releases. As of 2020, Ubuntu 20.04 ("focal fossa") is semi-supported. 

(We have no indication if newer Ubuntu releases will be supported. My personal guess is it won't happen.)

Fedora usually has newer versions of popular desktop software, and possibly better support for new hardware. Fedora also works with Dropbox for laptops. Matlab is only supported for RHEL (but might work for Fedora or Ubuntu too). Fedora has a short lifecycle, so a Fedora machine will need to be upgraded about once a year, while RHEL releases lasts many years, as do Ubuntu 20.04 LTS.

The choice is yours. Our suggestion would be to go for the latest RHEL on your desktop, and Fedora on your laptop. Ubuntu is popular, but if you have newer hardware, "focal fossa" might be a poor choice.

If you want to run other distros (like Mint) you can do so, but the following limitations apply:

  • You cannot be connected to the cabled network (WiFi is fine).
  • You cannot expect as much support from us (the IT staff).
  • You cannot have a dualboot system with an UiO-supported OS (Linux or Windows).
  • You cannot mount your network home directory with NFS (sshfs is fine).

In some cases we can provide 802.1x authenticated connection on a cable for these non-standardized distros. Note that by our experience, 802.1x has some issues. Do not expect this to be a smooth ride.


Root Access?

Unfortunately, you can not have root access on your Linux workstation. You will have to ask us to install .rpm (or .deb)  packages or do other administrative tasks.

On a Laptop, you can have sudo rights if you want to, but you will then not be permitted to reach your network home directory directly (ie. with NFS).  You will have to use sshfs or some similar mechanism to back up your local files. (On a laptop, you'll most likely need to do this anyway.)

On a non-standardized distro, you can be root and do whatever you want (see above).


Hardware

If you are a full-time employee, the Department will provide you with a computer. Otherwise, you can purchase hardware with your grant.

Usually, we will also have machines that we can lend to e.g. guests.

You can bring your own (private) machine and connect to the WiFi, but we can not provide any support for that.


Login

Your regular UiO account is used to log in to all machines (username and password). Do not precede the username with "uio\" or add "@uio.no"  when logging in to Linux.

Tip: You will at some point need to log in from machines with a strange or non-standard keyboard setup. Make it easier for yourself, and use a long password that only contains alphanumeric ASCII characters (including space), but no "special" characters like +&%#* or ÆØÅ.

You can change your UiO password at https://password.uio.no . If you ever receive a message directing you elsewhere to change it, it is probably a phishing attempt. See also How to make a good password.

To log in on Department Linux machines, you need to be a member of the group "geofag" or "geostud". If we forgot to add you there (check on brukerinfo), get in touch and please except our apology.

Apart from desktop and laptop machines, the Department has a few servers for general use and remote login. For a list of available login servers, and some login tips, see this page.


WiFi

The WiFi name at UiO is eduroam, which is a collaboration with many universities et.c. around the world. If you arrive as guest from an institution using eduroam, you might connect automatically.

To enable eduroam on your Linux computer, we recommend using the Configuration Assistant Tool (CAT). Run it like this:

/usr/local/bin/eduroam-linux-UiO-U.py

Or just download the CAT yourself from the eduroam site.

For eduroam purposes, your user-ID is your user name followed by "@uio.no", e.g. hpverne@uio.no.


Mail

You can set up any mail client you want. My personal preference is Thunderbird, and you can see some instructions here. In short, use STARTTLS and Normal Password for both incoming and outgoing connections (imap.uio.no/port 143  and smtp.uio.no/port 587, respectively). If you have a laptop (or home computer), see the guide (link above) for how to set up a SOCKS5 proxy.

For a stationary machine at UiO, you should disable downloading mail for off-site use. You do this in "Account settings", make sure the box is unticked:

How to turn off Message Synchronizing

On a Desktop or Server, you won't be off-site, and keeping messages will just clutter up your home directory. On a Laptop, you can check the "Keep messages" box (if you want to).

Using the Exchange Calendar in Linux is unsupported. Use OWA.


Printing

If your machine is running a supported OS, printing should be enabled by default. Just print to any of the «pullprint» queues and collect the prints with your employee or student card.

Setting up printing for other machines, or setting up a card, is described here.

You can also submit jobs to the queue by uploading a PDF or similar to mobilprint.


Sloppy focus

In a windowing environment, only one window at the time can accept input from your keyboard, i.e. have focus. On most systems, you select this window by clicking in it.

With Gnome, you can also choose «sloppy» focus, so that whatever window has the mouse pointer has focus, you don't need to click it.

To achieve this, install the package gnome-tweaks, and run the eponymous application. You should be able to set windows focus to your preference, and quite a few other things as well.


Here you will find a few more in-depth articles for Linux users. You might also want to have a look at the storage guide.

The rest of this article will cover some issues that do not warrant its own article.

 


Zoom

The zoom client is installed and updated automatically on Fedora and RedHat.

On Ubuntu machines, you can install and update it manually:
wget -nv -O /tmp/zoom_amd64.deb https://zoom.us/client/latest/zoom_amd64.deb
sudo apt-get -y install  /tmp/zoom_amd64.deb

When started, the client will ask you to log in, select SSO (single sign-in). You should be presented with a familiar login window in your browser, perhaps you will be logged in automatically.

In some cases, the client will ask you for your organization, and you can type in "uio". If this doesn't work (the browser can't find the page), try typing in the full name "uio.zoom.us" in the zoom dialogue box, or correct the address in the browser address bar.

Storage and Backup

At UiO, you will have a network home directory, available on the servers and desktop machines; on Linux, Windows, and also Macintosh. On Windows, this is historically known as "the M:-drive".

Data stored on your network home directory is covered by central backup, and is safe from hardware failure and accidental data loss. This is the case also for project storage on the «lagringshotell», and e.g. Astra storage.

(Some limitations apply, e.g. deleted files are also deleted permanently from the backup system after 90 days.)

On a laptop, you will have your home directory on a local disk. A local disk drive is not covered by any central backup routines. It is important that you develop a routine for backing up data you keep on local drives! Simply copying the data to your network home directory at regular (and frequent) intervals could be a simple and good strategy.

(BTW, this is not a Linux issue, it goes for Windows and Mac laptops, too!)

Snapshot

Network drives at UiO (e.g. your home directory) have a very useful feature called snapshots. It is simply a «hidden» directory containing older versions of your files.  Snapshots are made regularly, and will typically cover a few days back in time.

To access, simply go to the .snapshot directory (for your home directory), or .snapshots (hypatia).  Note that this directory doesn't show up in a normal directory listing:

$ ls -a | grep -c snapshot
0
$ date
Wed Apr 24 17:15:52 CEST 2019
$ cd .snapshot
$ ls -F
2019-04-18_0001+0200.nightly/  2019-04-23_1600+0200.hourly/
2019-04-19_0001+0200.nightly/  2019-04-23_1700+0200.hourly/
(...)

The content of the .snapshot directory is the individually timestamped snapshots. (The example shown here is for your home directory, it looks slightly different on hypatia).  You can enter any one of them, e.g. to retrieve a file you accidentally lost after the timestamp:

$ cd 2019-04-23_1600+0200.hourly
$ ls
(...)
$ cp -i accidentally_deleted_file ~/file.recovered_from_snapshot

If you are unsure when you lost the file, you can inspect all the snapshot versions:

$ ls -l .snapshot/*/accidentally_deleted_file

Snapshots are implemented magically by the storage system. Even if it appears to hold numerous identical versions of each file, the files are not really duplicated on disk.

When a snapshot has expired, you will need to contact us to get the file in question back from central tape backup. Note that backups are generally not kept more than 90 days after a file is deleted.

Cloud Storage

We have rudimentary support for certain cloud storage systems for Linux.

Dropbox

Dropbox is only supported for Fedroa (and Ubuntu), and it will only work with ext4 file systems (as stated in the Dropbox system requirements). Furthermore, the Dropbox app insists that your dropbox folder is a real directory (not a symlink) directly under your home directory (~).

The upshot of this is that Dropbox can not (easily) be used on a stationary machine with network home directories, but should work fine on Fedora or Ubuntu laptops.

If you plan to use Dropbox on your Linux laptop, make sure your home directory (or at the very least, your dropbox folder) uses the ext4 file system. This is default, so you're probably good. Also, you will need local free space at least as big as your cloud storage space (or you must disable some sub-directories from local storage). Get in touch if you need our help to check or fix that.

The Dropbox app should work with any Dropbox account, including UiO-Dropbox. This has not been tested by us.

Google Drive

Files in Google Drive can be accessed through Nautilus, the file browser in Gnome. To get started, enter your «Settings» in Gnome, typically under the «System Tools» menu item:

The Settings is found in the Applications -> System Tools menu item

Find the «Online Accounts» setting, and click to add the «Google» entry:

Log in with your Google credentials. Note that you will have to accept a truckload of privacy warnings. You might want to limit what data you want Gnome to access to files only:

When this is set up, you can access files in your Google Drive in Nautilus, you should see an entry for your Drive in the Gnome «Places» menu, or in the sidebar of the file browsing window.

Note that this will not permit you general file access in e.g. the shell.  You have to use Nautilus!

This procedure should also work with G-suite at UiO. Not tested by us.


Modules

Apart from the programs that can be installed with the OS, most of the software that we provide for our Linux servers is collected in modules. A module is simply a directory tree containing all the software, and an accompanying module file describing how to use it.

Many pieces of software comes in various versions, but with the module you can decide which one to use. To see the available modules, use the command «module avail»:

$ module avail
(...)

This will output a rather long list. To see only what's available for a given program, try specifying it:

$ module avail aspect
---------- /opt/uio/modules/modulefiles/software -----------
   aspect/1.4.0    aspect/2.0.1 (D)

To use a module you must load it. The (D) in the above output signifies the default module, so you can type any of these commands:

$ module load aspect/1.4.0
$ module load aspect/2.0.1
$ module load aspect     # default, identical to previous command.

After loading a module, your environment (PATH, etc) has been modified to use this particular program. For example:

$ type aspect
-bash: type: aspect: not found
$ module load aspect
$ type aspect
aspect is /opt/uio/modules/packages/aspect/2.0.1/bin/aspect

Loading a module can also trigger the loading of other modules. Once done with the program in question, you can unload all modules:

module purge

A few recommendations using modules:

Do not load modules in your shell setup. It goes against the very purpose of modules, and can give some very real problems. You can read more about it here.

Do specify the module version. For any serious work, you want reliability and reproducibility. The default module can change during your project's lifetime, and you need to know the version(s) of the software you used when publishing your work.

If you miss certain (versions of) software, just ask us. We can't promise we can install it, but we'll certainly give it a try.

The full set of modules are installed on wessel. If you want a particular module on your RHEL7 machine, get in touch.

Matlab

On most Linux machines, the latest version of matlab is made available directly with the «app-sync» mechanism, you can just run it from the shell without loading a module:

$ matlab

On wessel (our main server), we lift the versions out of the app-sync system and make it available as a module, thereby keeping old versions available:

wessel$ module avail matlab
---------- /opt/uio/modules/modulefiles/software ----------
   matlab/R2016a    matlab/R2017a    matlab/R2018b (D)

To use matlab on wessel, load the desired version, e.g.:

wessel$ module load matlab/R2018b

wessel$ matlab -nodisplay

                            < M A T L A B (R) >
                  Copyright 1984-2018 The MathWorks, Inc.
                   R2018b (9.5.0.944444) 64-bit (glnxa64)
                              August 28, 2018

For online documentation, see https://www.mathworks.com/support
For product information, visit www.mathworks.com.
 
>>

Intel Compilers

Similar to Matlab (above), USIT provides Intel Compilers with app-sync, and on most machines you simply enable the package with the shell command setup-intel-compilers:

$ setup-intel-compilers
$ type ifort
ifort is /opt/app-sync/intel/composer_xe_2013_sp1.2.144/bin/intel64/ifort

On wessel, you just load the module:

wessel$ module load intel
wessel$ type ifort
ifort is /opt/uio/modules/packages/intel/14.0.2/bin/ifort

The available version is bit old, and we are unfortunately not likely to get newer versions.

python

We have two python versions as loadable modules:

$ module avail python
---------- /opt/uio/modules/modulefiles/software ----------
   python/anaconda2 (D)    python/anaconda3

Anaconda2 (python 2.7) is expected to reach end-of-life 2020-01-01, so it is recommended you use anaconda3 (python 3.6) if at all possible:

$ module load python/anaconda3
$ type -p python
/opt/uio/modules/packages/python/Anaconda3/bin/python

Within python, you will sometimes need to use conda environments. To see what environments are available:

$ conda env list
# conda environments:
#
base             *  /opt/uio/modules/packages/python/Anaconda3
analysis            /opt/uio/modules/packages/python/Anaconda3/envs/analysis
(...)

To use an environment, activate it. Note how the prompt changes, and that you now have a different python binary:

$ source activate analysis
(analysis) $ type -p python
/opt/uio/modules/packages/python/Anaconda3/envs/analysis/bin/python

When done with the environment, you can deactivate it:

(analysis) $ conda deactivate

Window services

VMware Horizon View

You can access a bunch of windows software (including Remote Desktop to win.uio.no) in your browser from anywhere by simply visiting https://view.uio.no/ . Go ahead and try it out, this may be all you need.

Calendar

Unfortunately, the exchange/outlook calendar is not easy to use directly from Linux. You can access the calendar from the web interface (OWA) at mail.uio.no.

Remote Desktop

Sometimes, you simply need a Windows machine. You may have one nearby you can simply log in to, but you can also use Remote Desktop (RDP) to connect to a Windows server. In some cases you can also use RDP to connect to an ordinary workstation.

The basic instructions for using RDP is here. Apart from the simple xfreerdp command given there (in the Linux sub-page), you might want to try

xfreerdp /size:1200x850 /u:username@uio /v:geo-all-hiperf.uio.no

Substitute your username for username. Xfreerdp will ask you to accept the host certificate and prompt you for a password, so don't run this in the background (with '&').

Note the use of /size: to specify a window size, you can also use e.g. "80%" here.

You will need to be on the UiO net to connect with UiO. If you are on other networks, you can try a connection file as explained on this web page, or see this page where an alternate way is outlined.

Note: The syntax for command-line arguments for xfreerdp is a bit unorthodox, and varies from one version to another. Pay attention to the error or warning messages you get, and modify as needed.

At the department, we have a few Windows servers for Windows computations:

  • geo-all-hiperf.uio.no, for general use.
  • geo-stud-hiperf.uio.no, for students and general use.
  • geo-hyd-hiperf.uio.no, for the geohyd group.
  • geo-ice-hiperf.uio.no, for the icemass project.
  • geo-pet-hiperf.uio.no, for petrology.

Access to some of these machines are restricted, get in touch if you need it.

Root usage

If you want root access on your laptop (see above), the IT staff will have to make sure your machine is not a member of the network group geofag-hosts (or a sub-group). You get sudo rights by becoming a member of the local group "wheel":

# usermod -G wheel -a <username>

To use X11 programs with sudo, you will sometimes have to give your local root account permission to access your display. This is a security issue, so only do it when needed:

$ xhost +si:localuser:root    (give root permission to use the display)
$ sudo system-config-printer  (or whatever X11 program you need to run)
$ xhost -si:localuser:root    (remove root permission)

 


For questions or feedback, please get in touch!

By Hans Peter
Published Apr. 25, 2019 11:01 AM - Last modified Jan. 19, 2024 12:28 PM