Today is: Monday April 29, 2024

Working Remotely at UC Davis ECE
This website describes some tips and tricks for working remotely at UC Davis ECE.

Synchronizing files to/from UC Davis ECE Servers:
  1. In order to maintain good synchronization with the UC Davis ECE servers you can use a tool called rsync. Two shell scripts have been written that allow you to quickly select the file or directory that needs to be sent to or received from UC Davis ECE Servers. The following files need to be downloaded: Save the shell scripts to a directory that resides in your path (i.e., ~/bin/). The rx_from_server shell script has the following syntax:

                            usage: ./rx_from_server.sh [user] [mach] [remdir] [locdir] 
                 
    The tx_to_server shell script has the following syntax:

                            usage: ./tx_to_server.sh [user] [mach] [locdir] [remdir] 
                 
    When working remotely I try to create identical directory paths on my home PC and work PC (or as the work server directory), so that synchronizing files is simplified. It also allows the above scripts to be used with minimal headaches. An example of using the rx_from_server shell script is shown below:

    [jwwebb@tiefighter ../howto]
    $ ./rx_from_server.sh jwwebb noodle.ece.ucdavis.edu ~/Html/howto/remote/ ~/Html/howto/remote/
    rsync -avz jwwebb@noodle.ece.ucdavis.edu:/home/jwwebb/Html/howto/remote/ /home/jwwebb/Html/howto/remote/
    
    jwwebb@noodle.ece.ucdavis.edu's password:
    stty: standard input: Invalid argument
    receiving file list ... done
    ./
    new.txt
    new2.txt
    
    sent 48 bytes  received 304 bytes  54.15 bytes/sec
    total size is 14248  speedup is 40.48
                 
    An example of using the tx_to_server shell script to transfer a directory and its contents that does not reside on the remote server shown below:

    [jwwebb@tiefighter ../howto]
    $ ./tx_to_server.sh jwwebb noodle.ece.ucdavis.edu ~/Html/howto/remote ~/Html/howto/
    rsync -avz /home/jwwebb/Html/howto/remote jwwebb@noodle.ece.ucdavis.edu:/home/jwwebb/Html/howto/
    jwwebb@noodle.ece.ucdavis.edu's password:
    stty: standard input: Invalid argument
    building file list ... done
    remote/
    remote/new.txt
    remote/rx_from_server.sh
    remote/tx_to_server.sh
    
    sent 1927 bytes  received 80 bytes  267.60 bytes/sec
    total size is 14208  speedup is 7.08
                                                        
                 
    Notice that the "/" (forward slash) is left off of the new directory, this tells rsync to create the new directories on the remote server. The remote directory path does not contain the new directory. All subsequent transfers to the remote server will be made with a "/" added to the end of the local directory path and the new directory added to the remote directory path. This tells rsync to compare the local directory and remote directory for differences, then transfer files that are newer in the local directory.
    [jwwebb@tiefighter ../howto]
    $ ./tx_to_server.sh jwwebb noodle.ece.ucdavis.edu ~/Html/howto/remote/ ~/Html/howto/remote/
    rsync -avz /home/jwwebb/Html/howto/remote/ jwwebb@noodle.ece.ucdavis.edu:/home/jwwebb/Html/howto/remote/
    jwwebb@noodle.ece.ucdavis.edu's password:
    stty: standard input: Invalid argument
    building file list ... done
    ./
    new2.txt
           
    sent 213 bytes  received 32 bytes  19.60 bytes/sec
    total size is 14208  speedup is 57.99
                 
Back to Top
Setting up an SSH Server using Cygwin on a Windows PC:
  1. Visit the following website for information on setting up an SSH Server using Cygwin:
Back to Top
Using SSH with Cygwin to access UC Davis ECE Servers:
  1. Visit the following website for information on setting up an SSH Client using Cygwin:
  2. Now that the SSH Client is setup, you can access the Noodle server by typing the following:
    • ssh -X -L 2401:localhost:2401 tunnel@noodle.ece.ucdavis.edu -l jwwebb
  3. You could also create a Bash alias, so that you could type sshsrfs3.
    • alias sshsrfs3='ssh -X -L 2401:localhost:2401 tunnel@noodle.ece.ucdavis.edu -l jwwebb'
    • The above alias should reside in the .bashrc file.
Back to Top
Using VNC to access a remote PC:
  1. Initial Home PC Instructions:
    1. Download and install VNC from the Real VNC website [Download].
    2. The default configuration is sufficient to connect to remote servers.
  2. Linux Server Setup and Usage Instructions:
    1. To connect to Noodle in the UC Davis ECE VCL Lab first SSH to noodle.ece.ucdavis.edu.
    2. If you do not prefer to use the default session manager, you can place a custom xstartup file in the ~/.vnc/ folder in your home directory.
      • xstartup is a Bash shell script. Download and save in the bin directory of your home directory (i.e., ~/.vnc/).
      • A sample xstartup file is shown below:
        #!/bin/sh
        
        xrdb $HOME/.Xresources
        xsetroot -solid grey
        xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
        exec gnome-session &
        
    3. Type the following command: startvnc 1, to initiate a VNC Server on display 1 of Noodle.
      • startvnc is a Bash shell script. Download and save in the bin directory of your home directory (i.e., ~/bin/).
  3. Post Setup Home PC Instructions:
    1. Now on your home PC open up the VNC Viewer and type in noodle.ece.ucdavis.edu:1 as the server. VNC Viewer should connect to the VNC Server running on Noodle, and the preferrerd desktop session should be displayed.
Back to Top
How to setup a website on the ECE Network?:
  1. Visit the following website for information on setting up a personal website:
Back to Top
Jeremy W. Webb
Graduate Student
Electrical and Computer Engineering
University of California, Davis
One Shields Avenue
Davis, CA 95616

Last Modified: Monday, March 27, 2017 10:13:57 PM