Today is: Tuesday July 22, 2014
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 : Shell scripts to simplify file synchronization.
- Setting up an SSH Server using Cygwin on a Windows PC : Setting up an SSH Server to allow remote access to your PC.
- Using SSH with Cygwin to access UC Davis ECE Servers : Setting up an SSH Client and Bash Aliases to access UC Davis ECE Servers.
- Using VNC to access a remote PC : Configuring VNC to allow users access to remote PCs.
- How to setup a website on the ECE Network?
Synchronizing files to/from UC Davis ECE Servers:
- 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:
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 firstname.lastname@example.org:/home/jwwebb/Html/howto/remote/ /home/jwwebb/Html/howto/remote/ email@example.com'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.48An 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 firstname.lastname@example.org:/home/jwwebb/Html/howto/ email@example.com'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.08Notice 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/ firstname.lastname@example.org:/home/jwwebb/Html/howto/remote/ email@example.com'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
Setting up an SSH Server using Cygwin on a Windows PC:
- Visit the following website for information on setting up an SSH Server using Cygwin:
Using SSH with Cygwin to access UC Davis ECE Servers:
- Visit the following website for information on setting up an SSH Client using Cygwin:
- Now that the SSH Client is setup, you can access the Noodle server by typing the following:
- ssh -X -L 2401:localhost:2401 firstname.lastname@example.org -l jwwebb
- You could also create a Bash alias, so that you could type sshsrfs3.
- alias sshsrfs3='ssh -X -L 2401:localhost:2401 email@example.com -l jwwebb'
- The above alias should reside in the .bashrc file.
Using VNC to access a remote PC:
- Initial Home PC Instructions:
- Download and install VNC from the Real VNC website [Download].
- The default configuration is sufficient to connect to remote servers.
- Linux Server Setup and Usage Instructions:
- To connect to Noodle in the UC Davis ECE VCL Lab first SSH to noodle.ece.ucdavis.edu.
- 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 &
- 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/).
- Post Setup Home PC Instructions:
- 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.
How to setup a website on the ECE Network?:
- Visit the following website for information on setting up a personal website:
Jeremy W. Webb Graduate Student Electrical and Computer Engineering University of California, Davis One Shields Avenue Davis, CA 95616
Last Modified: Sunday, February 07, 2010 12:43:04 PM