Test your change by copying some text with the left mouse button and pasting with the right mouse button.
If X Is Not Installed
You can achieve the same results on a system without X installed. Youíll have to add the lines to /etc/rc.conf manually, though.
The example Iíve given you is for a PS/2 mouse. If youíre using another type of mouse, read the ďConfiguring Mouse DaemonĒ section ofman moused. It gives explicit details on figuring out what type of mouse you have and what type of protocol it understands. It even includes a section on configuring a laptop system for multiple mice: one for when on the road and one for when the laptop is attached to the docking station.
For example, if youíre using a USB mouse, the only difference is that the port is/dev/usm0instead of /dev/psm0.
A serial mouse physically plugged intoCOM1would be/dev/cuaa0. You may have to experiment with the type, asautodoesnít work with all serial mice. Again, the manpage is your best reference.
Brighten your day with some terminal eye candy.
As the saying goes, all work and no play makes Jack a dull boy. But whatís a poor Jack or Jill to do if your days include spending inordinate amounts of time in front of a computer screen? Well, you could head over to http://www.thinkgeek.net/ to stock up on cube goodies and caffeine. Or, you could take advantage of some of the entertainments built into your operating system.
A Fortune a Day
Letís start by configuring some terminal eye candy. Does your system quote you a cheery, witty, or downright strange bit of wisdom every time you log into your terminal? If so, youíre receiving a fortune:
If youíre not receiving a fortune, as the superuser type/stand/sysinstall. ChooseConfigure, thenDistributions, and selectgameswith your spacebar. Press Tab to selectOK, then exit out ofsysinstall when it is finished.
Then, look for the line that runs /usr/games/fortune in your ~/.cshrc file:
% grep fortune ~/.cshrc
If for some reason it isnít there, add it:
% echo '/usr/games/fortune' >> ~/.cshrc
Donít forget to use both greater-than signs; you donít want to erase the contents of your .cshrc file! To test your change, use the source shell command, which re-executes the contents of the file. This can come in handy if youíve updated an alias and want to take advantage of it immediately:
% source ~/.cshrc
If youíd also like to receive a fortune when you log out of your terminal, add this line to the end of your .logout file. If you donít have one, and there isnít one by default, you can create it and add this line in one step:
% echo '/usr/games/fortune' > ~/.logout
Note that this time I used only one greater-than sign, as I was creating the file from scratch. If the file already exists, use two greater-than signs to append your new line to the end of the existing file.
Believe it or not,fortunecomes with switches, some of which are more amusing than others. Iíll leave it to you to peruseman fortune.
Iím a trivia buff, so I love using thecalendarcommand. Contrary to logic, typingcalendarwonít show me this monthís calendar (thatís the job ofcal). However, I will get an instant dose of trivia, related to the current date:
Cool. I had forgotten it was the anniversary of the Hoosac tunnel, an event that put my hometown on the map.
Itís an easy matter to automate the output provided bycalendar. If you want to see your trivia when you log in or log out, simply add a line to your .cshrc or .logout file. Because the line you add is really just a path to the program, use the output of thewhichcommand to add that line for you:
% echo `which calendar` >> .cshrc
Again, donít forget to append with >>, or have noclobber set in your .cshrc file [Hack #2].
Of course, there are several other date and time related mini-hacks at your disposal. Here are two you might enjoy.
The current time.Ever wonder what time it is while youíre working on the terminal? Sure, you could usedate, but the output is so small and boring. Try this the next time you want to know what time it is:
Whoa, you can see that one from across the room. Thatís not a bad idea if you want to send your cubicle buddy a hint.
Iíve been known to add /usr/games/grdc to my ~/.logout. When I log out, my terminal displays the time until I press Ctrl-c and log in again. Thatís sort of a built-in password protected screen saver for the terminal.
The phase of the moon.Have you ever readman pom? It has one of the more useful descriptions Iíve seen:
Sounds like Dilbert had a hand in that one. If I add the line /usr/games/pom to my ~/.cshrc, Iíll learn a bit about astronomy when I log in:
Thereís a one-liner to promote water cooler conversation.
Adding Some Color to Your Terminal
Have you ever tried this command?
% vidcontrol show
Gee, that reminds me of my old DOS days when I discovered ansi.sys. Yes, your terminal is capable of color and youíre looking at your possible color schemes! (It likely looks much more exciting on your terminal, since itís not in color in this book.)
If you see some colors that appeal to you, add them to your terminal. For example, this command will set the foreground color to yellow and the background color as blue:
% vidcontrol yellow blue
Note that you can use only colors 1 through 7 as background colors; youíll receive a syntax error if you try to use colors 8Ė15 in your background. Try out the various combinations until you find one that appeals to your sense of taste. You can even add a border if you like:
% vidcontrol -b red
These settings affect only your own terminal. If you want, add the desired vidcontrol lines to your ~/.cshrc file so your settings are available when you log into your terminal.
If you have problems finding your cursor, try:
% vidcontrol -c blink
% vidcontrol -c destructive
Changing the cursor affects all virtual terminals on the system. If other users complain about your improvement, this will bring things back to normal:
% vidcontrol -c normal
blog comments powered by Disqus