Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,10 @@ Note: The examples below assume sudo/root installation for all users and were or
- **For macOS**: Install a VNC viewer application if needed.
- [Tiger VNC](https://tigervnc.org) has the advantage of supporting automatic window positioning, but does not support scaling, and can not enter and exit view only mode interactively.
- Real VNC's [VNC Viewer](https://www.realvnc.com/en/connect/download/viewer/) does not support automatic window positioning, but allows window scaling for use on small or high resolution monitors. In addition, it supports changing modes both interactively and on the command line (e.g. scaling and the toggling of view only mode). Note: this is the free software, you do not need VNC Viewer Plus.
- It is also possible to use the built in VNC viewer on macOS, but we have seen a few instances where the screen freezes and the client needs to be closed and reopened to get an up to date screen.
- Both Tiger VNC and Real VNC have the viewers available for install via the macOS [Homebrew package manager](https://brew.sh). This provides the same software as is available from the download links above, but may be an easier install for users who already use homebrew.
- To install Real VNC Viewer: `brew install vnc-viewer`
- To install Tiger VNC Viewer: `brew install tigervnc-viewer`
- It is also possible to use the built in VNC viewer on macOS. The example configuration file has an example setup for this in the "VNC Viewer Command" section for users who want to try it. Be aware, however, that we have seen a few instances where the screen freezes and the client needs to be closed and reopened to get an up to date screen, so if you see that problem, please try another VNC Viewer client.

**--> Important! <--** If you are using TigerVNC on either OS, in the `~/.vnc` directory, create a file named `default.tigervnc` with these two lines:
```
Expand Down
35 changes: 18 additions & 17 deletions start_keck_viewers
Original file line number Diff line number Diff line change
@@ -1,34 +1,35 @@
#!/bin/bash
#!/bin/bash -i

# If we're using conda python
if [ "$CONDA_PREFIX" != "" ]; then
# activate conda environment
# NOTE: The KRO environment is created with:
# conda env create -f environment.yaml
source $CONDA_PREFIX/etc/profile.d/conda.sh
conda deactivate
conda activate KRO
CONDAEXE=$(which conda)
echo "CONDAEXE: $CONDAEXE"

if [ "$CONDAEXE" != "" ]; then
CONDA_BASE=$(conda info --base)
echo "CONDA_BASE: $CONDA_BASE"
source $CONDA_BASE/etc/profile.d/conda.sh

KROLINE=$(conda info --envs | grep KRO)
echo "KROLINE: $KROLINE"

#change to script dir (so we don't need full path to keck_vnc_launcher.py)
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
cd $DIR
echo "DIR: $DIR"

# Launch the script
if [ -e $CONDA_PREFIX/envs/KRO/bin/python3 ]; then
# Launch using conda KRO environment
$CONDA_PREFIX/envs/KRO/bin/python3 keck_vnc_launcher.py $@
if [ "$KROLINE" != "" ]; then
echo "Launching using conda KRO environment"
conda activate KRO
else
# Try launching via conda base environment
$CONDA_PREFIX/bin/python3 keck_vnc_launcher.py $@
echo "Launching using conda current environment"
fi
python3 $DIR/keck_vnc_launcher.py -c $DIR/local_config.yaml $@
else
echo "We are unable to determine the correct python version to run the"
echo "Remote Observing software. We will now try a generic python3 call,"
echo "if this fails, simply execute the keck_vnc_launcher.py file using the"
echo "correct python version for your system and use the same arguments you"
echo "would use with the start_keck_viewers script. For example:"
echo " /path/to/python3 keck_vnc_launcher.py numbered_account"
echo "Of coure, you should use the proper path to your python executable"
echo "Of course, you should use the proper path to your python executable"
echo "and the correct numbered account."

# just try whatever is in the path and hope it works
Expand Down