PC & IT SUPPORT MADE EASY FORUM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Setting Up Conky For Linux

Go down

Setting Up Conky For Linux Empty Setting Up Conky For Linux

Post by jamied_uk 18th May 2017, 12:30



Conky For Linux


Code:
sudo apt install -y conky-all


Code:
killall conky


You can see the default configuration file at /etc/conky/conky.conf, and you'll find other useful documents in /usr/share/doc/conky-all

I doubt that many people use the default display though, so here is how to change it. You can use any text editor, and I'm going to use nano.

First of all create a file called .conkyrc in your Home directory. To create the file using nano text editor, type or paste the following into a terminal:
 

Code:
gedit .conkyrc



Next you need to put a script for conky in the file, as up to now it has been using the default configuration in /etc/conky/conky.conf

Code:
sudo gedit /etc/conky/conky.conf




You can search the internet for .conkyrc scripts and use one you like, many of which will be configured to work on particular destops and/or require additional applications to be installed; so here is mine that I can confirm works on KDE, MATE and Gnome3 desktops. It uses minimal system resources and doesn't require any additional software to be installed, and you could use to get you started.
 


Code:
alignment top_right
background true
border_width 1
cpu_avg_samples 2
default_color green
default_outline_color green
default_shade_color green
draw_borders no
draw_graph_borders no
draw_outline no
draw_shades no
use_xft yes
xftfont Bitstream Vera Sans Mono:size=10
gap_x 5
gap_y 110
minimum_size 5 5
net_avg_samples 2
double_buffer yes
out_to_console no
own_window yes
own_window_argb_visual yes
own_window_argb_value 100
own_window_transparent yes
own_window_type normal
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
stippled_borders 0
update_interval 03.0
uppercase no
use_spacer none
show_graph_scale no
show_graph_range no

TEXT
${color}${scroll 16 $nodename - $sysname $kernel on $machine | }
${color green}$hr
${color}Uptime:$uptime
${color green}$hr
${color}RAM Usage:$mem/$memmax - $memperc% ${membar 7}
Swap Usage:$swap/$swapmax - $swapperc% ${swapbar 7}
${color green}$hr
${color}CPU 1: ${cpu cpu1}% ${cpubar cpu1}
CPU 2: ${cpu cpu2}% ${cpubar cpu2}
Frequency: ${freq}MHz
CPU 1 Temp: ${hwmon 1 temp 1}C    CPU 2 Temp: ${hwmon 2 temp 1}C
${color green}$hr
${color}File systems: ${fs_free /}/${fs_size /} ${fs_bar 6 /}
${color green}$hr
${color}Networking:
Up: ${upspeed wlan0}/s       Down: ${downspeed wlan0}/s
${color green}$hr
${color}Processes:$processes     Running:$running_processes
${color green}$hr
${color}Name               CPU%   MEM%  USER
${top name 1} ${top cpu 1} ${top mem 1}  ${top user 1}
${top name 2} ${top cpu 2} ${top mem 2}  ${top user 2}
${top name 3} ${top cpu 3} ${top mem 3}  ${top user 3}
${top name 4} ${top cpu 4} ${top mem 4}  ${top user 4}
${top name 5} ${top cpu 5} ${top mem 5}  ${top user 5}





To change the green text to, for example white, simply change the line that says:
 

Code:
default_color green



to:

Code:
default_color white



If you use ethernet (and your connection is called eth0) then change the instances of "wlan0" to "eth0".

If your CPU is single-core then change "CPU1" to "CPU0" and delete the portions of script relating to CPU2. Or if for example your CPU has four cores, then using the parts of script relating to CPU1 and CPU2 as examples, add more lines using the same script and typing CPU3 and CPU4, etc. You will soon get the hang of which parts of the script do what.

When you have finished editing the .conkyrc file, save and exit nano.

Note that the background parameter is set to "true" which means that Conky will now start as a background process automatically, so there is no longer any need to use ampersand when starting it from a terminal. But it seems that most people like Conky to start automatically, which is certainly what I've always done. Rather than simply add Conky to your list of start-up applications, I recommend instead creating a start up file with a delay, and adding a path to the file to your start up applications. This ensures that Conky won't be trying to start at the same time as your desktop loads, and it has been known to interfere with applications such as Compiz when it tries to start simultaneously.

My conky start file is called conkystart, but you can name it anything you like. You can also of course use any text editor to create it, but just for fun I'm creating it with the cat command because it only has two lines of text, which are as follows:
 


Code:
#!/bin/bash
sleep 10 && conky;



To create a file called conkystart in your Home directory using cat, containing the above code, open a terminal and paste or type the following lines one at a time, and press enter after pasting/typing each line:
 


Code:
cat > conkystart
#!/bin/bash
sleep 10 && conky;



After typing/pasting the final line and pressing enter, press Ctrl^d

Now the file and its contents have been created. Next you need to make the file executable:
 

Code:
chmod +x conkystart




EDIT: If the start-up script doesn't work in more recent Linux distros, instead, try creating the following file:

Code:
sudo gedit ~/.config/autostart/conky.desktop




Code:
[Desktop Entry]
Exec=sleep 3 && conky
Hidden=false
Icon=system-run
Path=
Terminal=false
Type=Application





encrypted.google.com/search?q=best+conky+for+mint&ie=utf-8&oe=utf-8#safe=off&q=best+conky+for+mint+kde

bleepingcomputer.com/forums/t/567477/how-to-install-and-configure-conky-system-monitor/
jamied_uk
jamied_uk
Admin

Posts : 2943
Join date : 2010-05-09
Age : 41
Location : UK

https://jnet.sytes.net

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum