Last updated: 2019-07-12

Checks: 6 0

Knit directory: listerlab/

This reproducible R Markdown analysis was created with workflowr (version 1.2.0). The Report tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.


Great! Since the R Markdown file has been committed to the Git repository, you know the exact version of the code that produced these results.

Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.

The command set.seed(20190712) was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.

Great job! Recording the operating system, R version, and package versions is critical for reproducibility.

Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.

Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility. The version displayed above was the version of the Git repository at the time these results were generated.

Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish or wflow_git_commit). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:


Untracked files:
    Untracked:  code/new_analysis.pl
    Untracked:  docs/assets/

Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.


These are the previous versions of the R Markdown and HTML files. If you’ve configured a remote Git repository (see ?wflow_git_remote), click on the hyperlinks in the table below to view them.

File Version Author Date Message
Rmd 389bd42 davetang 2019-07-12 First commit

Introduction

TigerVNC is installed on razor, machete, and stiletto. TigerVNC is a high-performance, platform-neutral implementation of VNC (Virtual Network Computing), a client/server application that allows users to launch and interact with graphical applications on remote machines. TigerVNC provides the levels of performance necessary to run 3D and video applications, and it attempts to maintain a common look and feel and re-use components, where possible, across the various platforms that it supports. TigerVNC also provides extensions for advanced authentication methods and TLS encryption.

Why?

It is handy to have a graphical interface to the server. Some use cases include:

  • When you cannot download a large file using the terminal, you can open up Firefox on the server and download the file directly onto the server (leaving it running in the background if necessary), which also saves you time from transfering files back and forth from your local computer to the server.
  • You can also run visualisation tools directly on the server, such as IGV. This is useful when the files you want to visualise are too big for your local computer.

Getting started

First, log onto one of the servers; replace your_private_key_file with the location of your private key file.

# razor
ssh -C -Y -i your_private_key_file dtang@130.95.176.222

# machete
ssh -C -Y -i your_private_key_file dtang@130.95.176.223

# stiletto
ssh -C -Y -i your_private_key_file dtang@130.95.176.224

Set password for your own VNC instance.

vncpasswd

Next, check existing VNC servers on the server and pay attention to the colon and number, e.g. :1. These are the ports used by other users, which means you have to pick a different port.

# output below is chomped
ps -ef | grep vnc
hayden     2745      1  0  2018 ?        00:05:14 /usr/bin/Xvnc :1
cpfluger 168920      1  0 Jan29 ?        01:06:54 /usr/bin/Xvnc :34

Now start your own instance using a port that isn’t already in use; adjust the resolution so that it fits your screen/monitor.

vncserver -geometry 1920x1200 :23

Port forwarding

Before we can use VNC Viewer on your own computer we need to set up port forwarding on local. The range of ports used by the VNC server start from 59XX; replace XX with the port you chose when starting your own VNC instance.

There parameters used are:

  • -N Do not execute a remote command. This is useful for just forwarding ports
  • -Y Enables trusted X11 forwarding
  • -f Requests SSH to go to background just before command execution
  • -L Specifies that connections to the given TCP port or Unix socket on the local (client) host are to be forwarded to the given host and port
# for razor
# change the IP address accordingly for different servers
# machete: 130.95.176.223
# stiletto: 130.95.176.224
ssh -N -Y -f -i your_private_key_file -L 5923:127.0.0.1:5923 dtang@130.95.176.222

Finally on macOS, open VNC Viewer and enter 127.0.0.1:5923. You will be prompted for a password; enter the password you used when you ran vncpasswd.

Kill

When you are done, shut down your instance.

# modify the port accordingly
vncserver -kill :23

Troubleshooting

Log files are stored in your home directory in ~/.vnc and have the extention *.log. For example, the log file created for my VNC instance is PEB-SRVNIX-STILETTO:23.log, where 23 is the port I chose. If you are running into problems, take a look at this file.

For example, I was getting a black screen when I was using the VNC client and the log contained:

(imsettings-check:121923): IMSettings-WARNING **: Could not connect: Connection refused

(imsettings-check:121923): GLib-GIO-CRITICAL **: g_dbus_proxy_call_sync_internal: assertion 'G_IS_DBUS_PROXY (proxy)' failed
GLib-GIO-Message: 23:54:18.257: Using the 'memory' GSettings backend.  Your settings will not be saved or shared with other applications.

** (process:121816): WARNING **: Could not make bus activated clients aware of XDG_CURRENT_DESKTOP=GNOME environment variable: Could not connect: Connection refused

This was because my PATH was set to look for executables in my Anaconda installation, when /bin/dbus-daemon was required. Just reset your PATH before you run vncserver.

# only use default locations for your PATH
PATH=/usr/local/bin:/usr/local/sbin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin

# start VNC instance
vncserver -geometry 1920x1200 :23
The log file can get quite large if you don’t shut down your instance, so remember to shut down your instance and delete the log file when you are done.

sessionInfo()
R version 3.5.2 (2018-12-20)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Mojave 10.14.5

Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib

locale:
[1] en_AU.UTF-8/en_AU.UTF-8/en_AU.UTF-8/C/en_AU.UTF-8/en_AU.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] forcats_0.4.0   stringr_1.4.0   dplyr_0.8.0.1   purrr_0.3.1    
[5] readr_1.3.1     tidyr_0.8.3     tibble_2.0.1    ggplot2_3.1.0  
[9] tidyverse_1.2.1

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.0       cellranger_1.1.0 plyr_1.8.4       pillar_1.3.1    
 [5] compiler_3.5.2   git2r_0.24.0     workflowr_1.2.0  tools_3.5.2     
 [9] digest_0.6.18    lubridate_1.7.4  jsonlite_1.6     evaluate_0.13   
[13] nlme_3.1-137     gtable_0.2.0     lattice_0.20-38  pkgconfig_2.0.2 
[17] rlang_0.3.1      cli_1.0.1        rstudioapi_0.9.0 yaml_2.2.0      
[21] haven_2.1.0      xfun_0.5         withr_2.1.2      xml2_1.2.0      
[25] httr_1.4.0       knitr_1.21       hms_0.4.2        generics_0.0.2  
[29] fs_1.2.6         rprojroot_1.3-2  grid_3.5.2       tidyselect_0.2.5
[33] glue_1.3.0       R6_2.4.0         readxl_1.3.0     rmarkdown_1.11  
[37] modelr_0.1.4     magrittr_1.5     whisker_0.3-2    backports_1.1.3 
[41] scales_1.0.0     htmltools_0.3.6  rvest_0.3.2      assertthat_0.2.0
[45] colorspace_1.4-0 stringi_1.3.1    lazyeval_0.2.1   munsell_0.5.0   
[49] broom_0.5.1      crayon_1.3.4