About This Book | xiii |
1. Logging In to SunOS | |
| ...and Starting OpenWindows | 1 |
| ...Logging In | 1 |
| ...Your Login Shell | 2 |
| ...Logging Out | 3 |
| ...Keyboard Equivalents | 4 |
| ...OpenWindows Start-up Considerations | 5 |
| ......The OPENWINHOME Environment Variable | 6 |
| ......Using the Correct Start-Up File | 7 |
| ...Starting the OpenWindows User Environment | 8 |
| ......Displaying the OpenWindows Software | 9 |
| ......If OpenWindows Won't Display | 11 |
| ...Quitting the OpenWindows Environment | 11 |
| ...Special OpenWindows Start-up Options | 12 |
| ......Starting with Reduced Network Security | 12 |
| ......Starting with Various Monitor Types | 13 |
| ......SPARC Starting with Multiple Monitors | 13 |
2. Basic SunOS Commands | 17 |
| ...The Command Prompt | 17 |
| ...Entering Commands | 18 |
| ......Correcting Typing Mistakes | 18 |
| ......Entering Multiple Commands and Long Commands | 19 |
| ......Repeating Previous Commands | 20 |
| ......Adding Command Options | 21 |
| ......Redirecting and Piping Command Output | 21 |
| ......Running Commands in the Background | 23 |
| ...Getting Help with OS Commands | 24 |
| ......Displaying Manual Pages with man | 24 |
| ......Displaying a One-line Summary with whatis | 24 |
| ......Keyword Lookup with apropos | 25 |
3. Working with Files and Directories | 27 |
| ...File Concepts | 27 |
| ...Using File Commands | 28 |
| ......Before You Begin | 28 |
| ......Creating a Test File | 29 |
| ......Listing Files (ls) | 29 |
| ......Copying Files (cp) | 29 |
| ......Moving and Renaming Files (mv) | 30 |
| ......Deleting Files (rm) | 30 |
| ......Displaying File Contents (more, cat) | 31 |
| ......Displaying File Type (file) | 32 |
| ...Directories and Hierarchy | 32 |
| ......Directory Hierarchy | 32 |
| ......Print Working Directory (pwd) | 33 |
| ......Your Home Directory | 34 |
| ......Change Working Directory (cd) | 34 |
| ......Creating a Directory (mkdir) | 36 |
| ......Relative Path Names | 36 |
| ......Moving and Renaming Directories | 37 |
| ......Copying Directories | 37 |
| ......Removing Directories (rmdir) | 38 |
| ...Looking at Differences Between Files (diff) | 38 |
| ......Comparing Three Different Files (diff3) | 41 |
| ......Using bdiff on Large Files | 41 |
| ...Looking Up Files (find) | 41 |
| ...File and Directory Security | 44 |
| ......Displaying Permissions and Status (ls -l) | 45 |
| ......Listing "Hidden" Files (ls -a) | 46 |
| ......Changing Permissions (chmod) | 46 |
| ......Setting Absolute Permissions | 50 |
4. Searching Files | 55 |
| ...Searching for Patterns with grep | 55 |
| ......grep as a Filter | 56 |
| ......grep with Multi-Word Strings | 57 |
| ......Searching for Lines without a Certain String | 58 |
| ......More on grep | 58 |
| ......Searching for Metacharacters | 60 |
| ......Single or Double Quotes on Command Lines | 61 |
5. Passwords, Processes, | |
| ...and Disk Storage | 63 |
| ...Using a Password | 63 |
| ......Changing Your Password | 64 |
| ......Password Aging | 65 |
| ...Processes and PIDs | 66 |
| ......What Commands Are Running Now (ps) | 66 |
| ......Terminating Processes (kill) | 67 |
| ...Managing Disk Storage | 68 |
| ......Displaying Disk Usage (df -k) | 68 |
| ......Displaying Directory Usage (du) | 68 |
6. Using the vi Editor | 69 |
| ...Starting vi | 70 |
| ......Creating a File | 70 |
| ......The Status Line | 71 |
| ...The Two Modes of vi | 71 |
| ......Entry Mode | 71 |
| ......Command Mode | 72 |
| ...Ending a Session | 73 |
| ......Saving Changes and Quitting vi | 73 |
| ...Printing a File | 74 |
| ...Basic vi Commands | 75 |
| ......Moving Around in a File | 75 |
| ......Inserting Text | 78 |
| ......Changing Text | 79 |
| ......Undoing Changes | 80 |
| ......Deleting Text | 81 |
| ......Copying and Moving Text -- Yank, Delete, and Put | 82 |
| ......Using a Count to Repeat Commands | 84 |
| ...Using ex Commands | 84 |
| ......Turning Line Numbers On and Off | 84 |
| ......Copying Lines | 85 |
| ......Moving Lines | 86 |
| ......Deleting Lines | 86 |
| ...Searching and Replacing with vi | 87 |
| ......Finding a Character String | 87 |
| ......Refining the Search | 88 |
| ......Replacing a Character String | 89 |
| ......Going to a Specific Line | 90 |
| ...Inserting One File into Another | 90 |
| ...Editing Multiple Files | 91 |
| ......Editing a Series of Files | 91 |
| ......Copying Lines Between Files | 92 |
| ...Setting vi Parameters | 92 |
| ...Recovering from a Crash | 93 |
| ...Summary of Basic vi Commands | 93 |
7. Using Mail | 97 |
| ...mailx Basics | 97 |
| ......Starting mailx | 98 |
| ......Sending Yourself a Sample Letter | 98 |
| ......Reading Your Sample Letter | 100 |
| ......Quitting mailx | 101 |
| ...Reading Letters | 102 |
| ...Deleting (and Undeleting) Letters | 103 |
| ...Printing Letters | 105 |
| ...Sending Letters | 105 |
| ......Undeliverable Letters | 107 |
| ......Canceling an Unsent Letter | 107 |
| ......Adding Carbon and Blind Carbon Copies | 108 |
| ......Inserting a Copy of a Letter or File | 109 |
| ......Replying to a Letter | 109 |
| ...Saving and Retrieving Letters | 110 |
| ......Saving and Copying Letters in Files | 110 |
| ......Saving and Copying Letters in Folders | 111 |
| ......Reading Letters in Files and Folders | 113 |
| ...Using vi with mailx | 114 |
| ...Mail Aliases | 115 |
| ......Setting Up Mail Aliases in .mailrc | 115 |
| ......Setting Up Mail Aliases in /etc/aliases | 117 |
| ...Tilde Commands | 120 |
| ...Getting Help: Other mailx Commands | 121 |
8. Using Printers | 123 |
| ...Submitting Print Requests | 123 |
| ......Submitting Print Requests to the Default Printer | 124 |
| ......Submitting Print Requests Using a Printer Name | 124 |
| ......Requesting Notification when Printing is Complete | 125 |
| ......Printing Multiple Copies | 126 |
| ......Summary Table of lp Options | 126 |
| ...Determining Printer Status | 127 |
| ......Checking on the Status of Your Print Requests | 127 |
| ......Checking on Available Printers | 128 |
| ......Displaying All Status Information | 128 |
| ......Displaying Status for Printers | 129 |
| ......Displaying Printer Characteristics | 130 |
| ......Summary Table of lpstat Options | 131 |
| ...Canceling a Print Request | 132 |
| ......Canceling a Print Request by ID Number | 133 |
| ......Canceling a Print Request by Printer Name | 133 |
9. Using the Network | 135 |
| ...Networking Concepts | 136 |
| ...Logging In Remotely (rlogin) | 136 |
| ......rlogin without a Home Directory | 137 |
| ......rlogin as Someone Else | 138 |
| ......rlogin to an Unknown Machine | 138 |
| ......Aborting an rlogin Connection | 139 |
| ......Suspending an rlogin Connection | 140 |
| ......Verifying Your Location (who am i) | 140 |
| ...Copying Files Remotely (rcp) | 141 |
| ......Copying from Another Machine to Yours | 141 |
| ......Copying from Your Machine to Another | 142 |
| ...Executing Commands Remotely (rsh) | 142 |
| ...Viewing User Information (rusers) | 143 |
10. Customizing Your | |
| ...Working Environment | 145 |
| ...Initialization Files | 145 |
| ...Environment Variables | 146 |
| ......The User Profile | 147 |
| ......Setting the PATH Variable | 149 |
| ......Aliases (C Shell Only) | 150 |
| ......Changing Your Command Prompt | 151 |
| ......Other Useful Variables | 152 |
| ...Setting Default File Permissions | 153 |
| ...Customizing OpenWindows Fonts | 155 |
| ......Specifying the Font Style and Point Size | 155 |
| ......Listing the Available Fonts | 158 |
A. Migrating to OpenWindows Version 3.3, or Later Versions . | 159 |
| ...SPARC Migrating from the SunView Environment | 159 |
| ......SPARC The .defaults and .Xdefaults Files | 159 |
| ...Migrating from a pre-Version 3.3 OpenWindows Environment | 160 |
| ......The OPENWINHOME Environment Variable | 160 |
| ......The .xinitrc File | 161 |
| ......Using the Correct Start-up File | 161 |
| ......Workspace Properties | 163 |
| ......Customizing the Workspace Menu | 163 |
B. Modifying the Keyboard | 165 |
| ...Disabling/Enabling the Compose Key | 165 |
| ...SPARC Left-Handed Key Remapping | 166 |
| ......SPARC Using the Remapping Script | 166 |
| ......SPARC Undoing the Keyboard Remapping | 168 |
C. Running Networked Applications | 171 |
| ...Using rlogin to Run a Networked Application | 172 |
| ...More About Security | 173 |
| ......Who Should Read this Section | 174 |
| ......Access Control Mechanisms | 174 |
| ......Authorization Protocols | 175 |
| ......Manipulating Access to the Server | 176 |
| ......Running Clients Remotely, or Locally as Another User | 180 |
D. SPARC --DECnet Internetworking(DNI) | 183 |
| ...Setting Up DECnet Internetworking | 184 |
| ...Displaying a Remote Client on an OpenWindows Machine | 185 |
| ...Displaying a Remote Client on a VAX | 185 |
E. Setting Up Printers and Modems | 189 |
| ...Setting Up a Modem on Your System | 189 |
| ......For Additional Information About Modems | 191 |
| ...Setting Up a Printer For Use On Your System | 192 |
| ......For Additional Information About Printers | 193 |
Index | 195 |
You must type the filename argument as described in man Pages(1): User Commands.
You can become superuser by typing root at the login prompt or by typing the su command at the command prompt.


For example, Ctrl-Alt means that you press and hold both the Control and Alt keys at the same time; Ctrl-Alt-c means that you press and hold Control and Alt at the same time and simultaneously type c.
login: |
login: spanky |
login: spanky Password: |
$ exit |
$ exit login: |
| Operation | Keyboard Equivalent | Action |
|---|---|---|
| Again | Meta - a | Repeats the previous operation |
| Copy | Meta - c | Copies the selection to the clipboard |
| Cut | Meta - x | Cuts the selection and puts it on the clipboard |
| Find | Meta - f | Finds the selection to the right of the caret |
| Help | Help or F1 | Displays a help window with context-sensitive help for the object at the pointer location |
| New | Meta - n | Loads a new file |
| Open (File) | Meta - o | Opens a file (for example, if you've highlighted a file icon in File Manager) |
| Open (Window) | Meta - w | Opens an icon or closes a window to an icon |
| Operation | Keyboard Equivalent | Action |
|---|---|---|
| Paste | Meta - v | Copies the clipboard selection to the insertion point |
| Meta - p | Sends the file to the printer (for example, if you've highlighted a file icon in File Manager) | |
| Props | Meta - i | Displays the property window for th application at the pointer location |
| Redo | Shift-Meta - p | Undoes an Undo |
| Save | Meta - s | Save the current file |
| Stop | Stop or Esc | Stops the current operation |
| Undo | Meta - u | Undoes the previous operation |
If you are working in the .profile file, do Step a; if you are working in the .cshrc file, do Step b.
a. In the .profile file:
#OPENWINHOME=/usr/openwin |
#setenv OPENWINHOME /usr/openwin |
If you are running the Bourne or Korn shell, do Step a. If you are running the C shell, do Step b.
$ unset OPENWINHOME |
example% unsetenv OPENWINHOME |
$ cd $ ls -a .xinitrc |
$ rm .xinitrc |
a. Move .xinitrc to .xinitrc.save:
$ mv .xinitrc .xinitrc.save |
$ cp $OPENWINHOME/lib/Xinitrc $HOME/.xinitrc |
For information on how to mount the OpenWindows software from a server, see OpenWindows Reference Manual, or talk to your system administrator.
$ /usr/openwin/bin/openwin |
$ openwin |
openwin () {
/usr/openwin/bin/openwin
}
|
$ . .profile |
alias openwin /usr/openwin/bin/openwin |
example% source .cshrc |
Not login shell. |
The Workspace menu appears, presenting several options.
Exit.
A popup window appears, asking you to confirm that you want to exit the window system.
$ openwin [ options ] |
$ openwin -noauth |
$ cd $ openwin -dev /dev/fb grayvis |
$ openwin [ [ -dev device ] [ deviceoptions ] ] |
$ openwin -dev /dev/fb left -dev /dev/fbs/bwtwo0 right |
$ openwin -dev /dev/fb -dev /dev/fbs/bwtwo0 |
$ openwin -dev /dev/fb right -dev /dev/fbs/bwtwo0 left |
$ openwin -dev /dev/fbs/cgsix0 top -dev /dev/fbs/bwtwo0 bottom |
$ openwin -dev /dev/fbs/cgsix0 -dev /dev/fbs/bwtwo0 |
$ openwin -dev /dev/fbs/cgsix0 bottom -dev /dev/fbs/bwtwo0 top |
$ date Mon Feb 3 10:12:51 PST 1992 $ |
$ Date Date: Command not found. $ |
$ date; logname Mon Feb 3 10:19:25 PST 1992 spanky $ |
$ date; \ logname Mon Feb 3 10:23:25 PST 1992 hankw $ |
example% !! date Mon Feb 3 10:26:20 PST 1992 example% |
example% history 1 pwd 2 clear 3 ls -l 4 cd /usr/home/worker 5 logname 6 date 7 history |
example% !-2 logname hankw example% |
$ date -u Mon Feb 3 11:06:51 GMT 1993 $ |
$ date > sample.file $ |
$ more sample.file Mon Feb 3 12:56:26 PST 1993 $ |
$ date | lp $ |
$ bigjob & [1] 21414 $ |
$ date Mon Feb 3 10:23:25 PST 1992 [1] + Done bigjob $ |
$ nohup bigjob & [1] 21414 $ |
$ man man |
$ whatis date date (1) -display or set the date $ |
$ cd $ pwd /export/home/username |
$ touch tempfile $ |
$ ls tempfile tempfile |
$ cp tempfile copyfile $ |
$ ls *file copyfile tempfile |
$ mv tempfile emptyfile $ |
$ ls *file copyfile emptyfile |
$ rm copyfile $ ls *file emptyfile |
--More--(nn%) [Press space to continue, 'q' to quit.] |
$ cat file1 file2 file3 > bigfile $ ls *file bigfile file1 file2 file3 $ |
$ file copyfile copyfile: ascii text |

$ pwd /home/user1 |
$ cd /usr/lib $ pwd /usr/lib |
$ cd $ pwd /home/user1 |
example% cd ~/music |
example% cd ~username |
$ $home/music |
$ $homeusername |
$ pwd /home/user1 $ cd .. $ pwd /home |
$ pwd /home/user1 $ cd ../user2 $ pwd /home/user2 |
$ mkdir veggies $ cd veggies $ mkdir broccoli $ cd broccoli $ pwd /home/user2/veggies/broccoli |
$ pwd /home/user2/veggies $ ls broccoli $ mv broccoli carrots $ ls carrots |
$ pwd /home/user2/veggies $ ls carrots $ mv carrots ../veggies2 $ ls ../veggies2 carrots |
$ cp -r veggies veggies3 $ |
$ rmdir veggies3 $ |
$ rm -r veggies3 $ |
$ diff leftfile rightfile |
l[,l] a r[,r]
$ cat sched.7.15 Week of 7/15 Day: Time: Action Item: Details: T 10:00 Hardware mtg. every other week W 1:30 Software mtg. T 3:00 Docs. mtg. F 1:00 Interview $ cat sched.7.22 Week of 7/22 Day: Time: Action Item: Details: M 8:30 Staff mtg. all day T 10:00 Hardware mtg. every other week W 1:30 Software mtg. T 3:00 Docs. mtg. $ diff sched.7.15 sched.7.22 1c1 < Week of 7/15 --- > Week of 7/22 4a5 > M 8:30 Staff mtg. all day 8d8 < F 1:00 Interview |
$ diff3 file1 file2 file3 |
$ bdiff leftfile rightfile |
$ find directory options |
$ find . -name '*s' -print ./programs ./programs/graphics ./programs/graphics/gks ./src/gks $ |
-name filename
-user userid
-group group Selects files belonging to group. -m time n Selects files that have been modified within n days. -newer checkfile
$ find . \( -name AAA -o -name BBB \) -print ./AAA ./BBB |
$ find . \!-name BBB -print ./AAA |
-exec command '{}' \;
$ find . \( -name junk -o -name dummy \) -exec rm '{}' \;
|

$ ls -l dirname |
$ ls -a . .. .cshrc .login .profile emptyfile |
chmod permissions name |
$ ls -l carrots drwxr-xr-x 3 user2 1024 Feb 10 11:15 carrots $ chmod g+w carrots $ ls -l carrots drwxrwxr-x 3 user2 1024 Feb 10 11:15 carrots $ |
$ ls -l carrots drwxrwxr-x 3 user2 1024 Feb 10 11:15 carrots $ chmod o-rx carrots $ ls -l carrots drwxrwx--- 3 user2 1024 Feb 10 11:15 carrots $ |
-rw-r--r--
drwxr-xr-x
$ ls -l turnip -rw-r--r-- 3 user2 1024 Feb 10 12:27 turnip $ chmod u+x turnip $ ls -l turnip -rwxr--r-- 3 user2 1024 Feb 10 12:27 turnip $ |
$ ls -l garlic -rw-r--r-- 3 user2 1024 Feb 10 11:31 garlic $ chmod a+x garlic $ ls -l garlic -rwxr-xr-x 3 user2 1024 Feb 10 11:31 garlic $ |
$ pwd /home/user2/veggies $ ls -l -rwxrwxrwx 3 user2 21032 Feb 12 10:31 beats -rwxrwxrwx 2 user2 68 Feb 10 11:09 corn -rwxrwxrwx 3 user2 12675 Feb 08 09:31 garlic -rwxrwxrwx 1 user2 1024 Feb 14 16:38 onions $ chmod go-w * $ ls -l -rwxr-xr-x 3 user2 21032 Feb 12 10:31 beats -rwxr-xr-x 2 user2 68 Feb 10 11:09 corn -rwxr-xr-x 3 user2 12675 Feb 08 09:31 garlic -rwxr-xr-x 1 user2 1024 Feb 14 16:38 onions $ |
$ chmod 771 garlic |
| Permission | User | Group | Others |
|---|---|---|---|
| Read | 4 | 4 | 0 |
| Write | 2 | 2 | 0 |
| Execute | 1 | 1 | 1 |
| Total | 7 | 7 | 1 |
$ ls -l onion -rw-r--r-- 3 user2 1024 Feb 10 11:46 onion $ chmod 755 onion $ ls -l onion -rwxr-xr-x 3 user2 1024 Feb 10 11:48 onion $ |
| Permission | User | Group | Others |
|---|---|---|---|
| Read | 4 | 4 | 4 |
| Write | 2 | 0 | 0 |
| Execute | 1 | 1 | 1 |
| Total | 7 | 5 | 5 |
$ ls -l cabbage -rw-r--r-- 3 user2 1024 Feb 10 11:51 cabbage $ chmod 777 cabbage $ ls -l cabbage -rwxrwxrwx 3 user2 1024 Feb 10 11:53 cabbage $ |
| Permission | User | Group | Others |
|---|---|---|---|
| Read | 4 | 4 | 4 |
| Write | 2 | 2 | 2 |
| Execute | 1 | 1 | 1 |
| Total | 7 | 7 | 7 |
$ pwd /home/user2/veggies $ ls -l -rwxrwxrwx 3 user2 21032 Feb 12 10:31 beats -rwxrwxrwx 2 user2 68 Feb 10 11:09 corn -rwxrwxrwx 3 user2 12675 Feb 08 09:31 garlic -rwxrwxrwx 1 user2 1024 Feb 14 16:38 onions $ chmod 751 * $ ls -l -rwxr-x--x 3 user2 21032 Feb 12 10:31 beats -rwxr-x--x 2 user2 68 Feb 10 11:09 corn -rwxr-x--x 3 user2 12675 Feb 08 09:31 garlic -rwxr-x--x 1 user2 1024 Feb 14 16:38 onions $ |
$ grep string file |
$ grep Poe extensions Edgar Allan Poe x72836 $ |
$ grep Allan extensions David Allan x76438 Edgar Allan Poe x72836 $ grep Al extensions Louisa May Alcott x74236 David Allan x76438 Edgar Allan Poe x72836 $ |
$ grep allan extensions $ grep Allan extensions David Allan x76438 Edgar Allan Poe x72836 $ |
$ ls -l *.ps | grep May |
ls -l *.ps |
$ ls -l *.ps -rw-r--r-- 1 elvis 7228 Apr 22 15:07 change.ps -rw-r--r-- 1 elvis 2356 May 22 12:56 clock.ps -rw-r--r-- 1 elvis 1567 Jun 22 12:56 cmdtool.ps -rw-r--r-- 1 elvis 10198 Jun 22 15:07 command.ps -rw-r--r-- 1 elvis 5644 May 22 15:07 buttons.ps $ |
| grep May |
$ ls -l *.ps | grep May -rw-r--r-- 1 elvis 2356 May 22 12:56 clock.ps -rw-r--r-- 1 elvis 5644 May 22 15:07 buttons.ps $ |
$ grep "Louisa May" extensions Louisa May Alcott x74236 $ |
$ grep ar * actors:Humphrey Bogart alaska:Alaska is the largest state in the United States. wilde:book. Books are well written or badly written. $ |
$ ls actors alaska hinterland tutors wilde $ grep -v e * actors:Mon Mar 14 10:00 PST 1936 wilde:That is all. $ |
$ grep '^b' list |
$ grep 'b$' list |
$ grep '^b$' list |
$ grep 'an.' list |
Because it includes zero occurrences, usage of the asterisk is a little non-intuitive. Suppose you want to find all words with the letters "qu" in them. Typing:
$ grep 'qu*' list |
$ grep 'nn*' list |
$ grep 'nnn*' list |
$ grep .* list |
$ grep ^\. |
| Character | Matches |
|---|---|
| ^ | The beginning of a text line |
| $ | The end of a text line |
| . | Any single character |
| [...] | Any single character in the bracketed list or range |
| [^...] | Any character not in the list or range |
| * | Zero or more occurrences of the preceding character or regular expression |
| .* | Zero or more occurrences of any single character |
| \ | Escapes special meaning of next character |
$ grep "dang it, boys" * |
$ grep $ list |
$ grep '\$' list |
$ passwd Changing password for hankw on worker Old password: New password: Retype new password: $ |
(If no password is currently assigned to your account, the system will skip the Old Password: prompt.) Note that the system does not echo (display) your password on the screen. This prevents other users from discovering your password.
Again, the password you type does not echo on the screen.
This is to verify that you typed exactly what you intended to type.
If you don't enter your password precisely the way you did at the previous prompt, the system refuses to change your password and responds with Sorry. If this happens repeatedly, contact your system administrator to get a new password.
Your password has expired. Choose a new one. |
Sorry, less than 2 weeks since the last change. |
$ passwd -d username 2-14-92 14 60 |
$ ps PID TTY TIME COMMAND 1291 co 0:12 -bin/csh (csh) 3250 p0 0:00 ps 1286 p1 0:05 -bin/csh (csh) 3248 p1 0:05 vi commands $ kill 1291 [1} Terminated -bin/csh/ (csh) $ |
$ ps | grep commandname |
$ kill -9 PID# |
$ df -k |
$ du | sort -r -n |
$ vi paint |

:w |
:wq |
:q |
:q! |
$ lp filename |
1 Oh, when I die, take my saddle from the wall, 2 Put it on my pony, lead him out of the stall. 3 Tie my bones to his back, point our faces to the west, 4 And we'll ride the prairies that we love the best. 5 6 Ride around, little doggies, 7 Ride around real slow. 8 Firey and Snuffy are rarin' to go. ~ ~ ~ ~ ~ ~ :set nu |
:line#,line# co line# |
:1,5 co 12 |
:.,5 co 12 |
:6,$ co 2 |
:line#,line# m line# |
:1,5 m 12 |
:line#,line# d |
:1,5 d |
/^Search |
/search\.$ |
/\<search\> |
/.isinformation |
/[a-z]*isinformation |
:g/search-string/s//replace-string/g |
:g/disinformation/s//newspeak/g |
:g/disinformation/s//newspeak/gc |
:line# r filename |
:84 r orwell |
:r orwell |
$ vi paint orwell |
$ vi test* |
:n orwell |
:set all |
vi -r filename |
| Command | Meaning |
|---|---|
| Starting vi | |
| vi filename | Open or create file |
| vi | Open new file to be named later |
| vi -r filename | Recover crashed file |
| view filename | Open file read-only |
| Cursor Commands | |
| h | Move left one character |
| j | Move down one line |
| k | Move up one line |
| l | Move right one character |
| w | Move right one word |
| W | Move right one word (past punctuation) |
| b | Move left one word |
| B | Move left one word (past punctuation) |
| e | Move to end of current word |
| Command | Meaning |
|---|---|
| Return | Move down one line |
| Back Space | Move left one character |
| Space Bar | Move right one character |
| H | Move to top of screen |
| M | Move to middle of screen |
| L | Move to bottom of screen |
| Ctrl-F | Page forward one screen |
| Ctrl-D | Scroll forward one-half screen |
| Ctrl-B | Page backward one screen |
| Ctrl-U | Scroll backward one-half screen |
| Inserting Characters and Lines | |
| a | Insert characters to right of cursor |
| A | Insert characters at end of line |
| i | Insert characters to left of cursor |
| I | Insert characters at beginning of line |
| o | Insert line below cursor |
| O | Insert line above cursor |
| Changing Text | |
| cw | Change word (or part of word) to right of cursor |
| c | Change line |
| C | Change from cursor to end of line |
| s | Substitute string for character(s) from cursor forward |
| r | Replace character at cursor with one other character |
| r Return | Break line |
| J | Join current line and line below |
| xp | Transpose character at cursor and character to right |
| ~ | Change case of letter (upper or lower) |
| Command | Meaning |
|---|---|
| u | Undo previous command |
| U | Undo all changes to current line |
| :u | Undo previous last-line command |
| Deleting Text | |
| x | Delete character at the cursor |
| X | Delete character to the left of the cursor |
| dw | Delete word (or part of word to right of cursor) |
| dd | Delete line containing the cursor |
| D | Delete part of line to right of cursor |
| dG | Delete to end of file |
| d1G | Delete from beginning of file to cursor |
| :5,10 d | Delete lines 5-10 |
| Copying and Moving Text | |
| yy | Yank or copy line |
| Y | Yank or copy line |
| p | Put yanked or deleted line below current line |
| P | Put yanked or deleted line above current line |
| :1,2 co 3 | Copy lines 1-2 and put after line 3 |
| :4,5 m 6 | Move lines 4-5 and put after line 6 |
| Setting Line Numbers | |
| :set nu | Show line numbers |
| :set nonu | Hide line numbers Setting Case-sensitivit |
| :set ic | Searches should ignore case |
| :set noic | Searches should be case-sensitive |
| Finding a Line | |
| G | Go to last line of file |
| Command | Meaning |
|---|---|
| 1G | Go to first line of file |
| 21G | Go to line 21 |
| Searching and Replacing | |
| /string | Search for string |
| ?string | Search backward for string |
| n | Find next occurrence of string in search direction |
| N | Find previous occurrence of string in search direction |
| :g/search/s//replace/g | Search and replace |
| Clearing the Screen | |
| Ctrl-L | Clear (refresh) scrambled screen |
| Inserting a File into a File | |
| :r filename | Insert (read) file after cursor |
| :34 r filename | Insert file after line 34 |
| Saving and Quitting | |
| :w | Save changes (write buffer) |
| :w filename | Write buffer to named file |
| :wq | Save changes and quit vi |
| ZZ | Save changes and quit vi |
| :q! | Quit without saving changes |
$ mailx |
No mail for username $ |
$ mailx rose@texas |
$ mailx rose@texas Subject: |
$ mailx rose@texas Subject: to someone who really cares Dear Rosey, From the ends of your fingers To the tip of your nose You're a cool breeze in August My sweet Texas Rose. See you soon, Rose |
$ mailx Mail version 4.0 Thu Jan 16 12:59:09 PST 1992 Type ? for help. "/var/mail/rose": 2 messages 1 new U 2 hal@uncertain Fri Feb 14 12:01 14/318 financial status >N 1 rose@texas Mon Feb 17 08:12 21/453 to someone who & |
$ mailx Mail version 4.0 Thu Jan 16 12:59:09 PST 1992 Type ? for help. "/var/mail/rose": 1 message 1 new >N 1 rose@texas Fri Jul 14 12:01 21/453 to someone who & 1 To: rose@texas From: rose@texas Subject: to someone who really cares Dear Rose, From the ends of your fingers To the tip of your nose You're a cool breeze in August My sweet Texas Rose. See you soon, Rose & |
& q |
Saved one message in home_directory/mbox.
& x |
You have mail
You have new mail
No mail for username
$ mailx
Mail version 4.0 Thu Jan 16 12:59:09 PST 1992 Type ? for help.
"/var/mail/rose": 4 messages 1 new 2 unread
1 rose@texas Fri Feb 14 12:01 21/453 to someone who
U 2 hank@fretful Fri Feb 14 18:31 19/353 so lonely I
U 3 farmer@freeway Sat Feb 15 10:22 24/557 looks like my
>N 4 hoover@woofer Sun Feb 16 23:59 14/280 big old furry
&
|
& d 2 |
& d 1 3 |
& d 1-3 |
& u 2 |
& |2 lp |
$ who
elmer tty15 Feb 20 10:22
susan tty04 Feb 20 10:37
stormy tty07 Feb 20 11:49
hankw tty06 Feb 20 12:02
|
$ finger
Login Name TTY Idle When
elmer Elmer Brown tty15 43 Thu 10:22
susan Susan Lake tty04 Thu 10:37
stormy Stormy Ball tty07 12 Thu 11:49
hankw Hank Wilson tty06 22 Thu 12:02
|
$ mailx user@machine |
& m user@machine |
$ mailx hank@fretful sally@dakota tex@twister |
$ mailx hank@fretful,sally@dakota,tex@twister |
A sentence that wraps on your screen is not considered a new line until you press Return.
user@machine...User unknown
N 1 Mailer-Daemon Fri Jan 3 11:13 8/49 Returned mail: User unknown |
set askcc |
~c address(es)
To use this method to send carbon copies to multiple recipients, separate the addresses with spaces. For example:
~c hank@fretful george@lonesome stormy@snoozer |
~r outline |
& r 2 |
& s 3 ~/notes/finance |
& s 3 5-8 ~/notes/finance |
& c 3 ~/notes/finance |
$ mkdir Letters |
set folder=/home/austin/rose/Letters |
set folder=~/Letters |
& s 3 +projects |
& c 3 +projects |
mailx -f filename
$ mailx -f ~/memos/finance |
$ mailx -f +projects |
& folders |
& folder +foldername |
& % |
& # |
$ vi ~/.mailrc |
alias amigos hank@fretful george@lonesome sally@dakota alias softball earl@woofer tex@twister elmer@farmhouse jane@freeway hank@fretful jj@walker sally@dakota steve@hardway |
$ mail amigos Subject: Let's eat Hey Compadres. How about getting together for lunch on Friday? Anyone interested? |
To: hank@fretful george@lonesome sally@dakota Subject: Let's eat Hey Compadres. How about getting together for lunch on Friday? Anyone interested? |
$ su Password: # |
# vi /etc/aliases ## #Aliases can have any mix of upper and lower case on the left- #hand side, #but the right-hand side should be proper case (usually lower) # # >>>>>>>>>>The program "newaliases" will need to be run after # >> NOTE >>this file is updated for any changes to # >>>>>>>>>>show through to sendmail. # #@(#)aliases 1.10 89/01/20 SMI ## # Following alias is required by the mail protocol, RFC 822 # Set it to the address of a HUMAN who deals with this system's mail problems. Postmaster: root # Alias for mailer daemon; returned messages from our MAILER- DAEMON # should be routed to our local Postmaster. MAILER-DAEMON: postmaster # Aliases to handle mail to programs or files, eg news or vacation # decode: "|/usr/bin/uudecode" nobody: /dev/null # Sample aliases: # Alias for distribution list, members specified here: #staff:wnj,mosher,sam,ecc,mckusick,sklower,olson,rwh@ernie # Alias for distribution list, members specified elsewhere: #keyboards: :include:/usr/jfarrell/keyboards.list # Alias for a person, so they can receive mail by several names: #epa:eric ####################### # Local aliases below # ####################### |
softball@texas: earl@woofer tex@twister elmer@farmhouse jane@freeway hank@fretful jj@walker sally@dakota steve@hardway :wq (to quit vi and save the /etc/aliases file) # exit (to exit root) $ |
$ mail softball@texas Subject: Practice Today Let's meet at the diamond behind Building 4 after work tonight. Goodness knows we can use the practice for Saturday's game! Be there as early as you can. |
To: softball@texas Subject: Practice Today Let's meet at the diamond behind Building 4 after work tonight. Goodness knows we can use the practice for Saturday's game! Be there as early as you can. |
| .mailrc | /etc/aliases | |
|---|---|---|
| Must be root to modify? | no | yes |
| Send message to: | alias | alias@machinename |
| Recipients list seen by recipients? | yes | no |
| Names separated by commas? | no | yes |
| Names all on one line? | yes | no |
| Others can use the mail alias? | no | yes |
| Command | Function |
|---|---|
| ~!command | Escapes to a shell command |
| ~. | Simulates pressing Ctrl-D to mark end of file |
| ~? | Lists a summary of tilde commands |
| ~b username | Adds user name(s) to the blind carbon copies (Bcc:) list |
| ~c username | Adds user name(s) to the carbon copies (Cc:) list |
| ~d | Reads the contents of the dead.letter file into current letter. |
| ~f number | Forwards the specified letter. Valid only when sending a message while reading mail. |
| ~h | Prompts for header lines: Subject, To, Cc, and Bcc. |
| ~m number | Inserts text from the specified letter into the current letter. Valid only when sending a message while reading mail. |
| ~p | Prints the message being entered to the screen. |
| ~q | Simulates pressing Ctrl-C twice. If the body of the current message is not empty, the contents are saved to dead.letter. |
| ~r filename | Reads in the text from the specified file. |
| ~s string | Changes the subject line to string. |
| ~t name | Adds the specified name(s) to the To list. |
| ~w filename | Writes the current letter without the header into the specified file. |
| ~x | Exits mailx. Similar to ~q except message is not saved in the dead.letter file. |
$ man mailx |
$ lp filename |
$ lp /etc/passwd request id is pinecone-8 (1 file) $ |
$ lp -d printername filename |
$ lp -d acorn /etc/passwd request id is acorn-9 (1 file) $ |
$ lp -d thorn /etc/passwd
UX:lp: ERROR: Destination "thorn" is unknown to the
LP print service.
$
|
$ lp -m filename |
$ lp -w filename |
$ lp -nnumber filename |
$ lp -n4 /etc/passwd request id is pinecone-9 (1 file) $ |
$ lp -d printername -m -n6 filename |
| Option | Description |
|---|---|
| -d | Destination. Specifies a destination printer by name. |
| -m | Mail. Sends email to the requestor when the file has printed successfully. |
| -n | Number. Specifies the number of copies to be printed. |
| -t | Title. Specifies a title (printed only on the banner page) for a print request. |
| -o nobanner | Option. Suppresses printing of the banner page for an individual request. |
| -h | Header. Puts a header on each page of the print request. |
| -c | Copy. Copies the file before printing. |
| -w | Write. Writes a message to your terminal when the file has printed successfully. |
$ lpstat |
$ lpstat pinecone-10 fred 1261 Mar 12 17:34 on pine $ |
$ lpstat -s |
$ lpstat -s scheduler is running system default destination: pinecone system for pinecone: pine system for acorn: oak $ |
$ lpstat -t |
$ lpstat -t scheduler is running system default destination: pinecone system for acorn: oak pinecone accepting requests since Wed Jan 2 18:20:10 PST 1991 acorn accepting requests since Mon Mar 4 15:53:47 PST 1991 printer pinecone is idle. enabled since Wed Jan 2 18:20:22 PST 1991. available. printer acorn is idle. enabled since Mon Mar 4 15:53:44 PST 1991. available. $ |
$ lpstat -p |
$ lpstat -p printer pinecone is idle. enabled since Wed Jan 2 18:20:22 PST 1991. available. printer acorn is idle. enabled since Mon Mar 4 15:53:44 PST 1991. available. $ |
$ lpstat -p printername |
$ lpstat -p -l |
$ lpstat -p pinecone -l
printer pinecone is idle. enabled since Wed Jan 2 18:20:22 PST
1991. available.
Content types: PS
Printer types: PS
Description:
Users allowed:
(all)
Forms allowed:
(none)
Banner not required
Character sets:
(none)
Default pitch:
Default page size:
$
|
$ lpstat -p printername -l |
| Option | Description |
|---|---|
| -a | Accept. Show whether print destinations are accepting requests. |
| -c | Class. Show classes and their members. |
| -d | Destination. Show default destination. |
| -f | Forms. Show forms. |
| -o | Output. Show status of output. |
| -p [list][-D][-l} | Printer/Description/Long list. Show status of printers. |
| -r | Request. Request scheduler status. |
| -R | Show position of job in the queue |
| -s | Status. Show status summary |
| -S | Sets. Show character sets |
| -u [username] | User. Show requests by user |
| -v | Show devices |
$ cancel requestid |
$ cancel pinecone-3 pinecone4 request "pinecone-3" cancelled request "pinecone-4" cancelled $ |
$ cancel printername |
$ cancel pinecone request "pinecone-3" cancelled $ |
$ rlogin machinename |
$ rlogin lonesome Password: (type password) Last login: Mon Jan 6 09:37:55 from blue Sun Microsystems, Inc. SunOS 5.1 October 1992 (The following commands done on lonesome.) $ pwd /home/keithp $ logout Connection closed. $ |
$ rlogin fretful Password: No directory! Logging in with home=/ Last login: Fri Jan 3 10:21:59 from blue Sun Microsystems, Inc. SunOS 5.1 October 1992 (The following commands done on fretful.) $ pwd / $ logout Connection closed. $ |
$ rlogin lonesome -l earl Password: Last login: Wed Jan 8 07:12:25 from blue Sun Microsystems, Inc. SunOS 5.1 October 1992 (The following commands done on lonesome.) $ pwd /home/earl $ logout Connection closed. $ |
$ rlogin stranger stranger: unknown host $ |
$ rlogin dakota Password: Last login: Fri Jan 10 09:14:43 from blue Sun Microsystems, Inc. SunOS 5.1 October 1992 (The following command done on dakota.) $ ~. (You may not see the ~ on the screen.) Connection closed. $ |
$ rlogin lonesome Password: Last login: Tue Jan 7 08:12:49 from blue Sun Microsystems, Inc. SunOS 5.1 October 1992 (The following command done on lonesome.) $ rlogin dakota Password: Last login: Tue Jan 7 10:17:40 from lonesome Sun Microsystems, Inc. SunOS 5.1 October 1992 (The following command done on dakota.) $ ~~. (You may not see the ~~ on the screen.) Connection closed. $ |
$ rlogin lonesome Password: Last login: Tue Jan 7 08:12:49 from blue Sun Microsystems, Inc. SunOS 5.1 October 1992 (The following command done on lonesome.) ~^Z (You may not see the ^Z on the screen.) Stopped (The following command done on blue.) $ pwd /home/keithp $ % rlogin lonesome (The following command done on lonesome.) $ logout Connection closed. $ |
$ rcp dakota:/home/dakota/doc/letter /tmp $ |
$ rcp fretful:~hank/*.doc . $ |
$ rcp ~/usa/texas/austin fretful:~hank/cities $ |
$ rsh lonesome ls /home/lonesome/guitar collings gibson santacruz fender martin taylor $ |
$ rusers aspen susan blue keithp dakota sally farmhouse elmer freeway lindab johnj karenm fretful hank lonesome george twister tex $ |
$ rusers freeway freeway lindab johnj karenm $ |
$ rusers -l freeway lindab freeway:ttyd8 Feb 10 08:12 5:29 johnj freeway:console Feb 10 09:16 karenm freeway:ttyp0 Feb 10 11:56 36 $ |
$ echo $SHELL /bin/sh |
$ env HISTORY=100 HOME=/home/texas/keith HZ=100 LOGNAME=keith MAIL=/var/mail/keith MANSECTS=\1:1m:1c:1f:1s:1b:2:\3:3c:3i:3n:3m:3k:3g:3e:3x11:3xt:3 w:3b:9:4:5:7:8 PATH=/usr/bin SHELL=/bin/sh TERM=sun TZ=EST5EDT |
The default for this variable is automatically defined and set as specified in your .profile file (Bourne or Korn shell), or .cshrc file (C shell) as part of the login process.
PATH=.:/usr/bin:/home/bin |
set path=(. /usr/bin home/bin) |
example% source .cshrc |
$ . .profile |
alias rm 'rm -i' |
example% source .cshrc |
PS1=": "
PS1="'hostname': "
PS1="'hostname'{'id'}}: "
|
set prompt="% "
set prompt="'hostname'\!: "
set prompt="'hostname'{'id'}}: "
|
set noclobber |
set history=100 |
HISTORY=100 |
umask 022 |
| umask code | Permissions |
|---|---|
| 0 | rwx |
| 1 | rw- |
| 2 | r-x |
| 3 | r-- |
| 4 | -wx |
| 5 | -w- |
| 6 | --x |
| 7 | ---(none) |
$ application -fn fontstyle-pointsize & |
The point size is not specified; therefore the default (12-point) is used.
$ cmdtool -fn lucidasans-typewriter-bold & |
Note that when you change the size of the font, the size of the window changes as well.
$ shelltool -fn lucidasans-typewriter-bold-14 & |
$ xterm -fn terminal-bold-16 & |
$ textedit -fn helvetica-bold-14 & |
textedit -fn lucidasans-typewriter-14 |
textedit -fn lucidasans-typewriter-12 textedit -fn lucidasans-typewriter-14 textedit -fn lucidasans-typewriter-18 |
-b&h-lucida sans typewriter-medium-r-normal-sans-12-120-72-72-m- 0-iso8859-1 |
$ cd $ $OPENWINHOME/bin/convert_to_Xdefaults .defaults |
If you are working in the .profile file, use example a; if you are working in the .cshrc file, use example b
#OPENWINHOME=/usr/openwin |
#setenv OPENWINHOME /usr/openwin |
a. The openwin start-up script uses the default start-up file, $OPENWINHOME/lib/Xinitrc, unless there is an .xinitrc file in your home directory, which overrides the default.
b. It is important that you use the default $OPENWINHOME/lib/Xinitrc file that come with OpenWindows Version 3.3 software, or later versions. (However, if you want to retain any special changes you made to the .xinitrc file in the Version 2 software, you can do so by following the instructions in this section.)
$ cd $ ls -a .xinitrc |
$ rm .xinitrc |
a. Move .xinitrc to .xinitrc.save:
$ mv .xinitrc .xinitrc.save |
$ cp $OPENWINHOME/lib/Xinitrc $HOME/.xinitrc |
"Programs"MENU $OPENWINHOME/lib/openwin-menu-programs |
"Programs"INCLUDE openwin-menu-programs |
$ xmodmap -pk | grep Multi_key |
xmodmap -e 'keycode nn = NoSymbol' |
Once you have completed these steps you can use the keyboard so the keys are mapped for a left-handed person.
! ! lefty.data ! ! Data for xmodmap to set up the left and right function keys for left-handed use on ! Sun type-4 keyboard. To use this data type the following where <filename> is the ! name of the file (i.e. lefty-data). ! ! xmodmap <filename> ! ! The comments below correspond to the keycode assignments following ! immediately thereafter. ! ! swap L2 (Again) with R1 (Pause) ! swap L3 (Props) with R6 (KP_Multiply) ! swap L4 (Undo) with R4 (KP_Equal) ! swap L5 (Front) with R9 (KP_9) ! swap L6 (Copy) with R7 (KP_7) ! swap L7 (Open) with R12 (KP_6) ! swap L8 (Paste) with R10 (Left) ! swap L9 (Find) with R15 (KP_3) ! swap L10 (Cut) with R13 (KP_1) ! ! chng R3 (Break) to L1 (Stop) ! chng R2 (Print) to R10 (Left) ! chng R5 (KP_Divide) to R12 (Right) ! ! chng Linefeed to Control-R ! |
keycode 10 = R1 R1 Pause keycode 28 = L2 L2 SunXK_Again keycode 32 = R6 R6 KP_Multiply keycode 54 = L3 L3 SunXK_Props keycode 33 = R4 R4 KP_Equal keycode 52 = L4 L4 SunXK_Undo keycode 56 = R9 R9 KP_9 Prior keycode 77 = L5 L5 SunXK_Front keycode 58 = R7 R7 KP_7 Home keycode 75 = L6 L6 SunXK_Copy keycode 79 = Right R12 KP_6 keycode 100 = L7 L7 SunXK_Open keycode 80 = Left R10 KP_4 keycode 98 = L8 L8 SunXK_Paste keycode 102 = R15 R15 KP_3 Next keycode 121 = L9 L9 SunXK_Find keycode 104 = R13 R13 KP_1 End keycode 119 = L10 L10 SunXK_Cut keycode 30 = L1 L1 SunXK_Stop keycode 29 = Left R10 KP_4 keycode 53 = Right R12 KP_6 keycode 118 = Control_R add control = Control_R |
$ xmodmap nolefty.data |
| ! ! nolefty.data ! ! Data for xmodmap to reset the left and right function keys after being set for ! left-handed use on the Sun t ype-4 keyboard. To use this data type the following ! where <filename> is the name of this file. ! ! xmodmap <filename> ! !Reassign standard values to left function keys ! keycode 10 = L2 L2 SunXK_Again keycode 32 = L3 L3 SunXK_Props keycode 33 = L4 L4 SunXK_Undo keycode 56 = L5 L5 SunXK_Front |
keycode 58 = L6 L6 SunXK_Copy keycode 79 = L7 L7 SunXK_Open keycode 80 = L8 L8 SunXK_Paste keycode 102 = L9 L9 SunXK_Find keycode 104 = L10 L10 Sun XK_Cut ! ! Reassign standard values to right function keys. ! keycode 28 = R1 R1 Pause keycode 29 = R2 R2 Print keycode 30 = R3 R3 Scroll_Lock Break keycode 52 = R4 R4 KP_Equal keycode 53 = R5 R5 KP_Divide keycode 54 = R6 R6 KP_Multiply keycode 75 = R7 R7 KP_7 Home keycode 77 = R9 R9 KP_9 Prior keycode 98 = Left R10 KP_4 keycode 100 = Right R12 KP_6 keycode 119 = R13 R13 KP_1 End keycode 121 = R15 R15 KP_3 Next ! ! Reassign the Linefeed key as such and remove from control map. ! remove control = Control_R 5keycode 118 = Linefeed |
$ rlogin remotemachine
.
.
(The following commands are executed on the remote machine.)]
.
.
$ HOME=/home/mydirectory
$ DISPLAY=mymachine:0
$ LD_LIBRARY_PATH=/usr/openwin/lib
$ /usr/openwin/bin/cmdtool &
|
$ openwin -auth sun-des |
$ openwin -noauth |
connection-protocol auth-protocol auth-data |
anyhost:0 MIT-MAGIC-COOKIE-1 82744f2c4850b03fce7ae47176e75 localhost:0 MIT-MAGIC-COOKIE-1 82744f2c4850b03fce7ae47176e75 anyhost/unix:0 MIT-MAGIC-COOKIE-1 82744f2c4850b03fce7ae47176e75 |
unix.userid@NISdomainname |
anyhost:0 SUN-DES-1 "unix.15339@EBB.Eng.Sun.COM" localhost:0 SUN-DES-1 "unix.15339@EBB.Eng.Sun.COM" anyhost/unix:0 SUN-DES-1 "unix.15339@EBB.Eng.Sun.COM" |
For this example, hostname is anyhost and the file is xauth.info:
$ $OPENWINHOME/bin/xauth nextract - anyhost:0 > $HOME/xauth.info |
$ $OPENWINHOME/bin/xauth nmerge - < xauth.info |
For this example, to allow new user somebody to run on myhost:
$ xhost + somebody@ |
For this example, the new user's machine independent netname is unix.15339@EBB.Eng.Sun.COM. Note that this command should be typed on one line with no carriage return. After the pipe symbol, type a space followed by the remainder of the command.
$ echo 'add myhost:0 SUN-DES-1 "unix.15339@EBB.Eng.Sun.COM"' | $OPENWINHOME/bin/xauth |
Depending on which authorization protocol you use, follow the steps outlined in either "Allowing Access When Using MIT-MAGIC-COOKIE-1" or "Allowing Access When Using SUN-DES-1."
$ DISPLAY=remotehost:0 |
$ client_program& |
The OpenWindows server and client libraries use a dynamically loadable version of the DNI transport library libdni. In order for the server and client libraries to load libdni you must set the environment variable DNI_X_ENABLE to the directory where libdni.so is installed.
$ DNI_X_ENABLE=/opt/SUNWconn/dni/lib |
By default, the OpenWindows server supports "MIT-MAGIC-COOKIE" security. This security mechanism is user-specific, rather than host-specific -- you decide which users may connect to the server instead of which machines may connect to the server. In the default mode, the xhost command returns an empty list, and states only that security is turned on. You can turn off this security mode (and revert to the security mode of previous OpenWindows server versions) by using the
-noauth option with the openwin command.
$ openwin -noauth |
In order for X11 clients to connect to the OpenWindows server through the DNI software, the DECnet node addresses must be mapped to their DECnet node names. You do this by creating and initializing the NCP database. This must also be done on the DEC VAX system.
$ xhost decvax:: |
$ dnilogin decvax
.
.
.
$ define DECW$DISPLAY OW_machine::0
$ spawn/nowait run x11_client
|
$ cd $OPENWINHOME/share/src/fonts/misc $ dnicp *.bdf 'decvax::[vaxdir]' |
This results in files such as: olcursor.decw$font;1 olglyph10.decw$font;1...
$ font olcursor.bdf $ font olglyph10.bdf ... |
$ set def sys$sysroot:[sysfont.decw.user_cursor16] $ copy [vaxdir]olcursor.decw$font;1 * |
$OPENWINHOME/share/src/fonts/100dpi.
sys$sysroot:[sysfont.decw.user_75dpi] and sys$sysroot:[sysfont.decw.user_100dpi].
$ DISPLAY=decvax::0 $ xlsfonts | grep Sun (Cursor fonts) $ xlsfonts | grep Lucida |
$ DISPLAY=decvax::0 $ mailtool |
XView warning: Cannot load font '-b&h-lucida-medium-r-*-*-*- 80-*-*-*-*-*-*' (Font package)
You generally perform the following tasks to connect a modem to your system:
Unless you are a member of the special UNIX sysadmin group (GID 14), you must become root on your system in order to use the Administration Tool. Root is a system user with special permission to modify system files.
Use the su command to become root:
$ su Password: (enter the root password here) # |
Type:
# /usr/bin/admintool & # |

To start Serial Port Manager, click on the Serial Port Manager icon in the Administration Tool window. This opens a new window with controls and choices for managing modems and terminals.
Serial Port Manager online Help provides step-by-step instructions on how to use the Serial port Manager to install a modem. To see the Help instructions, choose Help... from the Serial Port Manager window.
You generally perform the following tasks to connect a printer to your system:
Unless you are a member of the special UNIX sysadmin group (GID 14), you must become root on your system in order to use the Administration Tool. Root is a system user with special permission to modify system files.
Use the su command to become root:
$ su Password: (enter the root password here) # |
Type:
# /usr/bin/admintool & # |
To start Printer Manager, click on the Printer Manager icon in the Administration Tool window. This opens a new window with controls and choices for managing printers.
Printer Manager online Help provides step-by-step instructions on how to use the Serial port Manager to install a modem. To see the Help instructions, choose Help... from the Printer Manager window.
| .. symbol | 35 |
| absolute permissions | 50 to 53 |
| .....See also permission | |
| account | 1 |
| aliases | 150 |
| append command | 78 |
| application | |
| .....networked | |
| ............with DNI (DECnet) | 183 |
| .....on a remote machine | 172 |
| apropos command | 25 |
| authorization protocols,See security |
| background jobs | 23 |
| bdiff command | 41 |
| blind copies | 108 |
| Bourne shell | |
| .....and initialization files | 145 to 146 |
| C shell | |
| .....and aliases | 150 |
| .....and command history | 20 to 21 |
| .....and initialization files | 145 to 146 |
| campus area network | 136 |
| cancel command | 132 |
| carbon copies | 108 |
| case sensitivity | |
| .....and commands | 18 |
| .....and thevi editor | 75, 87 |
| cat command | 31 |
| cd command | 28, 34 to 36 |
| CDPATH variable | 147 |
| changing directories | 34 to 36 |
| character string | 87 |
| chmod command | 46, 50 |
| .....andumask | 153 |
| command history | 20 to 21 |
| command mode | 71, 72 |
| command options | 21 |
| command prompt | 17 |
| .....defining | 148, 151 |
| Command Tool | |
| .....on a remote machine | 172 |
| commands | |
| .....and case sensitivity | 18 |
| .....and determining funtionality | 24 |
| .....and keyword lookup | 25 |
| .....and options | 21 |
| .....and piping output | 22 |
| .....and redirecting output | 21 to 22 |
| .....and syntax | 24 |
| .....entering long | 19 |
| .....entering multiple | 19 |
| .....executing on a remote machine | 142 to 143 |
| .....repeating previous | 20 to 21 |
| .....repeatingvi | 84 |
| .....running in the background | 23 |
| .....tilde | 120 |
| commenting out text | 119 |
| compose key, disable/enable | 165 |
| concatenate,Seecat command | 31 |
| convert_to_Xdefaults program | 160 |
| copying | |
| .....directories | 38 |
| .....files | 29 |
| .....from a remote machine | 141 |
| .....lines betweenvi files | 92 |
| .....mail to a file | 111 |
| .....mail to folders | 111 to 112 |
| .....to a remote machine | 142 |
| .....vi text | 82 |
| .....vi text withex commands | 85 |
| cp command | 29, 38 |
| cpu time | 66 |
| .cshrc file | 146 to 153 |
| date command | 18 |
| default | |
| .....command prompt | 17 |
| .....directory | 28 |
| .....file permissions | 153 to 154 |
| .....printer | 124, 148 |
| .....shell | 145 |
| default ring on menus | xvi |
| .defaults file | 159 |
| deleting | |
| .....directories | 38 |
| .....files | 31 |
| 103 to 104 | |
| ......vi text | 81 |
| ......vi text withex commands | 86 |
| df command | 68 |
| diff command | 39 to 40 |
| diff3 command | 41 |
| directory | |
| ......and path name | 32 |
| ......changing | 34 to 36 |
| ......changing permissions | 47 to 49 |
| ......checking usage | 68 |
| ......copying | 37 |
| ......creating a new | 36 |
| ......dead.letter | 107 |
| ......definition of | 28 |
| ......displaying current | 34 |
| ......hierarchy | 33 |
| ......home | 34 |
| ......moving | 37 |
| ......removing | 38 |
| ......renaming | 37 |
| ......root | 33 |
| ......security | 44 to 53 |
| ......setting default permissions | 153 to 154 |
| ......setting up a folder | 111 |
| disk usage | 68 |
| DISPLAY environment variable | 181 |
| displaying | |
| ......contents of a remote directory | 142 |
| ......directory usage | 68 |
| ......disk usage | 68 |
| ......file contents | 31 |
| ......file permissions | 45 |
| ......mailbox list | 102 |
| ......printer status | 128 to 130 |
| ......remote users | 143 to 144 |
| ......users on your file server | 105 |
| ......your remote login location | 140 |
| displays, starting OpenWindows withmore than one monitor | 13 |
| ditroff program | 69 |
| dot files | 46 |
| .......xinitrc | 161 |
| du command | 68 |
| echo | 2, 64 |
| electronic mail,See mail | |
| email,See mail | |
| entry mode | 71 |
| env command | 147 |
| environment variables | |
| .....in initialization files | 147 to 150 |
| ex commands | 72, 84 to 87 |
| executable files | 27 |
| execute permission | 44 |
| file | |
| ......cshrc | 146 |
| ......login | 146 |
| ......mailrc | 115 |
| ......profile | 146 |
| ...../etc/aliases | 117 |
| ...../etc/hosts.equiv | 141, 143 |
| ...../etc/passwd | 141, 143, 145 |
| ...../etc/profile | 146 |
| .....and thediff command | 39 to 41 |
| .....changing permissions | 47 to 49 |
| .....checking type | 32 |
| .....copying | 29 |
| .....creating new | 29 |
| .....definition of | 27 to 28 |
| .....displaying contents | 31 |
| .....initialization | 145 to 146 |
| .....inserting in a letter | 109 |
| .....listing invisible | 46 |
| .....permissions | 44 |
| .....printing | 124 |
| .....saving mail in | 110 to 111 |
| .....searching for | 41 to 44 |
| .....security | 44 to 53 |
| .....setting default permissions | 153 to 154 |
| file command | 32 |
| find command | 41 to 44 |
| finger command | 106 |
| folders | 111 to 114 |
| fonts | |
| ......changing default | 155 |
| ......for networked applications | 186 |
| ......listing | 158 |
| grep command | |
| ......and metacharacters | 60 to 61 |
| ......and regular expressions | 58 to 60 |
| ......and strings | 57 |
| ......as a filter | 56 |
| ......syntax for | 55 to 56 |
| hidden files | |
| .......xinitrc | 161 |
| history command | |
| ......setting | 148 |
| history command | 20 |
| HISTORY variable | 148 |
| home directory | 28, 34 |
| ......andrlogin command | 137 |
| ......and the tilde shortcut | 34 |
| ......defining | 148 |
| HOME variable | 148 |
| initialization files | 145 to 146 |
| insert command | 78 |
| internetwork | 136 |
| keyboard | |
| ......remapping for left-handed use | 166 |
| ......undoing left-handed mapping | 168 |
| kill command | 67 |
| Korn shell | |
| ......and initialization files | 145 to 146 |
| LANG variable | 148 |
| left-handed use | |
| .....of keyboard | 166 |
| .....of mouse | 165 |
| line printer subsystem,See printing | |
| local area network | 136 |
| local language | 148 |
| logging in to the system | 1 |
| .....as someone else | 138 |
| .....remotely | 136 to 140 |
| .....with windows | 11 |
| logging out of the system | 3 |
| .login file | 146 |
| login name | 1 |
| .....defining | 148 |
| login shell | 2 to 3, 145 |
| logname command | 19 |
| LOGNAME variable | 148 |
| lp command | 123 |
| .....table of options | 127 |
| LP print service,See printing | |
| LPDEST variable | 148 |
| lpstat command | 127 to 132 |
| .....syntax for | 131 |
| .....table of options | 132 |
| ls command | 29 |
| .....and listing invisible files | 46 |
| .....and long format option | 45 to 46 |
| .....aliases | |
| ............comparison table | 120 |
| ............definition of | 115 |
| ............in .mailrc file | 115 to 117 |
| ............in /etc/aliases | 117 to 120 |
| .....and the mailbox | 98 |
| .....and undeliverable letters | 107 |
| .....blind copies | 108 |
| .....canceling unsent letters | 107 |
| .....carbon copies | 108 |
| ......checking version | 100 |
| ......copy command | 111 |
| ......deleting letters | 103 to 104 |
| ......determining a user's address | 106 |
| ......displaying list of letters | 102 |
| ......folders | 111 to 114 |
| ......getting help | 121 |
| ......inserting a file | 109 |
| ......inserting another letter | 109 |
| ......mbox file | 98 |
| ......printing | 105 |
| ......quitting | 101 |
| ......reading | 100, 102 to 103 |
| ......replying to | 109 to 110 |
| ......saving | 110 to 113 |
| ......sending | 105 to 107 |
| ............multiple recipients | 106 |
| ......starting | 98 |
| ......tilde commands | 120 |
| ......using vi with | 114 |
| mail alias | 115 |
| ......See alsomail | |
| mail folder | 111 |
| ......See alsofolder | |
| MAIL variable | 148 |
| mailbox | 98 |
| ......See alsomail | |
| ......setting the path for | 148 |
| .mailrc file | 115 |
| mailx program | |
| ......quitting | 101 |
| mailx program | |
| ......See alsomail | |
| man command | 2, 24 |
| man pages,See manual reference pages | |
| MANSECTS variable | 148 |
| manual reference pages | 2, 24, 148 |
| mbox file | 98 |
| ......See alsomail | |
| metacharacters | 58 |
| MIT-MAGIC-COOKIE security | 184 |
| mkdir command | |
| ......and mail | 111 |
| mkdir command | 36 |
| modem | |
| .....(defined) | 189 |
| monitors | |
| .....side by side display ofOpenWindows | 14 |
| .....top/bottom display ofOpenWindows | 15 |
| more command | 31 |
| mouse | |
| .....remapping buttons | 165 |
| moving | |
| .....directories | 37 |
| .....files | 30 |
| .....vi text | 83 |
| .....vi text withex commands | 86 |
| multiple screens, start-up | 13 |
| mv command | 30 |
| named buffers | 84 |
| network | |
| .....definition of | 135 |
| .....protocol | 136 |
| network, larger | xiii |
| networked applications | |
| .....with DECnet | 183 |
| -noauth option toopenwin | 12, 176 |
| nohup command | 23 |
| nroff program | 69 |
| on-line help | 24 |
| open line command | 79 |
| openwin | |
| .....-dev option | 13, 14, 15 |
| .....deviceoptions option | 14 |
| .....-noauth option | 12, 174, 176 |
| OpenWindows | |
| .....and initialization files | 146 |
| .....and logging in and out | 11 |
| .....and mail | 97 |
| ......on dual monitors | 13 |
| ......security with MIT-MAGIC-COOKIE | 184 |
| options | 21 |
| parallel port | 192 |
| parameters | |
| ......setting forvi | 92 |
| parent directory | 35 |
| passwd command | 65 |
| password | 1 |
| ......aging | 65 |
| ......changing | 64 |
| ......choosing | 63 |
| Passwords, Processes and DiskStorage | 63 |
| path name | 32 |
| ......relative | 36 |
| PATH variable | 148, 149 to 150 |
| permission | |
| ......and the * wildcard character | 49 |
| ......categories for | 44 |
| ......changing | 47 to 49 |
| ......setting absolute | 50 to 53 |
| ......setting default | 153 to 154 |
| ......types of | 44 |
| PIDs | 66 to 67 |
| pipe symbol | 22 |
| piping | |
| ......command output | 22 |
| ......du output throughsort | 68 |
| ......mail to the lp command | 105 |
| ......output throughgrep | 56 |
| ......ps output throughgrep | 67 |
| print queue | 130 |
| printers | |
| ......port | |
| ............parallel versus serial | 192 |
| printing | |
| ......See alsolp command | |
| ......and determining printer type | 130 |
| ......and requesting a completion |
| ...................notice | 125 |
| .....canceling requests | 132 to 133 |
| .....checking printer availability | 128 |
| .....checking status of | 127 to 130 |
| 105 | |
| .....multiple copies | 126 |
| .....request id number | 133 |
| .....to a specific printer | 124 to 125 |
| .....to the default printer | 124 |
| .....vi files | 75 |
| process identification numbers,SeePIDs | |
| processes | |
| .....killing |