Download presentation
Presentation is loading. Please wait.
Published byCathleen Francis Modified over 9 years ago
1
Intro to Programming Environment 1
2
Today You Will Learn how to connect to a machine remotely with “nomachine NX client” Learn how to create a new “source file” with an editor (gedit) Learn how to edit a perl program Learn how to execute a program You will learn some basic Linux commands 2
3
Background Our development platform of choice is Linux (specifically Open Suse) http://en.opensuse.orghttp://en.opensuse.org (if you are curious) Our interpretor of choice is perl http://www.perl.org/ http://www.perl.org/ (if you are curious) Why do we have to use Linux when XP/MacOSX/Vista/Sun is the best OS and Bill Gates/Steven Jobs/Scott MacNealy is the smartest/richest person in the world? 3
4
Linux Reasons for using Linux: Open source means we have access to every line of code Open source means we have control over the OS Cost Uniform platform (that way when you write your program on Linux and you get it to work, the TA can run it on Linux and it will also work) The college of engineering is currently supporting this platform 4
5
The FIRST time you connect, you will use the “NX Connection Wizard” For subsequent connections, you only need to use the “NX Client for Windows” 5
6
6
7
7
8
8
9
Check this box if you want a Shortcut created on your desktop 9
10
10
11
11
12
Click to close annoying “Useful Tips” 12
13
Click here to Open menu 13
14
Click on Applications then Utilities Scroll down: HINT – if you don’t get the scroll bar – you can just use the “arrow down” on the keyboard. Click on “Utilities” 14
15
Select “Editor” 15
16
Select “Text Editor gedit” 16
17
Now we have a screen in which we can type in a program 17
18
18 Type in one of the world’s simplest programs
19
File -> Save AS… 19
20
Type in file name – hello.c The “dot-c” is a convention to specify that this is actually a “C” source file Note – the procedure for saving files in discussion will be slightly more complicated – the TA’s will cover that in discussion 20 Enter file name:
21
Does your program “look” any different now? 21
22
Now select “Applications” --> “System” “Terminal” “Terminal Program Konsole” 22
23
Your screen will look something like this. 23
24
ls – command lists all files/directories 24 Note the “hello.pl” file Also – you are likely to have different files in your account (my directory is a mess and should probably be “cleaned up.”)
25
perl hello.pl -- this executes your source code 25
26
Unix and Linux basics: ls – list files and directories perl – invoke the interpreter gedit – start our editor from the command line mkdir dir1 – make a directory with the name “dir1” (aka called folders by Windows and Mac users) cd dir1 – navigate down one directory level to “dir1” cd.. – move up one level in a directory structure rm hello.pl – this will permanently remove the file “hello.pl” CAUTION – once you do this – there is NO getting your file back (you can also rm a directory once it is empty of files) There is also a way to rm multiple directories/files – but maybe we’ll show that at a later time 26
27
Navigating a File System Students tend to be more comfortable navigating a file system with Windows because of the graphical representation Ex.) My Computer (C:) Local Disk Documents and Settings , etc…. However, the concept is the same with Linux cd My Computer/Local Disk/Documents and Settings You can navigate “down” (or up) multiple levels with “cd” 27
28
Your CSS account and “home” All CSS accounts have a “home” directory cd – without any parameters always takes you to your “home” directory pwd – print working directory 28 $ cd $ pwd /usr/eng/tbraun $ pwd /nfs/server00/local/vol00/t/b/tbraun Note that if you perform ‘pwd’ before you ‘cd’, you will see a “strange’ home directory – this has to do with how the drives are shared across the network. These are in fact the same directory. After you ‘cd’ – you will always see /usr/eng/tbraun
29
Making a directory, and traversing mkdir EPS2 cd EPS2 mkdir hw1 cd hw1 gedit hw1.pl (save and quit) cd cd EPS2/hw1 cd.. 29
30
30 To end your connection – click this little red button After you click the little red button below – after a few seconds, this entire window will close. ENDING your session
31
Connecting from off-campus You may download and install the “NX client” from virtually any machine including PC, Macs, and Linux http://www.nomachine.com/download.php Select “NX Client for Windows” if you are using Windows, etc. 31
32
Other ways of doing things You should play around with the desktop. You will find there are multiple ways to navigate (try My Computer -> My Home Folder)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.