file: part 1: logging on to an unix machine

10
README.vnc.setup README.vnc.setup.fm [Revised: 1/29/18] 1/10 File: README.vnc.setup Part 1: Logging on to an UNIX machine from a PC using VNC During EE354L, EE457, EE560 courses (and perhaps in a few other courses) we will be using modelsim. It is best to install and run modelsim on the student laptops running Windows 7 or Windows 10. Modelsim is also available on our UNIX machines (aludra and nunki). If you want to run Unix modelsim then you need a graphical interface: 1. From any Windows (Windows 7 or 10) PC (either on campus or at home) with a high-speed internet connection (like DSL or cable-modem) using a program called Virtual Network Computing or VNC for short. 2. From a Mac . Mac does not require VNC. -- Open up terminal from Application -> Utilities -> Terminal. -- Sign in to aludra server using command: (ssh -X [email protected]). -- Enter your password (usc password). -- You need to a FTP program like FileZilla to transfer the files to your unix account from your Mac to simulate them on unix and perhaps finally transfer the results back to your Mac. This section describes option 1: VNC is freely available on the web from www.realvnc.com ( download page) . VNC provides a remote login to one of the two USC UNIX servers, aludra or nunki, but unlike PuTTy, it provides a graphical user inter- face. In order to establish a connection to aludra or nunki using VNC the user has to go through the follow- ing steps: It is assumed that you have downloaded PuTTY (SSH) on to your PC from ITS. Go to http://itser- vices.usc.edu/ Click on Software which takes you to http://software.usc.edu/ If ITS does not provide PuTTy, then you can get it from https://ninite.com/ While you are there, you may want to download FileZilla FTP program also if you do not have a file transfer program to transfer files between your unix account and your PC. 1. Bring up a PuTTY (SSH) connection from the WINDOWS PC to aludra or nunki by clicking SSH to host (PuTTy) icon ( "C:\Program Files\PuTTY\putty.exe" ). 2. Logon on to aludra using your UNIX user name and password (same as your USC email account name and password). If you are logging into UNIX just to submit your files (like in the EE354L or EE457), you can submit from this PuTTY itself. You do not need to invoke vncserver. 3. Set up your unix account to run the vncserver (this step needs to be done only one time (for the first time only)). ~eeview/vnc_initial.setup Since the above setup adds lines to your .login file, source (execute) your .login files by the following com- mand for the first time. Next time it is automatic when you login. source ~/.login

Upload: others

Post on 03-Feb-2022

7 views

Category:

Documents


0 download

TRANSCRIPT

README.vnc.setup

README.vnc.setup.fm [Revised: 1/29/18] 1/10

File: README.vnc.setup

Part 1: Logging on to an UNIX machine from a PC using VNCDuring EE354L, EE457, EE560 courses (and perhaps in a few other courses) we will be using modelsim. Itis best to install and run modelsim on the student laptops running Windows 7 or Windows 10. Modelsim isalso available on our UNIX machines (aludra and nunki). If you want to run Unix modelsim then you needa graphical interface:

1. From any Windows (Windows 7 or 10) PC (either on campus or at home) with a high-speed internet connection (like DSL or cable-modem) using a program called Virtual Network Computing or VNC for short.

2. From a Mac . Mac does not require VNC. -- Open up terminal from Application -> Utilities -> Terminal. -- Sign in to aludra server using command: (ssh -X [email protected]). -- Enter your password (usc password). -- You need to a FTP program like FileZilla to transfer the files to your unixaccount from your Mac to simulate them on unix and perhaps finally transfer theresults back to your Mac.

This section describes option 1:

VNC is freely available on the web from www.realvnc.com (download page) . VNC provides a remote loginto one of the two USC UNIX servers, aludra or nunki, but unlike PuTTy, it provides a graphical user inter-face. In order to establish a connection to aludra or nunki using VNC the user has to go through the follow-ing steps:

It is assumed that you have downloaded PuTTY (SSH) on to your PC from ITS. Go to http://itser-vices.usc.edu/ Click on Software which takes you to http://software.usc.edu/ If ITS does not providePuTTy, then you can get it from https://ninite.com/

While you are there, you may want to download FileZilla FTP program also if you do not have a file transferprogram to transfer files between your unix account and your PC.

1. Bring up a PuTTY (SSH) connection from the WINDOWS PC to aludra or nunki by clicking SSH tohost (PuTTy) icon ( "C:\Program Files\PuTTY\putty.exe" ).

2. Logon on to aludra using your UNIX user name and password (same as your USC email accountname and password). If you are logging into UNIX just to submit your files (like in the EE354L orEE457), you can submit from this PuTTY itself. You do not need to invoke vncserver.

3. Set up your unix account to run the vncserver (this step needs to be done only one time (for the firsttime only)).

~eeview/vnc_initial.setup

Since the above setup adds lines to your .login file, source (execute) your .login files by the following com-mand for the first time. Next time it is automatic when you login.

source ~/.login

README.vnc.setup

README.vnc.setup.fm [Revised: 1/29/18] 2/10

4. Run vncserver on unix as follows.

Following is an example screen capture when the command vncserver was entered at the unix prompt: Note that it asks you to set a password the very first time you invoke vncserver. This password need not be the same as your UNIXpassword. Most users select another password for vnc so that they can easily collaborate with their lab partners. You use this pass-word to authenticate the vncviewer running on your PC to pair with the vncserver running on unix.

If you forget the vnc password that you had set on your unix account (say on aludra), do the following toremove the vnc password on aludra so that you can chhose another password.rm ~/.vnc/passwd

Infact, I forgot the vnc password and I did the same!

(ignore the bunch of warnings dumped on your screen! Look for the last few lines looking like the following:)

On the Windows PC download the free VNC viewer from http://www.realvnc.com/ https://www.realvnc.com/en/connect/download/viewer/ .

README.vnc.setup

README.vnc.setup.fm [Revised: 1/29/18] 3/10

Click on the downloaded .exe file to set up.

Follow the prompts to accept license agreement, etc. and install it.

README.vnc.setup

README.vnc.setup.fm [Revised: 1/29/18] 4/10

1. Click on the vnc icon on your desktop

1. 1. 1. 1. 1. and run the VNC Viewer executable. This brings up a small window titled “VNC Viewer: Connection

Details”.

2.

3.

README.vnc.setup

README.vnc.setup.fm [Revised: 1/29/18] 5/10

4.

5.

6.

7. Download ee201L_Middle_Finder.zip from http://www-classes.usc.edu/engr/ee-s/457/ee457_tools/ee201L_Middle_Finder.zip and upload the same to your unix account. Unzip on unix unzip ee201L_Middle_Finder.zip

README.vnc.setup

README.vnc.setup.fm [Revised: 1/29/18] 6/10

It creates a subdirectory ee201L_Middle_Finder

8. On your PC in the vnc viewer window, go to the subdirectory

9. Open a terminal window and invoke modelsim

README.vnc.setup

README.vnc.setup.fm [Revised: 1/29/18] 7/10

10.

11. Type in the command “vsim &” to invoke the ModelSim GUI. The “&” in the command means “runthe command in the background while allowing me to use the terminal window for further use.

The modelsim GUI opens up in a separate window. Size and move the window as needed.

Notice that there may be hindows hidden.

README.vnc.setup

README.vnc.setup.fm [Revised: 1/29/18] 8/10

12. Open the project

13. Remove the files and add again as the path in the previous project file created on windows is notapplicable here.

14. Right-click on each file, and remove it from the project (not from the disk).15. Project => Add to Project => Existing File

Browse and add files, one by one (unlike in windows, you can not add multiple files in one stroke inUnix.

README.vnc.setup

README.vnc.setup.fm [Revised: 1/29/18] 9/10

16. Compile, simulate, create waveform, zoom-in and try other operations like in windows.

17. The line, “access with: vncviewer aludra.usc.edu:15030“ (appeared in the aboveexample) states that you should type aludra.usc.edu:15030 in the Server box in the “VNCViewer ” window. The “15030” in this example is to be replaced by whatever port number you wereassigned when you invoke vncserver. And if you ran vncserver from nunki, then it shouldnunki.usc.edu instead of aludra.usc.edu .

18. An alternative to the above (downloading VNC Viewer on your PC and invoking it) is to use a web-browser (example: Microsoft Internet Explorer) and access your unix desktop with “ http://aludra.usc.edu:14030 “. This did not work on 1/29/2018 on my laptop. It returned the followingerror.

======================================================================19. In order to close the VNC connection properly the user has to follow these steps:

1. Close the VNC desktop window.2. Go back to the PuTTy (SSH) window and kill vncserver process, you can use the following com-

mand:

vncserver -kill :10030Note that one of the last few lines in the response to vncserver invocation was:kill with: vncserver -kill :10030So in your case the number will be something else (not necessarily 10030 as shown in this exam-ple).

3. NOTE: IT IS IMPORTANT TO TERMINATE THE VNC PROCESS PROPERLY SINCE THE PORTSHAVE TO BE FREED UP SO THAT OTHER STUDENTS CAN USE THEM!!!

README.vnc.setup

README.vnc.setup.fm [Revised: 1/29/18] 10/10

Part 2: Logging on to an UNIX machine from a PC on ResNet using XWin32

Note: This part is not written here but you may be able to find online help.