Site Administration Page 2 - Personalizing the User Environment in BSD |
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. See Also
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: login: dru 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. Pursuing Trivia 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: % calendar 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]. Sundry Amusements 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: % grdc 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: % pom 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 or: % 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 See Also
blog comments powered by Disqus |
|
|
|
|
|
|
|