Recommendations for Using UMD Computer Lab Windows Machines


Accessing Your Home Directory

When you log on to a machine, you are automatically authenticated with the Andrew File System (AFS), and thus have full access to the files on your TerpConnect account. Your home directory is mapped to drive H: when you log in. If you open "Windows Explorer" and look in drive H:, you'll find all your files in your TerpConnect account. This means that you can save your files (word processing files, spreadsheets, etc.) on the H: drive, and they will be there on any machine you log into, in any Division of Information Technology Computer Lab. (If no machines are available, you can also FTP to TerpConnect and download your files or use the website terpconnect.umd.edu.)


NOTE: When you look at your home directory, you'll also see files and directories beginning with a period (such as .login) that don't display when you're connected to Terpconnect. This is because files that begin with a period, are hidden files under UNIX, but not on Microsoft Windows. (Type 'ls -a' next time you SSH to TerpConnect to view all the hidden files if you want to see that they are really there.) Do not change these files unless you know what you're doing! Most of them are likely being used to store your settings when you log into your account.



Files in Microsoft Windows vs. UNIX

Your TerpConnect account and the files in your home directory are stored on a UNIX System. There is a difference to note between how UNIX and how Microsoft Windows store text files. When you reach the end of a line that you are typing, you normally hit the Return key (or Enter depending on your keyboard,) the cursor moves to the next line, and you continue typing. You don't normally think about it, but something must be saved in your file to tell the computer that it has reached the end of a line and to start a new line. In Windows, what is saved in the file is a Carriage Return code (Ctrl-M) which tells the cursor to go to the left of the screen, and a "New Line" code (Ctrl-J) which tells the cursor to go down one line. These Ctrl-M and Ctrl-J characters are at the end of every line, but they are non-printable characters so you don't see them; you just see their effects.


UNIX does things a little differently. You still press return to go to the next line, but UNIX converts the Carriage Return/New Line combination into just the New Line (Ctrl-J) code, and that's all that is saved in the file. When you go to display the file, and UNIX reads the Ctrl-J character, it converts in back to the Ctrl-M Ctrl-J combination and continues.


What does this mean to you? If you load a text file from your TerpConnect account into Notepad (or some other text editor in Windows) you'll notice that it may not display correctly. Depending on which editor you're using, when you get to the end of a line, you may see the next line is moved down one line, but it starts where the last line left off instead of at the left of the screen. In Notepad, you'll notice a solid box where the end of the line should be, and the next line continuing on the same line. Some editors (like Wordpad and EDIT) and Word Processors (like Microsoft Word and WordPerfect) can detect UNIX text files and display them correctly.


Keep in mind, this also works both ways. If you save a file in Windows on your TerpConnect home directory and go to display it in UNIX (SSH to TerpConnect) it may not display correctly either (often times you may get a "^M" appearing at the end of each line.)


So what can you do about it? The easiest way is to keep the files you use in Windows separate from the ones in UNIX. If, however, you have to use some files on both platforms, there are programs that exist to convert between the two formats. You may also be able to find an editor on either system that correctly handles either format. The best thing to do is experiment with a few things to find which works best for you.