# Bernina Terminal Cheat Sheet Shortcuts and Compose sequences set up by `startup_bernina_terminal`. `Super+F1` shows this as a floating overlay panel (`cheatsheet_overlay`, a standalone GTK script -- no gnome-shell extension involved), built fresh from this file's own headings and tables every time it's shown (via `cheatsheet_to_shortcuts_json`). For this full detailed view with prose/notes included, run `cheatsheet` in a terminal instead. Navigation in this viewer: `↑`/`↓`/`j`/`k` scroll, `g`/`home` top, `G`/`end` bottom, `b`/`pgup` and `f`/`pgdn` page up/down, `/pattern` then `n`/`N` to search and jump between matches (e.g. `/Greek`), `q` to quit. ## Table of contents - [Application & window shortcuts](#application--window-shortcuts) - [Primary controls terminal only](#primary-controls-terminal-only) - [Window tiling (gTile)](#window-tiling-gtile) - [Compose key — accents & Greek letters](#compose-key--accents--greek-letters) - [Screen & session behavior](#screen--session-behavior) - [Scripts in this directory](#scripts-in-this-directory) (Links above are for viewing this file in an editor/browser that supports Markdown anchors, e.g. VS Code or GitHub/GitLab — the terminal viewer doesn't follow them; use `/` search instead, see above.) ## Application & window shortcuts | Shortcut | Action | Runs | |-------------------------|----------------------------------|------------------------------| | `Alt+Ctrl+J` / `Super+HomePage` | Open eco terminal | `gnome-terminal -- eco` | | `HomePage` | Launcher | `launcher` | | `Alt+Ctrl+B` | Browser | `firefox` | | `Alt+Ctrl+A` | Aramis synoptic (caqtdm) | `caqtdm ... Aramis.ui` | | `Alt+Ctrl+S` | SwissFEL OP overview (caqtdm) | `caqtdm ... S_OP_overview_for_photonics.ui` | | `Alt+Ctrl+T` | New terminal | `gnome-terminal` | | `Alt+Ctrl+Shift+B` | Browser (alternate account) | `firefox_as` | | `Alt+Ctrl+Shift+T` | Terminal (alternate account) | `gnome-terminal_as` | | `Alt+Ctrl+Shift+W` | Windows terminal | `winterm` | | `Super+F1` | **This cheat sheet (overlay panel)** | `cheatsheet_overlay` | | `Print` | Screenshot (Flameshot) | `flameshot gui` | | `Ctrl+Alt+D` | Blank/turn off screens | `xset dpms force off` | The Calculator, Email, Home, Screenshot and Help media-key defaults are explicitly unbound at login so they're free for the reassignments above and below (they'd otherwise launch a calculator app, GNOME Help, etc. — `Super+F1` is normally GNOME's built-in Help shortcut). ## Primary controls terminal only Only wired up on `saresb-cons-03/04/05/08/09/10`; other hosts print "no primary controls terminal" and skip this block. | Shortcut | Action | Runs | |-------------------|-----------------|-----------| | `Calculator` | Stop FEL | `feloff` | | `Super+Calculator` | Start/open FEL | `felon` | | `Mail` | Stop laser | `laseroff`| | `Super+Mail` | Start/open laser| `laseron` | ## Window tiling (gTile) The gTile extension is installed/updated on login. Its two core shortcuts are gTile defaults (not set by this script): | Shortcut | Action | |-----------------------------|------------------------------------| | `Super+Enter` (`Super+Return` also works) | Open the gTile grid overlay | | `Super+Shift+KP_1` … `KP_9` | Cycle through the 9 custom column-width presets below (repeated presses of the same key step through that preset's shapes) | The script defines the *shapes* for presets 21–29 (bound to `Super+Shift+KP_1` … `KP_9` respectively), tuned for 4K screens — each cycles through quarter/eighth-width column variants anchored at the left, center, or right third of the screen. ## Compose key — accents & Greek letters Compose key = **Caps Lock**. Press Caps Lock, then the sequence below (Greek letters work in either order: `Space, letter` or `letter, Space`). ### Greek letters — `CapsLock Space ` | Key | Lower | Name | Upper | Key | Lower | Name | Upper | |-----|-------|-------------|-------|-----|-------|-------------|-------| | a | α | alpha | Α | n | ν | nu | Ν | | b | β | beta | Β | o | ο | omicron | Ο | | c | ξ | xi | Ξ | p | π | pi | Π | | d | δ | delta | Δ | q | ψ | psi | Ψ | | e | ε | epsilon | Ε | r | ρ | rho | Ρ | | f | φ | phi | Φ | s | σ | sigma | Σ | | g | γ | gamma | Γ | t | τ | tau | Τ | | h | θ | theta | Θ | u | υ | upsilon | Υ | | i | ι | iota | Ι | v | ς | final sigma | — | | k | κ | kappa | Κ | w | ω | omega | Ω | | l | λ | lambda | Λ | x | χ | chi | Χ | | m | μ | mu | Μ | y | η | eta | Η | | | | | | z | ζ | zeta | Ζ | Letters were reassigned where the Greek name collides with another letter already taken: `h`=theta, `y`=eta, `c`=xi, `x`=chi, `q`=psi, `w`=omega, `v`=final sigma. ### A few useful built-in sequences (system default Compose file) | Sequence | Result | Meaning | |---------------------|--------|-----------------------| | `CapsLock ' e` | é | acute accent | | `CapsLock grave e` | è | grave accent | | `CapsLock " u` | ü | diaeresis / umlaut | | `CapsLock ~ n` | ñ | tilde | | `CapsLock , c` | ç | cedilla | | `CapsLock o c` | © | copyright | | `CapsLock o r` | ® | registered | | `CapsLock C =` | € | Euro sign | | `CapsLock m u` | µ | micro sign | | `CapsLock s o` | § | section sign | | `CapsLock o o` | ° | degree sign | `~/.XCompose` is rewritten on every login (so it self-heals if missing or accidentally edited); defaults come from `/usr/share/X11/locale/en_US.UTF-8/Compose`. ## Screen & session behavior - Desktop background, terminal profile, and workspace-on-primary-only are set on every login. - Screen lock: enabled with a 180s delay only on `saresb-cons-08`; disabled (and idle-delay set to never) everywhere else. - The Kerberos ticket (`gac-bernina`) is kept alive in the background for the session (`kerberos_ticket_renew.sh`). - The local pixi Python env in `~/bpy` is kept in sync with the shared env in the background (`pixi_local_sync.sh`). ## Scripts in this directory Every script in `/sf/bernina/bin`, grouped by topic. Generated by `list_bin_commands` from the actual directory contents -- re-run it after adding/removing scripts to keep this in sync. ### Cheat sheet & help | Command | Description | |---|---| | `cheatsheet` | Show this cheat sheet in a terminal (glow + less, full detail) | | `cheatsheet_overlay` | Show this cheat sheet as a floating overlay panel (bound to Super+F1) | | `cheatsheet_to_shortcuts_json` | Regenerate the overlay's JSON from this file's headings/tables | | `check_kerberos_renewal` | Diagnose why the Kerberos ticket renewer might be renewing/prompting too often | | `useful_commands` | Show the older, plain-text useful-commands reference | ### EPICS / eco environment | Command | Description | |---|---| | `eco` | Start eco, the beamline's Python control environment | | `eco-dev` | Start eco from the development checkout (symlink into the eco repo) | | `eco-in` | Start eco inside a chosen environment (arg, default bpy-default) | | `eco-notlazy` | Start eco with lazy-loading disabled (default env bernina37) | | `eco-status-server` | Start/stop/check the eco status server (namespace mode) | | `eco-status-server-install-user-service` | Install the eco status server as a systemd --user service | | `eco-test` | Start eco against the sfb312 test micromamba environment | | `eco_bams_bpms` | Start eco configured for BAM/BPM work | | `eco_historic` | Start eco against historic/legacy config | | `eco_mm_env` | Start eco in a chosen micromamba environment | | `eco_new` | Start eco using bpy-default.sh directly | | `eco_noenv` | Start eco's startup.py directly, no environment activation step | | `eco_old` | Start eco against the older sfb312 micromamba environment | | `eco_roman` | Start eco configured for the bernina_robot setup | | `ecotest` | Start eco in the jungfrau_client conda environment | ### Python, conda & pixi environments | Command | Description | |---|---| | `anaconda_bernina_env` | Conda init hook for the bernina anaconda env (source this) | | `anaconda_env` | Activate a named anaconda environment | | `anaconda_manual` | Show the anaconda environment manual (rendered markdown) | | `anaconda_testenv` | Activate the anaconda test environment | | `bpy` | Activate a named bpy (pixi) environment | | `bpy-default.sh` | Set PATH for the default shared bpy312 pixi environment (source this) | | `bpy-dev.sh` | Set PATH for the bpy312-dev pixi environment (source this) | | `bpy-env` | Activate the Bernina pixi Python env -- local per-host mirror if in sync, else shared (source this) | | `bpy-select` | Interactively pick/switch the active bpy pixi environment | | `micromamba` | micromamba package manager | | `mm_bernina` | Micromamba shell-init hook for bernina (source this) | | `mm_bernina_env` | Activate a named micromamba environment | | `pixi` | pixi package manager | | `pixi_local_sync.sh` | Keep the local per-host pixi env mirror in sync (runs in background at login) | | `pixi_rebuild_local.sh` | Rebuild the bernina pixi env in an isolated local sandbox, for testing | ### Jupyter & notebooks | Command | Description | |---|---| | `bernina-jupyter` | Start JupyterLab in the bernina-scripts config dir (bpy env) | | `ipylab` | Start an ipylab session in a chosen anaconda environment | | `jupyter-notebook-on-ra` | Open a Jupyter Notebook on a remote-access host, for a given user | | `jupyterlab-on-ra` | Open JupyterLab on a remote-access host, for a given user | ### Browsers | Command | Description | |---|---| | `chrome` | Open Chrome with a per-host profile | | `chromeAs` | Open another user's Chrome profile from your own desktop (older variant) | | `chrome_as` | Open another user's Chrome profile from your own desktop | | `firefox` | Open Firefox with a per-host profile | | `firefox-create-hostprofile` | Create a fresh per-host Firefox profile | | `firefox-hostprofile` | Open Firefox with the per-host profile (alt entrypoint) | | `firefox_as` | Open another user's default Firefox profile from your own desktop | | `firefox_default` | Default Firefox profile launcher (symlink to firefox_shared_profile) | | `firefox_shared_profile` | Open Firefox using a shared/synced profile | | `google-chrome` | Open Chrome with a per-host profile (alt entrypoint) | ### Displays & control panels | Command | Description | |---|---| | `Aramis` | Open the Aramis overview display (mydm/medm) | | `alarms_caqtdm` | Open the EPICS alarms caQtDM panel | | `aramis-home` | Open the Aramis photonics overview caQtDM panel | | `bernina-home` | Open the esbMaster caQtDM panel | | `cams_sf` | Open the SwissFEL cameras caQtDM panel | | `diffractometer-config` | Open the diffractometer motor IOC configuration tool | | `motion-home` | Open the ZamofingMaster motion caQtDM panel | | `screen_panel` | Open the SF controls screen panel | | `screenpanel` | Open the screen panel (uses screenpanel-sf if available) | | `sf_archiver_panel` | Open the SwissFEL archiver viewer panel | | `strip_chart` | Open the PShell strip chart viewer | | `swissfelStatus` | Open the SwissFEL OP overview caQtDM panel | | `thc_angles` | Open the THC angles bokeh app in Firefox | | `thc_stripchart` | Open the THC temperature strip chart | | `timetool_online_plot` | Open the timetool online plot (voila notebook) | ### Cameras | Command | Description | |---|---| | `bernina-cam-mobile1` | View the mobile1 camera feed (VLC) | | `bernina-cam-n` | View the north camera feed (VLC) | | `bernina-cam-s` | View the south camera feed (VLC) | | `bernina-cam-w` | View the west camera feed (VLC) | | `bernina-cam-wideangle1` | View wide-angle camera 1 feed (VLC) | | `bernina-cam-wideangle2` | View wide-angle camera 2 feed (VLC) | | `bernina-cam-wideangle3` | View wide-angle camera 3 feed (VLC) | | `bernina-cam-wideangle4` | View wide-angle camera 4 feed (VLC) | | `bernina-cams-fix` | Launch the fixed multi-camera mosaic view (VLC) | | `monitoring_cameras` | Open the monitoring cameras panel (pshell-based) | | `record_camera` | Record a camera feed to file | ### FEL & laser control | Command | Description | |---|---| | `feloff` | Stop/block the FEL beam and announce it | | `felon` | Open/enable the FEL beam and announce it | | `laseroff` | Block the laser shutter and announce it | | `laseron` | Open the laser shutter and announce it | ### pshell & robot control | Command | Description | |---|---| | `pshell_be` | Start the PShell Workbench for the main Bernina beamline environment | | `pshell_correlation` | Open the correlation panel | | `pshell_default` | Default pshell entrypoint (symlink to pshell_be) | | `robot_server` | Start the PShell Workbench for the Bernina robot -- needs a new binary, /opt/gfa/pshell is gone (see chat history: /sf/controls/bin/pshell -wb is the likely replacement, blocked on a dataFormat=null config issue) | ### Desktop & window management | Command | Description | |---|---| | `code` | Launch VS Code | | `darkscreens` | Blank/turn off the screens (xset dpms) | | `flameshot` | Take a screenshot | | `gnome-terminal_as` | Open a GNOME Terminal as another user | | `launcher` | Main Bernina application launcher | | `launcher_dev` | Application launcher (dev/legacy python 3.5 environment) | | `launcher_lca` | Open the launcher on the machine/LCA network, for a given user | | `launcher_legacy` | Legacy application launcher (python 3.5 environment) | | `rdpWater` | RDP into the WaterLab Windows machine | | `remoteDesktop` | RDP into an arbitrary PSI Windows host | | `sf-launcher` | Open the launcher on the sf network, for a given user | | `termAs` | Open a terminal as another user | | `terminalAs` | Open a terminal as another user (alt entrypoint) | | `window_arrange.py` | Arrange/tile windows helper script | | `winterm` | Open a Windows-side terminal session | ### Applications & viewers | Command | Description | |---|---| | `hdfview` | Open HDFView (HDF5 file viewer) | | `jungfrau_console` | Open the Jungfrau detector console | | `ncdu` | Disk usage analyzer | | `paraview` | Open ParaView | | `pycharm` | Open PyCharm Community | | `pylote` | Open Pylote | | `vesta` | Open VESTA (crystal structure viewer) | ### Login session & keybinding setup | Command | Description | |---|---| | `create-links-in-home` | Force-apply PSI's Partially Shared Home symlinks now | | `gogh` | Gogh terminal color-scheme installer (legacy -- upstream download is broken, see install_terminal_profiles) | | `install_gtile` | Install/update and enable the gTile gnome-shell extension (runs at login) | | `install_terminal_profiles` | Install Solarized/Spacedust GNOME Terminal profiles, set Spacedust default (runs at login) | | `kerberos_ticket_renew.sh` | Keep the Kerberos ticket cache alive for the login session (runs in background) | | `migrate_to_network_drive.sh` | Move a local dotfile onto PSI's Partially Shared Home and register it for sync | | `set_gnome_keyboard_shortcut` | Register one GNOME custom keyboard shortcut (used by startup_bernina_terminal) | | `startup_bernina_terminal` | Full per-login setup for a Bernina console -- runs automatically at login | | `sync_personal_config.sh` | Seed .ipython/.condarc onto PSI's Partially Shared Home for cross-host sync | ### gopass secrets & git | Command | Description | |---|---| | `git-push` | git push, forcing the origin remote to SSH first | | `gopass` | Bernina gopass secrets store CLI | | `gopass.py` | Minimal Python interface to the Bernina gopass store | | `gopass_bernina_service_setup.sh` | One-shot setup: give a service account (gac-bernina) access to the gopass store | | `gopass_bernina_setup.sh` | One-shot onboarding for a human PSI account joining the gopass store | ### Personal dirs & data | Command | Description | |---|---| | `create_data_symlinks` | (Re)create the ~/bernina_data convenience symlink | | `create_personal_dir.sh` | Create/verify a personal working directory under /sf/bernina/config/personal/ (your username) | | `name2pgroups` | Look up p-group(s) for a given user name | | `pgroup2name` | Look up the user name for a given p-group | | `quotas-bernina` | Show Bernina's storage quota usage | ### Beamline status & monitoring | Command | Description | |---|---| | `chiller_flowrate` | Query the JF16 chiller flowrate over telnet | | `feedbacks_bernina` | Open the undulator/feedbacks control tool, for a given user | | `get_bernina_PVs_alive` | Check whether a set of Bernina PVs are alive | | `go2daq` | SSH to the SwissFEL DAQ host (sf-daq-3) | | `ioc-control-bernina` | Open the IOC process monitor (PBMonitor) | | `ioc-finder` | Find/locate an EPICS IOC | | `is_control` | Check whether a given hostname is a primary controls terminal | | `phonebook` | Show the Bernina phone list | | `remaining-slurm-job-time` | Show remaining time for a SLURM job | | `restart_service` | Restart a systemd service as the dbe account (sudo) | | `run-and-position.py` | Run-and-position helper script | | `saythis` | Speak given text aloud | | `set_bs_pvs` | Configure the SLAAR21 beam-synchronous PVs | | `slurm_resources` | Show SLURM partition resource usage | | `undulator-pointing` | Open the undulator pointing control tool, for a given user | ### Desktop entries (.desktop files) | Command | Description | |---|---| | `Bernina.desktop` | Bernina launcher desktop icon (runs launcher) | | `bernifox.desktop` | Bernina-branded Firefox launcher (per-host profile), set as default browser | | `kerberos-ticket-renew.desktop` | Autostart entry for the Kerberos ticket renewer |