jupyterhub / jupyter-rsession-proxy

Jupyter extensions for running an RStudio rsession proxy
BSD 3-Clause "New" or "Revised" License
119 stars 87 forks source link

user-identity=jovyan hardcoded? #15

Closed iagomez closed 6 years ago

iagomez commented 7 years ago

Hello,

I've been looking at this today and it's awesome :). Thank you for creating this!

I noticed that R Studio shows jovyan as the user regardless of the actual user logging in through JupyterHub. Would it be possible to pass in the real username?

The following pids show 2 users (vagrant and demouser), but --user-identity=jovyan stays constant all the way across

vagrant  25417     1  0 16:20 ?        00:00:17 rsession --standalone=1 --program-mode=server --log-stderr=1 --session-timeout-minutes=0 --user-identity=jovyan --www-port=39670
vagrant  27733     1  0 21:08 ?        00:00:01 rsession --standalone=1 --program-mode=server --log-stderr=1 --session-timeout-minutes=0 --user-identity=jovyan --www-port=41793
vagrant  27891     1  0 21:13 ?        00:00:01 rsession --standalone=1 --program-mode=server --log-stderr=1 --session-timeout-minutes=0 --user-identity=jovyan --www-port=38717
demouser 28225 28209  1 21:20 ?        00:00:00 rsession --standalone=1 --program-mode=server --log-stderr=1 --session-timeout-minutes=0 --user-identity=jovyan --www-port=38268
vagrant  28269 28252  3 21:21 ?        00:00:01 rsession --standalone=1 --program-mode=server --log-stderr=1 --session-timeout-minutes=0 --user-identity=jovyan --www-port=45930
ryanlovett commented 7 years ago

Thanks! :)

The user is set to the value of the JPY_USER environment variable, or "jovyan" if it isn't defined. JPY_USER is set by various container-based spawners but nbrsessionproxy should probably fallback to USER instead.

yuvipanda commented 6 years ago

18 now changes this to use $USER which is more commonly changed. Also I think we don't set JPY_USER much anymore...