diff --git a/jupyter_rsession_proxy/__init__.py b/jupyter_rsession_proxy/__init__.py index 8e22c9c..87c3143 100644 --- a/jupyter_rsession_proxy/__init__.py +++ b/jupyter_rsession_proxy/__init__.py @@ -6,6 +6,7 @@ import tempfile from textwrap import dedent + def get_rstudio_executable(prog): # Find prog in known locations other_paths = [ @@ -55,12 +56,15 @@ def db_config(): return db_config_name def _get_cmd(port): + ntf = tempfile.NamedTemporaryFile() cmd = [ get_rstudio_executable('rserver'), '--auth-none=1', '--www-frame-origin=same', '--www-port=' + str(port), - '--www-verify-user-agent=0' + '--www-verify-user-agent=0', + '--secure-cookie-key-file=' + ntf.name, + '--server-user=' + getpass.getuser(), ] # Add additional options for RStudio >= 1.4.x. Since we cannot