Установка conky ubuntu 16.04

Настройка Conky Manager

Теперь давайте разберемся как выполняется настройка Conky в Linux Mint. Персонализировать рабочий стол с помощью Conky Manager можно двумя способами — сменить тему или подключить виджеты. В обоих случаях стоит воспользоваться предпросмотром. Для того, чтобы увидеть как выглядит элемент, достаточно щёлкнуть на его названии левой кнопкой мыши. Если после этого в нижней части окна не появилось изображение, нажмите кнопку Preview.

Для переключения между виджетами и темами служат одноимённые кнопки — Widgets и Themes.

Для того, чтобы установить выбранную тему или виджет, достаточно установить флажок в ячейке рядом с названием.

Установка дополнительных тем

После запуска Conky Manager Linux Mint вы обнаружите в настройках только одну тему — Green Apple Desktop — и несколько виджетов. Этого явно мало, так что придётся установить пакет default-themes-extra-1.cmtp с дополнительными темами. Его предоставляет разработчик программы. Скачать архив можно с MediaFire.

Кроме официальных тем существует множество «самодельных», созданных энтузиастами всего мира. Проще всего найти их на сайте DeviantArt.com. На момент написания статьи там имеется 166 тем, подходящих для Ubuntu-подобных систем.

Установка крайне проста и занимает меньше минуты. Нажмите кнопку Import Theme Pack и  выберите предварительно сохранённый на диске архив с темами (он обязательно должен иметь расширение cmtp.7z).

Создание собственной темы

Ещё один вариант — создать собственную тему. Всё, что для этого нужно — скомбинировать понравившиеся обои для рабочего стола и необходимые виджеты из числа тех, что уже присутствуют в Conky Manager.

Начните с выбора виджетов. Кликните по кнопке Widgets и установите флажки для желаемых пунктов.

Затем перейдите на вкладку Themes и нажмите кнопку Save Theme. Откроется окно, в котором нужно:

  • заполнить поле Theme Name — название темы может быть любым;
  • установить обои с помощью раскрывающегося списка Wallpaper — пункт Custom Wallpaper позволит выбрать картинку из числа расположенных на жёстком диске, а пункт Current Wallpaper сохранит нынешний вариант фона. Пункт None обозначает, что обоев не будет вовсе;
  • выбрать расположение обоев с помощью раскрывающегося списка Scaling — centred (выравнивание по центру), zoomed (увеличение), tiled (черепица), stretched (растягивание по горизонтали или вертикали), sсaled (масштабирование).

Список виджетов, выбранных на первом этапе, подтягивается автоматически.

Для того, чтобы сохранить результат, нажмите OK, чтобы отказаться — Cancel. Если после сохранения ваша тема не появилась в списке, воспользуйтесь кнопкой Search for new themes (в виде круглой стрелки).

А вот как выглядит тема, созданная для примера:

Редактирование виджетов и тем

Если пользователю нравится сам виджет, но не нравится цвет подложки, размер или место расположения на рабочем столе, эти, а также другие параметры можно отредактировать. Для начала активируйте виджет, установив его флажок. Это позволит в режиме реального времени отслеживать изменения, поскольку в превью вы их не увидите.

Затем нажмите кнопку Edit Widget, по внешнему виду она напоминает блок с переключателями. После этого откроется окно с пятью вкладками:

  • Location — расположение виджета (вверху экрана, внизу или по центру, слева или справа). Изменяя числа в графе Horizontal Gap и Vertical Gap, легко передвинуть изображение на определённое количество пикселей по горизонтали или вертикали.
  • Size — размер виджета. Можно настроить ширину (Minimal Width) и длину (Minimal Height). Height Padding отвечает за расстояние от нижней строки до нижнего края виджета.
  • Transparency — прозрачность. Степень прозрачности имеет 4 значения — Opacity (полностью непрозрачно), Transparent (прозрачно), Pseudo-Transparent (в отличие от Transparent этот параметр позволяет сохранить изображения непрозрачными, сделав прозрачным только фон), Semi-Transparent (полупрозрачно). Кроме того, можно настроить прозрачность в процентах и установить цвет фона.
  • Time — формат времени (12-часовой или 24-часовой).
  • Network — доступ к сети. Изменять настройки Интернет можно не для всех виджетов.

Отредактировать тему также не сложно, при этом можно изменить количество задействованных виджетов, обои и способ отображения фона.

Не забудьте про автостарт conky

Чтобы все панели появлялись автоматически при запуске Openbox, сначала создадим подобный скрипт ():

1
2
3
4
5
6
7
8

#!/bin/sh
 

conky-c~/.conkyrc

conky-c~/.conkyrc1

conky-c~/.conkyrc2

conky-c~/.conkyrc3

(sleep2s&&conky-c~/.conkyrc_calendar)&

(sleep2s&&conky-c~/.conkyrc_processes)&

Если не использовать задержку () при запуске двух последних панелей, то они могут не отобразиться.

А теперь, как обычно, добавляем этот скрипт в список приложений для автозапуска в наш :

1
2
3
4
5
6
7
8
9

nitrogren—restore&

 
APPS=’sakura
        xxkb
        compton
        tint2
        start_conky.sh’
 

(for X in $APPS ;do($X&) ;done)&

Установка Conky Manager в Linux Mint

Разработка Conky Manager давно уже прекращена, так что установить эту программу из репозитория могут только обладатели Linux Mint 17.3 и более ранних версий. Для этого нужно выполнить в терминале три команды:

Первая команда добавляет в систему PPA-репозиторий, вторая — обновляет кэш APT, ну а третья нужна непосредственно для установки приложения.

Установка Conky Manager Linux Mint 19 выполняется окольным путём. Первым делом нужно скачать из архива Ubuntu и установить файл realpath_8.25-2ubuntu2_all.deb, а потом аналогичные операции проделать с файлом conky-manager_2.4~136~ubuntu16.04.1_amd64.deb, который можно найти на портале Launchpad.net.

Для установки deb-пакетов понадобится программа Gdebi. Как правило, она поставляется вместе с дистрибутивом. Некоторые браузеры сразу предлагают выбор — сохранить файл или открыть его с помощью Gdebi, другие просто сохраняют файл на диск. В этом случае достаточно найти его в папке и дважды кликнуть по иконке, затем подтвердить установку пакета.

Также можно произвести загрузку и установку с помощью терминала, но, в отличие от предыдущего способа, этот работает не на всех версиях Linux Mint. Первая команда:

Вторая команда:

Следует заметить, что если установка из репозитория подходит для ОС с любой разрядностью, то метод с использованием файлов работает только для 64-разрядных систем.

Установка Conky Manager Linux Mint завершена. После этого программа появится в меню. В каком разделе — зависит от используемой версии ОС. Если вы не можете его найти, наберите в строке поиска название программы.

Autostart

Conky can be started automatically several different ways, as outlined in «Autostarting». Choose the one that works best for your window manager/desktop environment.

Conky has a configuration setting which will tell it to fork to the background. This may be desirable for some autostarting setups.

In :

conky.config = {
    background = true,
}

If you use a graphical desktop environment and wish to use a file for autostarting, use the following:

~/.config/autostart/conky.desktop
Type=Application
Name=conky
Exec=conky --daemonize --pause=5
StartupNotify=false
Terminal=false

The parameter delays conky’s drawing for 5 seconds at startup to make sure that the desktop had time to load and is up.

Установка тем Conky

Как вы уже поняли, за отображение отвечают темы Conky. Или если быть более точным, то темы Conky Manager, это обычные конфигурационные файлы, такие же, как и .conkyrc, только уже настроенные. Вы можете загрузить и установить любую понравившуюся вам тему

Обратите внимание, что обычно темы содержат файл README, в котором описано как установить дополнительные шрифты или фоновый рисунок

Вот список шагов для установки Conky темы в Ubuntu:

Скачайте тему из интернета;
Распакуйте архив темы, так, чтобы получить папку с ее файлами;
Переместите папку с файлами темы в каталог ~/.conky-manager/themes/

Обратите внимание, что в каталоге будут лежать только файлы темы, а не еще один подкаталог;
Откройте Conky-manager и активируйте тему.. Также вы можете не добавлять тему вручную, а использовать опцию «Import Theme» из главного меню Conky Manger

Также вы можете не добавлять тему вручную, а использовать опцию «Import Theme» из главного меню Conky Manger.

Если вы собираетесь использовать Conky Manager, то можете не добавлять conky в автозагрузку через меню системы, вместо этого установите галочку «Run Conky at Startup» в настройках Conky Manager:

Почти все, что вам нужно знать о работе и настройке Conky Ubuntu 16.04 мы рассмотрели. Теперь подберем еще несколько тем, которые вам могут понравиться.

Удобный подход к работе с Conky

Самый удобный для меня подход оказался когда в папке лежит и файл настройки и шрифты что используются а так же скрипт запуска программы который я просто добавляю в автозагрузку системы.

Вот то что я делаю при установке новой системы для удобной работы с Conky:

  • Ложу папку my_conky туда куда мне удобно,
  • Папку со шрифтами копирую в папку /usr/share/fonts/,
  • Добавляю в автозагрузку файл start-conky.sh в котором прописаны параметры запуска.

Настройка сводится к тому что я открываю файл conkyrc в текстовом редакторе и редактирую его. После сохранения файла вы сразу уведите результат своих настроек без перезагрузки сервиса.

Creating Widgets

In order to add your own Widget you should inherit the base class (). Look at for examples.

The Widget API assumes the following functions. Note that only is required.

  • Your widget’s constructor. It can set fixed / properties (see above).
  • This function will be called with arguments specifying the assigned space. If fixed and/or were specified the given arguments will be at least that value but may be greater.
    Note: For container Widgets this function must return a table of its children with relative coordinates and sizes. See the implementations of and .
  • Allows you to draw some static background. This function will be called once at startup and again if the layout changes.
  • Called once per update before with the value of conky’s variable. Here you can fetch new data to update the information visualized by your widget.
    If your widget’s size has changed this function should return to trigger a layout reflow.
  • Allows you to draw dynamic content once per update.

You can also create composite Widgets by subclassing or . See as an example.

Настройка Править

После установке программы надо создать конфигурационнй файл .conkyrc в своем домашнем каталоге или скопировать уже готовый конфигурационный файл следующей командой

zcat /usr/share/doc/conky/examples/conkyrc.sample.gz > ~/.conkyrc

Теперь открываем конфиг в любом текстовом редакторе и начинаем его изучать:

gedit ~/.conkyrc

Делится конфиг на две части:

  • первая часть отвечает за внешний вид системного монитора.
  • вторая (та что после тега TEXT) — что он, собственно, будет отображать. Информация выводимая на экран.

должна выглядить примерно так:

${переменная параметры}
$элемент оформления
${color цветтекста}
${переменная параметры}

Setting Things Up and Customization

The original Conky tool pulls out different information from your Linux system, while the Conky themes will instruct it to display them attractively. If you are a pro user, then you may want to create Conky themes of your own to reflect your personality onto your desktop. But it’s not a pleasant way for customizing Conky for most of the users.

If you are a beginner, then don’t get disheartened because there are many Conky themes freely available on the internet. The best few of them you have seen in the above list. Now while you have downloaded your favorite theme, it’s time to learn setting it up, and customize it.

Installation of Conky

The installation of Conky is easier than configuring it. No matter which Linux distribution you are using, you can install it anyway. The easiest way to install this is by using the terminal window. Just open the Terminal app from the launcher or use the keyboard shortcut to launch it. Then type the following commands one by one while you are connected to the internet. In a few moments, it will install the Conky System Monitoring Tool.

$ sudo apt-get install conky-all

If you find any problem installing Conky with the Terminal, you can always use the manual installation method. Now you have to launch Conky by typing the following command.

$ conky

After you have successfully launched Conky, it will look something like the above picture, which is not even close to what you have seen in the above list of themes. Now its time to dress it up with themes.

Installation of Conky Manager

Conky Manager is a third party configuration tool for Conky. Of course, you can configure Conky without this tool. But this tool has a graphical user interface that will make it easier to customize the Conky look. Even the beginners can customize the themes with this tool. To install Conky Manager, open the Terminal window again and type the following code. It will install the Mark pcnetspec PPA repository into your system.

$ sudo add-apt-repository ppa:mark-pcnetspec/conky-manager-pm9

After this type the following code to install the tool.

$ sudo apt-get install conky-manager

After the successful installation, the tool will be added to your applications list, which can be opened by using the launcher.

Applying Desired Themes

The Conky depends on the .conkyrc file for the configuration option. This file usually comes with the downloaded theme file. So before installing any Conky theme, it acts according to the /etc/conky/conky.config file to show the default look.

After downloading the archived theme file, extract it into your desktop. There will be a text file with some additional resources or even an installation manual. Rename the text file with Anything.conkyrc and move it to your Home folder. After putting the Conky file in place, start the Conky again to see the changes. You can customize the theme by using different variables inside the Conky file by using your text editor.

If you want to handle these using the Conky Manager, you have to put the renamed ~/Anything.conkyrc file inside the ~/.conky folder. Don’t be confused. The ~/.conky folder was automatically created while you finished installing Conky Manager.

Now open the Conky Manager, and you will see that the new Conky theme file is automatically loaded inside the tool. From here, you can select any Conky theme and edit the parameters using graphical UI or using the classic text editor.

Running Multiple Conky

You may wish to run multiple instances of Conky on your desktop. You could be running a system info Conky on the left side of your desktop and a weather Conky along the bottom; the options are nearly infinite. First you need to be sure your Conky are aligned on the desktop differently, so they don’t overlap each other. You can specify the alignment of a Conky in the .conkyrc file by changing the line beginning with «alignment». The syntax is as follows:

alignment top_right  # top_right, top_left, bottom_left, bottom_right

To set multiple Conky to run at startup, create a folder called .conky.

mkdir ~/.conky

Save your different Conky config files in there. You may want to name them .conkyrc_top, .conkyrc_bottom, etc. You should save all your Conky config files there. Next create a script that will execute all these Conky files. Something like the following:

 #!/bin/bash
conky -c ~/.conky/.conkyrc_top &
conky -c ~/.conky/.conkyrc_bottom

Note that all commands except the last must be appended with an ampersand (&) so that the script will not stop at the first command. The «conky -c random_file» command simply tells conky to use random_file for configuration instead of the default ~/.conkyrc. Save this file as conky_start in ~/bin; if the folder does not already exist, create it.

mkdir ~/bin

Next set it to exectuable:

chmod a+x ~/bin/conky_start

Now follow the instructions given above on autostarting, only substitute «conky_start» for «conky». NOTE: In Kubuntu, you must choose «Add Script» rather than «Add Program».If you’ve already set «conky» to launch at startup, you must remove it when adding «conky_start». Although this will get you started with a functioning Conky, this is only the beginning. Enjoy configuring it to your liking, and feel free to share your config files!

Originally posted The Ubuntu Forums ubuntuforums.org

Enable Conky to start at boot

Conky is the type of program that people typically run all the time. It just sort of integrates itself with your desktop. Therefore, you’ll probably want it to open automatically every time your system boots up. To achieve that, follow these steps:

  1. Open Ubuntu’s application launcher and type «startup» in the search bar to open Startup Applications.
    Open up Startup Applcations from the Ubuntu application launcher
  2. Inside Startup Applications, click «Add» to add a new program.
    Click the Add button to enter Conky into the list
  3. In this window, we will enter the name of our program (Conky System Monitoring) and the full command to open Conky, which is . Reference the screenshot below for how yours should look:
    Fill out the information for Conky as seen here
  4. Hit the «Add» button to finish up, then you can close the Startup Applications Preferences window. When done, reboot or re-login to your Ubuntu 20.04 system.
    $ reboot
    
  5. When you load back into your desktop, you’ll be greeted by the Conky widget. It looks a little plain right now and it’s in a terrible position by default, but it should be giving you a concise view of what’s going on with your system resources. In the next section, we’ll cover how to get it looking better.
    Conky is now loaded, but looking rather ugly at the moment

Вступление

Удобное и информативное отображение параметров системы и особенно отображение тех параметров которые мне хочется видеть была одной из моих главных пожеланий при настройке любой системы. Первое время я пытался добавлять на панели разные аплеты с выводом информации, но все это не совсем удобно. Когда первый раз познакомился с Сonky мне было не удобно настраивать его и каждый раз при переустановке системы лезть в настройки и настраивать. К моей радости один из пользователей Calculate Linux, который регулярно выкладывает свои сборки, в сборку добавляет свой подход к настройкам Conky его то я и взял за основу.

Configuration

By default conky uses a configuration file located at . You can print out an example configuration with:

$ conky --print-config

Furthermore, you can create a default configuration file with the following command:

$ mkdir -p ~/.config/conky && conky --print-config > ~/.config/conky/conky.conf

If you prefer to have a configuration dotfile in home, you can create a file elsewhere and tell conky to use it using arguments.

For example to tell conky to use a dotfile located in the user’s home directory:

$ conky --config=~/.conky.conf

When editing your config file while conky is running, conky will update with the new changes every time you write to the file.

Dual screen

When using a dual screen configuration, you will need to play with a few options to place your conky window where you want it on the desktop.

By adjusting , let’s say you are running a 1680×1050 pixels resolution and you want the window on middle top of your left monitor, you will use:

alignment = 'top_left',
gap_X = 840,

The option is self-explanatory, the is the distance, in pixels, from the left border of your screen.

is an alternative useful option, the following will place the conky window at the top right of the second screen:

alignment = 'top_right',
xinerama_head = 2,

Config file syntax changed

Since Conky 1.10, configuration files have been written with a new Lua syntax, like so:

 conky.config = {
   -- Comments start with a double dash
   bool_value = true,
   string_value = 'foo',
   int_value = 42,
 }
 conky.text = ]

Some examples below may still use the old syntax, which looks like this:

 bool_value yes
 string_value 'foo'
 int_value 42

Trouble Shooting

These are known issues people have with conky and their solutions.

Conky starts and doesn’t display anything on the screen

First check for syntax errors in your configuration file’s text variable. Then double check that your user has permission to run every command inside your configuration file and that all needed packages are installed.

Transparency

Conky supports two different types of transparency. Pseudo-transparency and real transparency that requires a composite manager to be installed and running. If you enable real transparency and don’t have a composite manager running your conky will not be alpha transparent with transparency enabled for fonts and images as well as the background.

Pseudo-transparency

Pseudo-transparency is enabled by default in conky. Pseudo-transparency works by copying the background image from the root window and using the relevant section as the background for conky. Some window managers set the background wallpaper to a level above the root window which can cause conky to have a grey background. To fix this issue you need to set it manually. An example with feh is:

In :

 sleep 1 && feh --bg-center ~/background.png &

Enable real transparency

To enable real transparency, you must have a composite manager running and the following lines added to inside the conky.config array:

 conky.config = {
    own_window = true,
    own_window_transparent = true,
    own_window_argb_visual = true,
    own_window_type = 'desktop',
 }

If window type «desktop» does not work try changing it to . If that does not work try the other options: , , or instead.

Semi-transparency

To achieve semi-transparency in real transparency mode, the following setup must be used in the conky configuration file:

 conky.config = {
    own_window = true,
    own_window_transparent = false,
    own_window_argb_visual = true,
    own_window_argb_value = 90,
    own_window_type = 'desktop',
 }

To reduce the transparency of the conky window, one can increase the value of towards 255.

Do not minimize on Show Desktop

Using Compiz: If the ‘Show Desktop’ button or key-binding minimizes Conky along with all other windows, start the Compiz configuration settings manager, go to «General Options» and uncheck the «Hide Skip Taskbar Windows» option.

If you do not use Compiz, try editing and adding/changing the following line:

own_window_type = 'override',

or

own_window_type = 'desktop',

Refer to man page for the exact differences. But the latter option enables you to snap windows to conkys border using resize key-binds in e.g. Openbox, which the first one does not.

Integrate with GNOME Shell

Some have experienced problems with conky showing up under GNOME.

Add these lines to :

own_window = true,
own_window_type = 'desktop',

Prevent flickering

This article or section needs expansion.

Conky needs Double Buffer Extension (DBE) support from the X server to prevent flickering because it cannot update the window fast enough without it. It can be enabled with Xorg in with line in section. The file has been replaced (1.8.x patch upwards) by which contains the particular configuration files. DBE is loaded automatically as long as it is present within . The list of loaded modules can be checked with .

To enable double buffering, add the option to :

 conky.config = {
     double_buffer = true,
 }

Creating a Configuration File

By default, the Conky configuration file is located in /etc/conky/conky.conf. You should create your own configuration file.

To create a configuration file for Conky, open a terminal window and navigate to your home directory:

cd ~

From there, you need to navigate to the hidden config folder.

cd .config

You could have just typed (cd ~/.config). Read the guide on the cd command for more information about navigating the file system.

Now that you are in the .config folder, run the following command to copy the default config file.

sudo cp /etc/conky/conky.conf .conkyrc

Then, change the ownership of the file to your user.

sudo chown user:user .conkyrc

Set Conky To Start At Boot

Conky only becomes useful when it is set to start up at boot. Here’s how in Ubuntu and the various respins.

In Ubuntu/Unity:

Click the gear icon in the upper right hand corner of the top panel. Select Startup Applications. Click Add. In the resulting dialog box give the name as «Conky» and the command as conky. Click add and close.

In Ubuntu/Gnome Shell

Press Alt+F2 to bring up the Run dialog. Type gnome-session-properties. Click the «Add» button. In the resulting dialog box give the name as «Conky» and the command as conky. Click add and close.

In Kubuntu

Go to K-Menu>Computer>System Settings. Select Startup and Shutdown and click the Add Program button. Type conky and click OK.

In Lubuntu

Run the following commands in a terminal:

mkdir -p ~/.config/lxsession/Lubuntu/
touch ~/.config/lxsessions/Lubuntu/autostart
leafpad autostart

Add this line to the autostart file:

@conky

Save and close.

In Xubuntu

In the Applications menu open Settings Manager and select Session and Startup. On the Application Autostart tab click the Add button. In the resulting dialog box give the name as «Conky» and the command as conky.

Установка Conky Manager

Conky имеет очень много настроек и параметров. Все они настраиваются через конфигурационный файл .conkyrc, но редактирование этого файла вручную может быть сложной задачей для начинающих. Чтобы облегчить себе работу можно использовать утилиту conky-manager.

Для установки Conky Manager в Ubuntu 16.04 вам нужно добавить PPA репозиторий программы:

После установки вы найдете программу в главном меню. Сразу же после первого запуска вам будет доступно несколько тем Conky. Все объекты разделены на два типа — виджеты и темы.

Темы устанавливают изображение рабочего стола, и виджеты по умолчанию, а затем вы можете добавить к ним дополнительных виджетов.

Вы можете их активировать и изменить настройки для каждой темы или виджета. В этом же главном окне программы можно импортировать темы, загруженные из интернета, например, сайта DeviantArt. Чтобы настроить выбранную тему, выделите ее, а затем нажмите «Редактировать».

Установка и настройка

  • Установите пакет из официальных репозиториев.

Редактируя конфигурационный файл, вы сразу же сможете видеть результат внесённых изменений, как только сохраните его. Вам не нужно завершать/начинать ваш X сеанс. Поэтому лучше всего тестировать все опции по порядку, сохраняя конфигурационный файл и наблюдаяя за окном conky, и исправлять их, если они вам не понравились.

Либо используйте файл стандартной конфигурации /etc/conky/conky.conf:

$ cp /etc/conky/conky.conf ~/.conkyrc

Лучше использовать локальный конфигурационный файл. Как и многие приложения, conky сначала проверит, есть ли локальный файл . В случае его отсутствия conky прочитает файл по умолчанию из .

В случае, если вы храните вашу конфигурацию локально, например, в домашней директории, вы не сможете читать файлы логов, пока не внесете некоторые изменения. Одной из полезных функций conky является вывод на рабочий стол некоторых файлов из , чтобы наблюдать за журнальными сообщениями. Большинство этих файлов может читать только , вам придётся запускать conky через . Однако, запуск conky с привилегиями не рекомендуется, поэтому выполните следующие действия:

$ usermod -aG log имя_пользователя

Вы добавили пользователя в группу . Теперь может читать файлы логов, и conky сможет отображать журнальные записи на рабочем столе.

В случае, если conky не принимает изменения, например, minimum_size, которые вы делаете в ~/.conkyrc, убедитесь, что вы очистили /etc/conky/conky.conf или закомментировали соответствующюю секцию. Лучше всего удалить файлы из /etc/conky/, так как conky будет пытаться их читать и из-за этого выдавать вам некоторые сообщения об ошибках Xorg.

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *

Adblock
detector