WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: conky error: can't find display - what causes this?  (Read 5781 times)

Offline bigpcman

  • Hero Member
  • *****
  • Posts: 719
conky error: can't find display - what causes this?
« on: August 12, 2009, 06:50:00 PM »
tc2.2 eeepc 900a
Just tried out conky.tce and received the following error:
Conky: can't open display:

Here's my .conkyrc as copied from http://forum.tinycorelinux.net/index.php?topic=613.msg4216#msg4216

Code: [Select]
# Conky, a system monitor, based on torsmo
# $Id: conky.conf 1193 2008-06-21 20:37:58Z ngarofil $

alignment top_right
background yes
border_width 1
cpu_avg_samples 2
default_color white
default_outline_color white
default_shade_color black
draw_borders no
draw_graph_borders yes
draw_outline no
draw_shades no
font 6x10
gap_x 5
gap_y 25
minimum_size 5 5
net_avg_samples 2
no_buffers yes
out_to_console yes
own_window no
stippled_borders 0
update_interval 3.0
uppercase no
use_spacer no
show_graph_scale no
show_graph_range no
#own_window_class Conky
#own_window_type normal
#${scroll 16 $nodename - $sysname $kernel on $machine | }

TEXT
$color $nodename - $sysname $kernel on $machine
$hr
$color System:
$color Time:$color $uptime
$color Battery:$color ${battery BAT1}
$color RAM:$color $mem/$memmax - $memperc%
${membar 4}
$color Swap:$color $swap/$swapmax - $swapperc% ${swapbar 4}
$color CPU:$color $cpu% ${cpubar 4}
$hr
$color Wireless:
$color wireless essid:$color ${wireless_essid ath0}
$color wireless quality:$color ${wireless_link_bar 4 ath0}
$color wireless quality%:$color ${wireless_link_qual_perc ath0} %
$color Up:$color ${upspeed ath0} k/s $color - Down:$color ${downspeed ath0} k/s
$color Totalup:$color ${totalup ath0}
$color Totaldown:$color ${totaldown ath0}
$hr
« Last Edit: August 12, 2009, 07:46:18 PM by bigpcman »
big pc man

Offline dentonlt

  • Sr. Member
  • ****
  • Posts: 318
    • the trombone analog
Re: conky error: can't find display - what causes this?
« Reply #1 on: December 04, 2009, 03:48:38 AM »
It doesn't look like anyone answered! I had this same problem.

If Conky starts before X, then there is no display for conky to use. Calling conky from /opt/bootlocal.sh causes this error because .xsession hasn't run yet, so there is no display.

It is possible to call conky from the end of .xsession file. This what I do, but I would prefer another solution.

I have tried deferring conky startup from within bootlocal.sh:

Code: [Select]
#in bootlocal:

deferconky() {
sleep 10
conky &
}

[ -f /usr/local/bin/conky ] && deferconky &

but conky still didn't notice the active display. I remain with .xsession for now.
« Last Edit: December 04, 2009, 03:55:39 AM by dentonlt »

Offline jls

  • Hero Member
  • *****
  • Posts: 2135
Re: conky error: can't find display - what causes this?
« Reply #2 on: December 04, 2009, 04:07:51 AM »
I have this line in ~/.xsession:
Code: [Select]
conky -dattached there is my ~/.conkyrc
dCore user

Offline dentonlt

  • Sr. Member
  • ****
  • Posts: 318
    • the trombone analog
Re: conky error: can't find display - what causes this?
« Reply #3 on: December 04, 2009, 04:34:59 AM »
jls: as far as I can tell "conky -d" and "conky &" function the same ... yes?

Offline OldAdamUser2

  • Full Member
  • ***
  • Posts: 199
Re: conky error: can't find display - what causes this?
« Reply #4 on: December 04, 2009, 06:35:07 AM »
I can't get conky to start from .xsession at all. I have to wait until the gui is up, open a terminal, and start it that way.

Offline jls

  • Hero Member
  • *****
  • Posts: 2135
Re: conky error: can't find display - what causes this?
« Reply #5 on: December 04, 2009, 09:22:48 AM »
at the end of  xsession
dCore user