Fix for segfault in top_name stuff.
[monky] / doc / conky-howto.xml
1 <?xml version='1.0' encoding="UTF-8"?>
2 <!DOCTYPE guide SYSTEM "http://www.gentoo.org/dtd/guide.dtd">
3
4 <guide link="/doc/en/conky-howto.xml">
5 <title>Gentoo Linux Conky Howto</title>
6
7 <author title="Author">
8   <mail link="admin@sdesign.us">Bill Woodford</mail>
9 </author>
10
11 <author title="Editor">
12   <mail link="brenden@diddyinc.com">Brenden Matthews</mail>
13 </author>
14
15 <abstract>
16 This document describes how to install and configure the system monitor known
17 as Conky.
18 </abstract>
19
20 <!-- The content of this document is licensed under the CC-BY-SA license -->
21 <!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
22 <license/>
23
24 <version>1.0</version>
25 <date>2006-02-22</date>
26
27 <chapter>
28 <title>Background</title>
29 <section>
30 <title>Introduction to Conky</title>
31 <body>
32
33 <p>
34 So you have a Gentoo machine, and have already learned 30 different commands to monitor different aspects of what your computer is doing at the current moment.  What do you do from here?  Isn't there an easier way to monitor system performance and see what its doing, as well as the resources its using to perform all those tasks?  This is what a system monitor, such as Conky, provides.
35 </p>
36
37 </body>
38 </section>
39 <section>
40 <title>What it does</title>
41 <body>
42
43 <p>
44 Unlike other system monitors such as top, Conky can run as a window in an X session, or by drawing to the root window (there is also an option to have Conky display information to stdout, but we won't discuss that here).  It displays the information it has gathered through the use of both text, progress bars, and graphs.  Also unlike top, the way it is formatted is completely user-configurable.  In addition to monitoring the system itself, Conky can also give you information about several music players (such as XMMS, BMPx, Music Player Daemon, and Audacious Media Player), tell you how many new messages are in your mail spool, and plenty more.  If the functionality you require isn't in Conky yet, it is a simple matter of writing a script to get the information you would like - some examples of this, which have already been done are RSS feeds, POP3 e-mail message count, local weather, boinc status, and even the status of portage.
45 </p>
46
47 </body>
48 </section>
49 </chapter>
50 <chapter>
51 <title>Installing Conky</title>
52 <section>
53 <title>Base install</title>
54 <body>
55
56 <p>
57 Gentoo provides an ebuild to quickly and easily install Conky.  Pay particular attention to the the USE flags.  You'll most likely want X11 support (<c>X</c>), and make sure you select the USE flags for any music players (other than MPD) which you want.  XMMS (<c>xmms</c>), Audacious (<c>audacious</c>), BMPx (<c>bmpx</c>), or XMMS support via the xmms-infopipe plugin (<c>infopipe</c>).
58 </p>
59
60 <pre caption="/etc/portage/package.use">
61 <comment># Example line to append to /etc/portage/package.use if you don't want the default USE flags.</comment>
62 <i>app-admin/conky xmms infopipe -ipv6</i>
63 </pre>
64
65 <p>
66 In addition, the <c>truetype</c> USE flag compiles support for TrueType fonts with the use of Xft.  Most users will want this as well.
67 </p>
68
69 <p>
70 Once you have your USE flags correctly set up, it's time to install Conky!
71 </p>
72
73 <pre caption="Installing Conky">
74 <i>emerge -av conky</i>
75 </pre>
76
77 <p>
78 You can test Conky to see how it will look by running the command <c>conky</c> in a terminal.  This will likely give you a good reference to how it will look and what you want to change, add or even remove.
79 </p>
80
81 <pre caption="Running Conky for the first time">
82 $ <i>conky</i>
83 </pre>
84
85 <p>
86 Once you have an idea of how Conky looks, you can now move on to configuring it!
87 </p>
88
89
90 </body>
91 </section>
92 <section>
93 <title>Configuring Conky</title>
94 <body>
95
96 <p>
97 By default, Conky will look for a configuration file in the users home directory located at <path>~/.conkyrc</path>  This file contains all the configuration options, and the static text, colors and other variables which control what data is shown to the user.  Conky also provides a great sample configuration, located at <path>/usr/share/doc/conky-version/Conkyrc.sample.gz</path>  Make sure to replace "version" with the specific version of Conky you have installed.
98 </p>
99
100 <pre caption="Copying the sample configuration to your home directory">
101 $ <i>zcat /usr/share/conky-1.6.0/conkyrc.sample.gz >> ~/.conkyrc</i>
102 </pre>
103
104 <note>
105 Make sure to replace "1.6.0" with the specific version of Conky you have installed.
106 </note>
107
108 <p>
109 Now, open up the sample configuration in the text editor of your choice.  You may notice that there are two seperate sections of the configuration file.  The first section of the file, contains the programs configuration options and controls how it acts.  This includes things such as the <c>update_interval</c>, or how often Conky will update the information on the screen.  The second section contains the actual text, graphs, and variables which are rendered on the screen.  This includes things such as the system uptime (<c>$uptime</c>), cpu usage (<c>$cpu</c>) and anything else you want to be shown.  The first section of the file starts right from the beginning, the second section is comprised of everything after the line which says "<c>TEXT</c>".  Comments in the file start with <c>#</c>, but keep in mind that even if a line is commented out in the second section of the file, the text will still be rendered to the screen.
110 </p>
111
112 <p>
113 Lists of all the available configuration options and variables are kept at <uri>http://conky.sourceforge.net/config_settings.html</uri> and <uri>http://conky.sourceforge.net/variables.html</uri>.  Also, there's a few great sample configurations and screenshots of working configurations at <uri>http://conky.sourceforge.net/screenshots.html</uri>.
114 </p>
115
116 </body>
117 </section>
118 </chapter>
119 <chapter>
120 <title>Extending Conky</title>
121 <section>
122 <title>Beyond the built-in variables</title>
123 <body>
124
125 <p>
126 So you've gotten this far, and have scoured the Conky documentation for that extra variable which Conky just doesn't seem to have...  You're in luck!  Conky provides several variables for just this reason!  <c>$exec</c> Will run a command every time Conky updates, <c>$execi</c> will run a command at a specified interval and <c>$texeci</c> will run a command in it's own thread at a specified interval.
127 </p>
128
129 <pre caption="Scripting examples">
130 <i>${exec grep 'sudo' /var/log/messages | tail -n 4}</i>
131 <i>${execi 30 ~/scripts/emerge-status.sh</i>
132 <i>${texeci 600 ~/scripts/gmail.pl}</i>
133 </pre>
134
135 <note>
136 While any command which works in a command shell will work in any of these variables, it is important to keep in mind that the commands must exit.  This means that commands like <c>tail -f</c> which keep running will NOT work properly.
137 </note>
138
139 </body>
140 </section>
141 </chapter>
142 </guide>