QuantEcon / meta

For issues and discussion covering more than one repository
0 stars 0 forks source link

[project] Setup VNC access to QuantEcon Servers #84

Open mmcky opened 1 year ago

mmcky commented 1 year ago

It would be nice to have full desktop environments that can be exported from the quantecon servers for those that don't want to use ssh and reverse tunnels (or for maintenance tasks that are sometimes easier to do in a graphical environment).

The goal is to have full gnome environment exported but perhaps we can look through some of the more lightweight options such as xfce one of @jstac favourites :-).

chappiewuzefan commented 1 year ago
  1. local machine has to open the Tailscale (otherwise can't vnc)

  2. download vnc viewer through this link

  3. connect without login, input the ip address (copied from Tailscale) and port number quantlab: 100.119.59.94:5902 frank: 100.119.59.94:5903

  4. input the vnc password: quantlab (could select remember the password)

todo:

  1. (solved)currently, vnc directly will show up QuantEcon this user's login page, can't switch into other user, other users haven't setup
  2. system service is not set up
  3. (solved, using below image config) small question: when I ssh into server2 using extension in vscode, how to switch between different users.

Image

below is how to set up a new user's vnc on quantecon-gpu-server2:

  1. set up your own password - Would you like to enter a view-only password (y/n)? I would prefer no
    vncserver
  2. kill the vncserver with specific port: 5901 is 1; 5903 is 3
    vncserver -kill :1
  3. configure the commands that will be executed by the server every time we start a VNCV instance
    vim ~/.vnc/xstartup 
    
    #!/bin/sh

Start up the standard system desktop

unset SESSION_MANAGER unset DBUS_SESSION_BUS_ADDRESS

/usr/bin/startxfce4

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources x-window-manager &

4. make this file executable

chmod +x ~/.vnc/xstartup

5. restart the VNC server (5901 input 1)

vncserver -localhost no :1



reference [link](https://bytexd.com/how-to-install-configure-vnc-server-on-ubuntu/)