FAQ - Hints & Tricks for Linux Users



General

Which application should I use to do XYZ?

How can I convert file X into file Y?

My computer is so slow. What can I do?

There could be several reason why your PC gets slow. Please try the following




Login/Logout

I can no longer login to a Linux system

I can no longer logout from KDE

I can no longer shutdown/reboot my PC




SSH and SCP

How can I login over ssh without typing my password?

How to disable ksshaskpass

Secure copy (scp) does not work

I get "timeout in locking authority file .Xauthority"

When I open a X application over ssh, I get "Error: Can't open display:"

When starting a application over ssh, I get "No DBUS session-bus found"

How can I mount my home directory outside of IAC?

How can I mount directories that are located behind a remote machine?

At CSCS only the ela.cscs.ch machine is exposed to the internet. Therefore one has to always log in first to that machine, before jumping to daint using (ssh daint). Directories such as /scratch and /project are not mounted on ela.cscs.ch which makes accessing those cumbersome, in particular using file explorers (e.g., Nautilus, Dolphin). However, one can configure ssh to use a jumphost (here: ela.cscs.ch).

To this end put the following in .ssh/config:

Host daint
  HostName daint
  ForwardX11Trusted yes
  ProxyJump USERNAME@ela.cscs.ch
  User USERNAME

You can then log in directly to daint with ssh daint and mount the filesystem in your favourite file explorer using sftp://USERNAME@daint.

More info about SSH and keys can be found here.




Shell

I get "Argument list too long". What can I do?

How can I keep running a program in the background?

My console is dead. What can I do?




Disk quota

How can I list the quota of my home directory?

How can I find folders using more than 1 MB disk space in my home directory?

How can I empty the trash manually?

How can I find out the amount of free disk space in a folder?

Is there a way to display the file size in a folder graphically?




Emacs

Do not show the start-up screen of emacs

AUCTeX error message problem

Emacs looks different?

Pressing the down arrow key moves cursor to the next line as seen on the screen, but not to end of line




Chrome

Chromium does not start up when executing on a remote machine over ssh




Firefox

Firefox is hanging for several seconds. What can I do?

Firefox does not start. What can I do?

Public folders are empty in ETH Web Mail

My firefox is screwed up completely. What can I do?

I miss the icons in the search box (search bar)

Firefox version >= 34 comes with an new Search interface, if you don't like it, you can it turn off:

  1. Open Firefox and type about:config in the addressbar and press enter. It'll confirm, click on I'll be careful, I promise! button.
  2. Now type oneoff in the Filter box and look for following boolean key: browser.search.showOneOffButtons
  3. The entry browser.search.showOneOffButtons should be set to true. Double-click on it or right-click on it and select Toggle. It'll set its value to false.

My firefox is slow and does not work as expected. What can I do?

Clicking on an email link in Firefox does not open Thunderbird and leaves the recipient blank

I see reversed colors (blue people) and artifacts of flash animations all over the screen

I see the message "The bookmarks and history system will not be functional because one of Firefox's files is in use by another application. ..."

How do I run multiple sessions of Firefox?

How can I remove the "start new session" when opening firefox? I always want it to start a new session.

How to synchronize bookmarks between different computers?

How to restore firefox bookmarks?

Scrolling in Firefox is very slow

In firefox type as URL about:config. As Filter type general.smoothScroll and the Value to false with a double click.




Thunderbird

I don't see all my folders in Thunderbird. What can I do?

How to set the default web browser in Thunderbird?

Thunderbird does not startup. What can I do?

Thunderbird and Firefox are missing scroll arrows

How can I use my ETH exchange calendar in Thunderbird?

Thunderbird does not open links

Thunderbird is filling up my home directory. What can I do?

Is there a way to force Thunderbird to look inside all subscribed folders for new mail?

Thunderbird downloads attachments only partially. The result are corrupt attachments like damaged PDFs.

Usually Thunderbird downloads attachments "in chunks", but to do it it's necessary that the mail server reports their right size. Sometimes servers don't support this feature properly which can lead to corrupt attachments.

I don't see all my mail folders in Thunderbird

I use Thunderbird 3.x and want to have some Thunderbird 2.x functionality back

I would like that Thunderbird shows me the number of unread messages in the system tray?




Latex

Missing style files

How to add subfolders to TEXINPUTS?

My Latex installation seems to be broken

AUCTeX error messages problem

If you use AUCTeX to write LaTeX, and upon compilation an error is detected, you are supposed to press C-` to get the error message. If instead of the error message you get ""Error after last TeX File closed", you can fix the problem by insert into your ~/.emacs

; Fix calling convention so AUCTeX reports errors
(setq LaTeX-command-style '(("" "%(PDF)%(latex) -file-line-error %S%(PDFout)")))




Acrobat-Reader

Acroread is slow or hangs several seconds

Try the following

Printer settings don't change according to printer dialog fields

You need to reinitialize your acroread settings:

Printing from acroread does not work. I get "The document could not be printed."

Acroread is crashing all the time. What can I do?




LibreOffice (aka OpenOffice)

How to set A4 page size as default?

How to repair a corrupt .DOCX file?

LibreOffice/OpenOffice is crashing all the time or does no longer start up. What can I do?

Impress is very slow. What can I do?




Matlab

Matlab is crashing or does not work

Matlab fonts are huge in the command window

Open the Preference window using the Preferences menu. There is a Fonts item in the Preferences that will let you customize the fonts used in each of the Desktop tools and the main font settings. Change all fonts from "Desktop code" to Custom. Choose for example Droid Sans Mono




Sound

How do I turn off that annoying system beep?

Sound is not working. What can I do?




KDE

KDE or the KDE menu bar is hanging what can I do?

KDE menu does no longer show any applications and/or clicking on a file does not open any application

How to change the keyboard layout

Kactivitymanagerd pops up every second. What can I do?

I don't like KDE. Is there an alternative?

How to change the desktop background?

How to change the font in the konsole (terminal)?

How to put application icons in the panel?

How to move icons/widgets in the panel?

I cannot modify my panel, for example add applications or move widgets?

How to adjusting the thickness of the panel?

How to configure the pager?

How to Disable Akonadi?

How to clean up your KDE settings

How to set a shortcut to start an application?

How to mount/unmount USB disks and CD/DVD ?

Shutdown the PC from the KDE menu does not work or only after a long delay




XFCE

All window title bars went missing, how to get them back?

Changing the number of workspaces in the settings does not have any effect.




GNOME Shell

Screen cannot be locked

How to disable keyring




Python

ALERT! Warning: do not automatically activate an environment in .bashrc

Also check the docs on JupyterHub!

JupyterHub

Should I use Python?

Tutorials

Which version should I use? python 2 or python 3?

What's the recommended way to use python at IAC?

What about other solutions?

What are Best Practices when using python?

Why is it important to work with a fixed environment?

What is conda?

What is mamba?

What is a conda environment?

What is a conda package?

How do I use conda?

What environments are available?

Older environments

  • 2022 environments
    module load conda/2022
    conda env list
    
    • iacpy3_2022: based on iacpy3_2021, uses python 3.9; updated all packages on 16.03.2022;

  • 2021 environments
    module load conda/2021
    conda env list
    
    • iacpy3_2021: based on iacpy3_2020, uses python 3.9; updated all packages on 22.04.2021;

  • 2020 environments
    module load conda/2020
    conda env list
    
    • iacpy3_2020: based on iacpy3_2019, uses python 3.7; updated all packages on 15.04.2020;

  • 2019 environments
    module load conda/2019
    conda env list
    
    • iacpy3_2019: based on iacpy3_2018, uses python 3.7; updated all packages on 08.04.2019;
    • iacpy_cmip6_ng environment used to create the cmip6 new generation archive, please use iacpy3_2019

  • 2018 environments
    module load conda/2018
    conda env list
    
    • iacpy3_2018: based on dypy, uses python 3.6; updated all packages on 03.04.2018;
    • iacpy2_2018: based on dypy, but uses python 2.7; updated all packages on 03.04.2018

  • 2017 environments
    module load conda/2017
    conda env list
    
    • dypy: python3.5 environment with dypy (for LAGRANTO) and suitable for most users
    • cis_env: python3.5 environment with cis tools in version 1.5.4
    • pyferret_env: python3.5 environment with pyferret in version 7.0
    • pyn_env: python2.7 environment with PyNgl and PyNio in version 1.5

  • ALERT! module load miniconda3 is equivalent to module load conda

I am missing a package - what can I do?

How can I install a single package?

How can I create my own environment?

Create a new environment

Clone and tweak an existing environment

Background information about the differences between pip, conda and anaconda

How can I create an executable python script when using a conda environment?

How to best run jupyter notebook on a server?

  • See below how to run a notebook on a server from your personal computer.
  • Here we to setup a jupyter notebook running on a server and use it from your computer.
  • It will make use of tmux on the server to keep a session running even if you are not logged in anymore.
  • For security purpose the jupyter notebook produces a token at start, you need to copy this token (password) to the login screen of the notebook.

  • On the server
    tmux new-session -s 'background jobs'
    cd ~
    module load conda/<year>
    source activate <environment>
    jupyter notebook --no-browser --port 55000
    
    • ALERT! If the port is already in use jupyter will select the next higher available. Make sure that you use the right port in the next part.

  • On your computer:
    ssh -f -N -L localhost:8888:localhost:55000 SERVER
    

  • Open the browser and go to: http://127.0.0.1:8888
  • Copy the token given by the jupyter notebook on the server and paste it in the login field.
  • TIP This also works to tunnel a notebook from a linux machine to a windows machine
    • e.g. via (WSL [windows subsystem for linux]), or Start -> cmd
  • TIP You can recover the full address including the token on the SERVER by pressing CTRL C once.

Run a notebook on a server - from your personal computer

  • ALERT! Please don't run jupyter/ python on fog or fog2. These are login nodes that don't have many ressources.

You cannot directly ssh to our servers. Therefore, the above solution does not work from you personal computer. There are two possibilities.

1) Configure fog as a 'jumphost'

  • Edit (or create) ~/.ssh/config file as follows (on your personal computer)
    Host fog
      User <username> # your ETH username
      Hostname fog.ethz.ch
    
    Host atmos # change this according to the SERVER you want to use
      User <username> # your ETH username
      Hostname atmos.ethz.ch # change this as well
      ProxyCommand ssh -q -W %h:%p fog
    

  • now the following command should work
    ssh -f -N -L localhost:8888:localhost:55000 atmos
    
  • if you try to access the server from Windows using putty, make sure that you add the forwarded port to the profile for your session (on the left under "Category" go to "Connection" -> "SSH" -> "Tunnels" and type "8888" into source port, "localhost:55000" into destination, then click "Add")
  • ALERT! do NOT write atmos.ethz.ch, only atmos

2) Use ssh from the USYS VPN

  • Connect to the USYS-VPN
  • You can now ssh to the following servers (i.e. the above script works directly)
    • litho, cfc
  • If you want to access another server, please contact iac-linux@env.ethz.ch

Run spyder remotely

Spyder 3 shows strange symbols

user packages no longer available in conda environment and JupyerHub

Why was this change introduced?

  • Conda environments should be self-contained and reproducible. Site packages 'pollute' the clean workspace (i.e. there could be packages in an environment that were never installed into it).
  • You don't need --user to install packages with conda+pip.
    • Most often you will be able to install packages directly with conda (conda install <package>)
    • When using conda+pip it is not necessary to install packages with --user; you can do this with pip install <package>

I'am missing my self-installed packages, what can I do?

  • Recommended: You should re-install the packages into your enviroment:
    module load conda
    source activate <environment>
    pip install <package>
    
  • NB: Make sure that pip is included in the environment before installing extra packages into it.
  • If you installed site packages into an existing environment (one managed by IAC-IT), you will have to clone this environment, see instructions above.
  • Not recommended: You can get the old behaviour back by adding the following line to your ~/.bashrc (for bash):
    module load conda # as before
    unset PYTHONNOUSERSITE
    

What has changed?

  • module load conda now does the following: export PYTHONNOUSERSITE=1. This avoids putting the site-packages in the pythonpath, as explained in the documentation.

spacer