About This Book | xv |
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 | 9 |
| ......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 | 13 |
| ......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) | 39 |
| ......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) | 47 |
| ......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 | 75 |
| ...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 | 87 |
| ...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 | 91 |
| ...Editing Multiple Files | 91 |
| ......Editing a Series of Files | 92 |
| ......Copying Lines Between Files | 92 |
| ...Setting vi Parameters | 93 |
| ...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 | 110 |
| ...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 | 121 |
| ...Getting Help: Other mailx Commands | 122 |
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 | 135 |
| ...Logging In Remotely (rlogin) | 136 |
| ......rlogin without a Home Directory | 137 |
| ......rlogin as Someone Else | 137 |
| ......rlogin to an Unknown Machine | 138 |
| ......Aborting an rlogin Connection | 138 |
| ......Suspending an rlogin Connection | 139 |
| ......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 | 146 |
| ...Environment Variables | 147 |
| ......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 |
| ...Calibrating Your Color Monitor | 159 |
| ......Monitor Calibration Concepts | 159 |
| ......Adjusting Your Viewing Environment | 161 |
| ......Connecting the Calibrator Puck | 165 |
| ......Running Calibrator Tool | 165 |
| ......Error Messages | 171 |
A. Migrating to OpenWindows Version 3.3, or Later Versions . | 175 |
| ...SPARC Migrating from the SunView Environment | 175 |
| ......SPARC The .defaults and .Xdefaults Files | 175 |
| ...Migrating from a pre-Version 3.3 OpenWindows Environment | 176 |
| ......The OPENWINHOME Environment Variable | 176 |
| ......The .xinitrc File | 177 |
| ......Using the Correct Start-up File | 178 |
| ......Workspace Properties | 179 |
| ......Customizing the Workspace Menu | 179 |
B. Making the Transition to Solaris 2.5 | 181 |
| ...SPARC Making the Transition from SunOS 4.x | 182 |
| ......SPARC Changes Affecting SunOS 4.x Users | 182 |
| ......SPARC Changes Affecting SunOS 4.x System Administrators | |
| ........183 | |
| ......SPARC Compatibility with SunOS 4.x Releases for SPARC | |
| ........Systems | 184 |
| ...x86 Making the Transition from Solaris 2.1 for x86 | 186 |
| ......x86 Changes affecting Users | 186 |
| ......x86 Changes affecting System Administrators | 186 |
| ......x86 Solaris 2.5 System Administration Tools | 187 |
C. Modifying the Keyboard | 189 |
| ...Disabling/Enabling the Compose Key | 189 |
| ...SPARC Left-Handed Key Remapping | 190 |
| ......SPARC Using the Remapping Script | 190 |
| ......SPARC Undoing the Keyboard Remapping | 192 |
| ...x86 Function Key and Control Key Remapping | 194 |
| ......x86 Using the Remapping Script | 194 |
D. Running Networked Applications | 199 |
| ...Using rlogin to Run a Networked Application | 200 |
| ...More About Security | 201 |
| ......Who Should Read this Section | 202 |
| ......Access Control Mechanisms | 202 |
| ......Authorization Protocols | 203 |
| ......Manipulating Access to the Server | 205 |
| ......Running Clients Remotely, or Locally as Another User | 208 |
E. SPARC -- DECnet Internetworking (DNI) | 211 |
| ...Setting Up DECnet Internetworking | 212 |
| ...Displaying a Remote Client on an OpenWindows Machine | 213 |
| ...Displaying a Remote Client on a VAX | 213 |
| F. Managing Your System | 217 |
| ...Starting Admintool | 218 |
| ......Adding Yourself to the sysadmin Group | 219 |
| ...Using Admintool to Perform Common Tasks | 220 |
| ......About Managing Hosts | 220 |
| ......About Managing Printers | 221 |
| ......About Managing Serial Ports | 222 |
G. Using PCMCIA Cards | 223 |
| ...Introduction | 223 |
| ......Support Requirements | 224 |
| ......Other Information Sources | 224 |
| ...Using a PCMCIA Memory Card | 225 |
| ......File Copying Methods | 225 |
| ......Write-Protect Mode | 225 |
| ......PCMCIA Memory Cards and Power Management's | |
| ........Resume/Suspend Feature | 226 |
| ...Copying Files with the tar Command | 227 |
| ......Copying Files | 230 |
| ...Copying Files with Volume Management Enabled | 232 |
| ......Copying Files | 237 |
| ...Copying Files with Volume Management Disabled | 239 |
| ......Copying Files | 242 |
| ...Using a PCMCIA Serial/ModemCard | 243 |
| ......PCMCIA Serial/Modem Card Device Names | 243 |
| ......PCMCIA Serial/Modem Cards and Power Management's | |
| ........Resume/Suspend Feature | 243 |
Index | 245 |
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.
a. In the Bourne or Korn shell, type:
$ unset OPENWINHOME |
example% unsetenv OPENWINHOME |
$ cd $ ls -a .xinitrc |
$ rm .xinitrc |
a. Move .xinitrc to .xinitrc.save:
$ mv .xinitrc .xinitrc.save |
$ cp /usr/openwin/lib/Xinitrc $HOME/.xinitrc |
For information on how to mount the OpenWindows software from a server, see OpenWindows Desktop 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 |
| Command | Meaning |
|---|---|
| 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 |
| 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 |
| cc | Change line |
| Command | Meaning |
|---|---|
| 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) |
| 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 |
| Command | Meaning |
|---|---|
| :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 |
| 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 |



The minimum setting of the Picture control causes the picture content to disappear entirely. If your monitor's picture cannot be made to vanish, then you will have to arrange to display a picture that is substantially black (for example, by activating a screen-saver).
Turn the Black Level control to the balance point or threshold. The threshold is low enough that a black area of the picture emits no light, but high enough that setting the control any higher would cause the area to become a dark gray.
Once the black level is set correctly, the Picture control can be adjusted so that a white signal produces the appropriate level of brightness. There is no proper setting of this control; it depends entirely on your preference.
Avoid setting your monitor too bright. Excessive brightness can increase your sensitivity to flicker, reduce the contrast ratio of the picture, and defocus the electron beam of the CRT, resulting in poor sharpness.

A list of monitor profiles available in your environment is displayed as shown in Figure 10-1.
If you do not know the type of monitor you have, you can get general information about a monitor by clicking on the More... button. The information is displayed in a separate window. The following information is an example of the type of information given when you select a Sony 16" profile and press the More... button:
| Sun Part Number | Description | Manufacturer | Profile Description |
|---|---|---|---|
| 365-1130-01 | P3 16" Color | Sony | Sony 13/16/19" Monitor |
| 365-1112-01 | P3 19" Color | Sony | Sony 13/16/19" Monitor |
| 365-1159-01 | P3 16" Color | Sony | Sony 13/16/19" Monitor |
| 365-1160-01 | P3 19" Color | Sony | Sony 13/16/19" Monitor |
| 365-1147-01 | P3 16" Color SH (Southern Hemisphere) | Sony | Sony 13/16/19" Monitor |
| 365-1148-01 | P3 19" Color SH | Sony | Sony 13/16/19" Monitor |
| 365-1288-01 | P3 19" Color Logoless | Sony | Sony 13/16/19" Monitor |
| 365-1289-01 | P3 16" Color Logoless | Sony | Sony 13, 16 and 19" Monitor |
| 365-1153-01 | Skol 19" P3 MPR2 | Sony | N/A |
| 365-1151-02 | Rosebud 17" Mid Range (MR) Color | Sony | N/A |
| 365-1166-02 | Rosebud 17" MR Color Logoless | Sony | N/A |
| 365-1164-02 | Rosebud 17" MR SH Color | Sony | N/A |
| 365-1165-02 | Rosebud 17" MPR2 MR | Sony | N/A |
| Sun Part Number | Description | Manufacturer | Profile Description |
|---|---|---|---|
| 365-1068-01 | 21" Color | Toshiba | N/A |
| 365-1286-01 | Tulip 15" FS Color | Nokia | Sony 15" Monitor |
| 365-1167-01 | Corona P4 20" Color | Sony | Sony 20" Monitor |
| 365-1313-01 | Corona P4 20" Color Logoless | Sony | Sony 20" Monitor |
| 365-1317-01 | Corona P4 20" Color SH | Sony | Sony 20" Monitor |
| 365-1316-01 | Jasmine 17" N1 Color | Sony | Sony 17" Monitor |
A separate window is displayed asking you to choose a device as shown in Figure 10-2.

If you have a puck that correlates to a device in the list, choose that device.
If you do not have a puck, choose XSolarisVisualGamma. The calibrated profile is based on the gamma values stored in the LUT for your specific frame buffer.
If you have a puck, a separate window will be displayed as shown in Figure 10-3. It is the Calibrator Profile window with a medium gray circle. This circle will be in the middle of your screen.

After a few seconds, the circle becomes cyan and calibration begins.
Depending on the type of frame buffer you have, the measurement cycle (for red, green and blue) may repeat a second time. If your frame buffer supports both PseudoColor and TrueColor visuals, two sets of measurements will be taken. If the frame buffer implements only one of these types, only one set of measurements is taken.
If a pop-up dialog appears in the middle of the color circle, you must restart the calibration. The calibration data is now contaminated and will produce inaccurate measurement data. See "To Interrupt Calibration" for information on halting calibration.
When the tool has completed reading measurements, the monitor's profiles are updated and a message is displayed informing you that calibration is completed.
Once calibration is completed, remove the puck from the screen. Store it in a position that prevents dirt and dust from gathering on its glass faceplate.
$ cd $ /usr/openwin/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, /usr/openwin/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 /usr/openwin/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 /usr/openwin/lib/Xinitrc $HOME/.xinitrc |
"Programs"MENU /usr/openwin/lib/openwin-menu-programs |
"Programs"INCLUDE openwin-menu-programs |
· lp(1)replaces lpr.
· lpstat(1)replaces lpq.
· cancel(1)replaces lprm.
· troff(1)requires a printer name.
· mailtool, the DeskSet environment Multimedia Mail Tool
· mail(1), a command-line utility
· mailx(1), a command-line utility
· /etc/vfstab replaces /etc/fstab.
· /var/mail replaces /var/spool/mail.
· /platform/*/kernel/unix replaces /vmunix.

· The kernel, called unix, and its related modules are stored in the /kernel directory.
· The /opt directory is a new directory. It is created during installation for storing or mounting optional software applications.
· The /devices directory is a hierarchy of device files, with symbolic links into the /dev directory for compatibility with the SunOS 4.x device naming conventions.
· The /usr directory has been restructured.
· The terminfo database replaces /etc/termcap.
· The /etc/vfstab file replaces /etc/fstab.
· The /var/mail directory replaces /var/spool/mail.
· The /etc/lp directory replaces /etc/printcap.
· The Remote File Sharing service (RFS) optional software package has been discontinued since Solaris 2.2.
· The init(1M)command uses different scripts for each run level.
· The shutdown command does not support any of the options available in SunOS 4.1 systems.
· The fastboot(1B)and fasthalt(1b) commands are only available using the SunOS/BSD Source Compatibility Package.
· /etc/lp/fd/ppostio.fd · /etc/lp/fd/ppostior.fd · /usr/share/lib/terminfo/P/PPS · /usr/share/lib/terminfo/P/PPSR
· Kernel management for heterogeneous systems
· Adding new devices to running systems
· Adding device drivers without rebuilding the kernel
$ xmodmap -pk | grep Multi_key |
xmodmap -e 'keycode nn = NoSymbol' |
$ xmodmap lefty.data |
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 SunAgain keycode 32 = R6 R6 KP_Multiply keycode 54 = L3 L3 SunProps keycode 33 = R4 R4 KP_Equal keycode 52 = L4 L4 SunUndo keycode 56 = R9 R9 KP_9 Prior keycode 77 = L5 L5 SunFront keycode 58 = R7 R7 KP_7 Home |
keycode 75 = L6 L6 SunCopy keycode 79 = Right R12 KP_6 keycode 100 = L7 L7 SunOpen keycode 80 = Left R10 KP_4 keycode 98 = L8 L8 SunPaste keycode 102 = R15 R15 KP_3 Next keycode 121 = L9 L9 SunFind keycode 104 = R13 R13 KP_1 End keycode 119 = L10 L10 SunCut keycode 30 = L1 L1 SunStop 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 SunAgain keycode 32 = L3 L3 SunProps keycode 33 = L4 L4 SunUndo keycode 56 = L5 L5 SunFront keycode 58 = L6 L6 SunCopy keycode 79 = L7 L7 SunOpen keycode 80 = L8 L8 SunPaste keycode 102 = L9 L9 SunFind keycode 104 = L10 L10 Sun 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 |
$ xmodmap fkeys |
Once you have completed these steps you can use the function keys as Help, Cut, Copy, Paste, Undo, and Front keys.
keysym F2 = L10 keysym F3 = L6 keysym F4 = L8 keysym F5 = L9 |
keysym F8 = L4 keysym F9 = L5 remove control = Control_R keycode 0x47 = Meta_R add mod1 = Meta_R |
$ xmodmap normal |
keycode 8 = grave asciitilde keycode 9 = 1 exclam keycode 10 = 2 at keycode 11 = 3 numbersign keycode 12 = 4 dollar keycode 13 = 5 percent keycode 14 = 6 asciicircum |
keycode 15 = 7 ampersand keycode 16 = 8 asterisk keycode 17 = 9 parenleft keycode 18 = 0 parenright keycode 19 = minus underscore keycode 20 = equal plus keycode 21 = keycode 22 = BackSpace keycode 23 = Tab keycode 24 = Q keycode 25 = W keycode 26 = E keycode 27 = R keycode 28 = T keycode 29 = Y keycode 30 = U keycode 31 = I keycode 32 = O keycode 33 = P keycode 34 = bracketleft braceleft keycode 35 = bracketright braceright keycode 36 = backslash bar brokenbar keycode 37 = Caps_Lock keycode 38 = A keycode 39 = S keycode 40 = D keycode 41 = F keycode 42 = G keycode 43 = H keycode 44 = J keycode 45 = K keycode 46 = L keycode 47 = semicolon colon keycode 48 = apostrophe quotedbl keycode 49 = keycode 50 = Return keycode 51 = Shift_L keycode 52 = keycode 53 = Z keycode 54 = X keycode 55 = C keycode 56 = V |
keycode 57 = B keycode 58 = N keycode 59 = M keycode 60 = comma less keycode 61 = period greater keycode 62 = slash question keycode 63 = keycode 64 = Shift_R keycode 65 = Control_L keycode 66 = keycode 67 = Alt_L keycode 68 = space keycode 69 = Alt_R keycode 70 = keycode 71 = Control_R keycode 72 = keycode 73 = keycode 74 = keycode 75 = keycode 76 = keycode 77 = keycode 78 = keycode 79 = keycode 80 = keycode 81 = keycode 82 = Insert keycode 83 = Delete keycode 84 = keycode 85 = keycode 86 = Left keycode 87 = Home keycode 88 = End keycode 89 = keycode 90 = Up keycode 91 = Down keycode 92 = Prior keycode 93 = Next keycode 94 = keycode 95 = keycode 96 = Right keycode 97 = Num_Lock keycode 98 = Home KP_7 KP_7 keycode 99 = Left KP_4 KP_4 |
keycode 100 = End KP_1 KP_1 keycode 101 = keycode 102 = KP_Divide keycode 103 = Up KP_8 KP_8 keycode 104 = KP_5 KP_5 KP_5 keycode 105 = Down KP_2 KP_2 keycode 106 = KP_Insert KP_0 KP_0 keycode 107 = KP_Multiply keycode 108 = Prior KP_9 KP_9 keycode 109 = Right KP_6 KP_6 keycode 110 = Next KP_3 KP_3 keycode 111 = Delete KP_Decimal KP_Decimal keycode 112 = KP_Subtract keycode 113 = KP_Add keycode 114 = keycode 115 = KP_Enter keycode 116 = keycode 117 = Escape keycode 118 = keycode 119 = F1 keycode 120 = F2 keycode 121 = F3 keycode 122 = F4 keycode 123 = F5 keycode 124 = F6 keycode 125 = F7 keycode 126 = F8 keycode 127 = F9 keycode 128 = F10 keycode 129 = SunF36 keycode 130 = SunF37 keycode 131 = Print SunSys_Req keycode 132 = Scroll_Lock keycode 133 = Pause Break keycode 134 = keycode 135 = Multi_key keycode 136 = Mode_switch |
$ 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 &
|
Xlib: connection to hostname refused by server Xlib: Client is not authorized to connect to server |
AUDIT: <Date Time Year>: X: client 6 rejected from IP 129.144.152.193 port 3485
Auth name: MIT-MAGIC-COOKIE-1
|
example% openwin -auth sun-des |
example% 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:
myhost% /usr/openwin/bin/xauth nextract - anyhost:0 > $HOME/xauth.info |
userhost% /usr/openwin/bin/xauth nmerge - < xauth.info |
For this example, to allow new user somebody to run on myhost:
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.
userhost% 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."
myhost% setenv DISPLAY remotehost:0 |
myhost% 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 /usr/openwin/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 * |
/usr/openwin/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)
Unless you are a member of the special UNIX sysadmin group (GID 14), you must become root on your system to use Admintool. Root is a system user with special permi