Dodany przez: w Aplikacje - konfiguracja.
Artykuł czytano 8 696 razy i oceniono
1 gwiazdka2 gwiazdki3 gwiazdki4 gwiazdki5 gwiazdek (brak ocen)
Loading ... Loading ...

Conky to alternatywa dla Screenlets (o których będę pisał później). Dzięki Conky możemy na naszym pulpicie zobaczyć rozmaite informacje o naszym systemie/aplikacjach, a nawet sprawdzić pogodę lub pocztę.

Instalacja:
1. Aby zainstalować Conky, otwórz terminal (Aplikacje > Akcesoria > Terminal) i wydaj polecenie:

sudo apt-get install conky

2. Teraz musisz stworzyć plik konfiguracyjny. Od niego będzie zależał wygląd Twojego Conky. Utwórz plik konfiguracyjny z ustawieniami proponowanymi przez autorów:

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

lub (dla nowszych wersji Conky):

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

Conky zainstalowany i wstępnie skonfigurowany. Teraz pora sprawić, by uruchamiał się przy starcie systemu.

Uruchamianie Conky przy starcie systemu:
1. Kliknij kolejno System > Preferencje > Sesje.
2. Teraz wybierz Dodaj. W polu Nazwa wpisz np. Conky, a w polu Polecenie: conky.

Jest to najprostszy sposób, by dodać Conky do startu systemu. Jest też inne rozwiązanie - z opóźnieniem czasowym. Uchroni Cię to przed różnego rodzaju błędami Conky. Napiszę o tym osobny poradnik, jednak tutaj też zamieszczę ten sposób:

1. Otwórz terminal i wydaj polecenie:

nano

2. Wklej poniższy kod:

#!/bin/bash
sleep 20 && conky

Gdzie sleep 20 to czas w sekundach po którym zostanie uruchomiony Conky.
3. Zapisz plik (CTRL + O) jako .autostart
4. Wyjdź z edytora (CTRL + X) i wydaj polecenie:

chmod +x .autostart

5. Teraz kliknij kolejno System > Preferencje > Sesje. Usuń wszystkie sesje związane z Conky, stwórz jedną i w polu Polecenie wpisz:

/home/użytkownik/autostart

Gdzie użytkownik to nazwa Twojego konta.

Aby sprawdzić czy wszystko działa poprawnie uruchom ponownie komputer.

Uruchomienie Conky
:
Jeśli chcesz ręcznie uruchomić program Conky, otwórz terminal i wydaj polecenie:

conky

Na Twoim pulpicie powinien pokazać się program z domyślną konfiguracją.

Konfiguracja Conky:
Aby własnoręcznie skonfigurować Conky musisz "dobrać się" do jego pliku konfiguracyjnego. Aby to zrobić wydaj w terminalu polecenie:

sudo gedit ~/.conkyrc

Twoim oczom powinny ukazać się dziesiątki niezrozumiałych znaków. Aby wyjaśnić Ci dokładnie co one oznaczają potrzebowałbym 100 kolejnych artykułów. Jednak umieszczę poniżej przydatne linki i mój plik konfiguracyjny Conky - dla pokazania możliwości tego programu.

Linki:
Conky - komendy cz.1 (język angielski)
Conky - komendy cz.2 (język angielski)
Conky - konfiguracje umieszczone na oficjalnej stronie programu
Conky - konfiguracje użytkowników forum.ubuntu.pl

Moja konfiguracja:
Plik conkyrc:

background yes
use_xft yes
xftfont Zekton:size=9
xftalpha 0.5
update_interval 1.0
total_run_times 0
double_buffer yes
no_buffers no
own_window yes
own_window_transparent yes
own_window_type override
own_window_hints undecorate,sticky,skip_taskbar,skip_pager
minimum_size 500 5
maximum_width 250
default_color white
alignment top_right
gap_x 12
gap_y 20
uppercase no
override_utf8_locale yes

TEXT

${color #ddaa00}System $hr

${color white}Ubuntu 8.04 "Hardy Heron"
${color white}$sysname ${color white}$kernel (${color white}$machine)
${color white}Procesy: $processes ${color white}w trakcie: $running_processes
${color white}Czas pracy: $uptime

${color #ddaa00}Temperatura $hr

${color white}Procesor: $alignr ${hwmon temp 1}°C ${hwmon temp 2}°C
${color white}Dysk twardy: $alignr ${execi 60 ~/conky/hddtemp}°C
${color white}NVidia GeForce 7300GT: $alignr ${execi 60 ~/conky/nvidia}°C

${color #ddaa00}Procesor $hr

${color white}Intel Core 2 Duo E2160 1.8 GHz
${color white}CPU: ${cpu cpu}% ${cpubar cpu}
$stippled_hr
${color white}Najwięcej CPU: $alignr ${color white}CPU%
${color white}${top name 1} $alignr ${top cpu 1}
${color white}${top name 2} $alignr ${top cpu 2}
${color white}${top name 3} $alignr ${top cpu 3}

${color #ddaa00}Pamięć RAM $hr

${color white}GoodRam DDR2 1GB 667MHz CL5
${color white}RAM: ${memperc}% ${membar}
$stippled_hr
${color white}Najwięcej RAM: $alignr ${color white}RAM%
${color white}${top_mem name 1} $alignr ${top_mem mem 1}
${color white}${top_mem name 2} $alignr ${top_mem mem 2}
${color white}${top_mem name 3} $alignr ${top_mem mem 3}

${color #ddaa00}Dyski $hr

${color white}home: ${fs_used /}/${fs_size /} $alignr ${fs_used_perc /}%
${color white}${fs_bar /}
${color white}swap: ${swap}/${swapmax} $alignr ${swapperc}%
${color white}${swapbar}
${color white}system ${fs_used /media/System}/${fs_size /media/System} $alignr ${fs_used_perc /media/System}%
${color white}${fs_bar /media/System}
${color white}pliki ${fs_used /media/Pliki}/${fs_size /media/Pliki} $alignr ${fs_used_perc /media/Pliki}%
${color white}${fs_bar /media/Pliki}

${color #ddaa00}Internet $hr

${color white}IP: ${color white}${addr ppp0}
${color white}Pobieranie: ${downspeedf ppp0} KB/s $alignr ${totaldown ppp0}
${color white}Wysyłanie: ${upspeedf ppp0} KB/s $alignr ${totalup ppp0}

${color #ddaa00}Poczta $hr

${color white}${execi 60 ~/conky/gmail}

Plik hddtemp:

#!/bin/bash
echo "$(nc localhost 7634 | cut -d'|' -f4)"

Plik nvidia:

#!/bin/bash
GPU_temp="$(DISPLAY=":0.0" nvidia-settings -q gpucoretemp | sed '/Attribute/!d;{s/.*):\ //;s/\.//}' 2>/dev/null)"
echo $GPU_temp

Plik gmail:

#!/bin/bash

gmail_login="login" #tutaj wpisz swój login!
gmail_password="hasło" #tutaj wpisz swoje hasło!

dane="$(wget --secure-protocol=TLSv1 --timeout=3 -t 1 -q -O - \
https://${gmail_login}:${gmail_password}@mail.google.com/mail/feed/atom \
--no-check-certificate | grep 'fullcount' \
| sed -e 's/.*//;s/<\/fullcount>.*//' 2>/dev/null)"

#if [ -z "$dane" ]; then
#echo "Connection Error !"
#else
#echo "GMail: $dane msg(s)"
#fi

if [ -z "$dane" ]; then
echo "Błąd połączenia"
else
let wynik=$dane;
if [ $wynik = 0 ]; then
echo "Nie masz nowych wiadomości."
elif [ $wynik = 1 ]; then
echo "Masz 1 nową wiadomość."
else
if [ $wynik -lt 5 ]; then
echo "Masz $wynik nowe wiadomości."
else
echo "Masz $wynik nowych wiadomości."
fi
fi
fi

Mój Conky

Zobacz także:

Jeżeli powyższy artykuł nie rozwiązał lub rozwiązał częściowo Twój problem, dodaj swój komentarz opisujący, w którym miejscu napotkałeś trudności.
Na każdy komentarz postaramy się udzielić odpowiedzi w ciągu 24 godzin od momentu wysłania.
Mile widziane komentarze z uwagami lub informacjami o rozwiązaniu problemu.
  1. avatar goral 71 napisał(a):
    11 cze 2009 o godzinie 21:07

    mam ubuntu 9.04 i chcialem recznie skonfigurowac Conky ale pokazalo mi sie cos takiego
    czy mozesz mi pomoc

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Conky: MPD error: problems getting a response from "localhost" on port 6600 : Connection refused

    Podoba mi się: Dobre 0 Słabe 0
  2. avatar Szmitas napisał(a):
    12 cze 2009 o godzinie 5:34

    Podaj jeszcze swój plik ~/.conkyrc bo to właśnie w nim leży problem.

    Prawdopodobnie masz w nim wpisy odpowiedzialne za wyświetlanie artysty i tytułu piosenki, której właśnie słuchasz. Powinny one wyglądać tak:

    $mpd_artist
    $mpd_title
    $mpd_bar
    $mpd_status

    Usuń je :)

    Podoba mi się: Dobre 0 Słabe 0
  3. avatar goral 71 napisał(a):
    12 cze 2009 o godzinie 12:58

    yang@yang-laptop:~$ sudo ~/.conkyrc
    [sudo] password for yang:
    sudo: /home/yang/.conkyrc: command not found

    jestem nowym uzytkownikiem i nie wiem od czego zaczac , wpisalem to w terminalu i to mi sie pokazalo

    Podoba mi się: Dobre 0 Słabe 0
  4. avatar Szmitas napisał(a):
    12 cze 2009 o godzinie 16:50

    Wpisz:

    sudo gedit ~/.conkyrc

    Poza tym jest to napisane na stronie :)

    Podoba mi się: Dobre 0 Słabe 0
  5. avatar goral 71 napisał(a):
    12 cze 2009 o godzinie 22:05

    dzieki dziala

    Podoba mi się: Dobre 0 Słabe 0
  6. avatar marcin111 napisał(a):
    29 wrz 2009 o godzinie 11:54

    Witam.

    Dla mnie nie zrozumiały jest punkt 2, a dokładniej:
    "Teraz musisz stworzyć plik konfiguracyjny. Od niego będzie zależał wygląd Twojego Conky. Utwórz plik konfiguracyjny z ustawieniami proponowanymi przez autorów:
    zcat /usr/share/doc/conky/examples/conkyrc.sample.gz > ~/.conkyrc
    lub (dla nowszych wersji Conky):
    zcat /usr/share/doc/conky/examples/conky.conf.gz > ~/.conkyrc"
    i teraz pytanie: jak stworzyć taki plik konfiguracyjny?
    Gdy wpisywałem w terminalu to:
    zcat /usr/share/doc/conky/examples/conkyrc.sample.gz > ~/.conkyrc to wypluwa mi:
    gzip: /usr/share/doc/conky/examples/conkyrc.sample.gz: No such file or directory
    Jak to zrobić?

    Podoba mi się: Dobre 0 Słabe 0
  7. avatar Szmitas napisał(a):
    29 wrz 2009 o godzinie 15:09

    Dlatego spróbuj:

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

    Napisane jest, że dla nowszych wersji Conky odpowiednia jest ta komenda.

    Podoba mi się: Dobre 0 Słabe 0
  8. avatar archeol napisał(a):
    04 lis 2009 o godzinie 20:21

    o, mam dokładnie ten sam problem co kolega marcin111; tylko u mnie nie działa żadno z tych poleceń. Nie mam katalogu /examples/ tylko /example-content/ - ale to też nie działa. Ubuntu 9.10

    Podoba mi się: Dobre 0 Słabe 0
  9. avatar wiesniak napisał(a):
    03 mar 2010 o godzinie 19:27

    Gmail mi nie działa :/ ciągle wyświetla mi błąd połączenia :/ wie ktoś jaka może być tego przyczyna? próbowałem na różne sposoby już wpisywać login i hasło w cudzysłowie i brak reakcji.

    Podoba mi się: Dobre 0 Słabe 0
  10. avatar zgnilec napisał(a):
    15 mar 2010 o godzinie 13:54

    mam ten sam problem, nie wykrywa folderu examples a jakiekolwiek zmiany wprowadzone do ~/.conkyrc są ignorowane. Również posiadam ubuntu 9.10. Jak miło że ktoś ze społeczności ubuntu pragnie pomóc początkującym użytkownikom linuxa

    Podoba mi się: Dobre 0 Słabe 0
  11. avatar Szmitas napisał(a):
    15 mar 2010 o godzinie 15:26

    Po prowadzonych zmianach musisz ponownie uruchomić conky, czyli w terminalu:

    killall conky && conky
    Podoba mi się: Dobre 0 Słabe 0

Dodaj komentarz


pięć + 3 =