Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Conky and Hibernation [solved]
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
fctk
Veteran
Veteran


Joined: 28 Jan 2004
Posts: 1424
Location: Milan, Italy, EU

PostPosted: Wed Feb 22, 2006 7:24 pm    Post subject: Conky and Hibernation [solved] Reply with quote

hello,

is there a way to stop conky before hibernation and to start it after resuming?

the script by which i start conky is named "conkystart" and is the following:

Code:
#!/bin/bash
conky -c /home/fctk/.conkyrc1
conky -c /home/fctk/.conkyrc2
conky -c /home/fctk/.conkyrc3
conky -c /home/fctk/.conkyrc4


i put:
Code:
OnSuspend 00 killall conky
OnResume 00 conkystart


in /etc/hibernate/ram.conf (i only use hibernate-ram), but when resuming i get:

Code:
Conky: can't open display:
Conky: can't open display:
Conky: can't open display:
Conky: can't open display:


what can i do?


Last edited by fctk on Thu Mar 02, 2006 1:42 pm; edited 1 time in total
Back to top
View user's profile Send private message
ppurka
Advocate
Advocate


Joined: 26 Dec 2004
Posts: 3256

PostPosted: Wed Feb 22, 2006 10:11 pm    Post subject: Reply with quote

It seems conky probably starts before the X server is initialized. So, you could try adding a sleep 20 after /bin/bash, so that the conky is started only after the X server resumes.
Back to top
View user's profile Send private message
drphibes
Guru
Guru


Joined: 30 Nov 2004
Posts: 432

PostPosted: Wed Feb 22, 2006 10:35 pm    Post subject: Re: Conky and Hibernation Reply with quote

or perhaps you merely need a DISPLAY var:

Code:
#!/bin/bash

DISPLAY=:0

conky -c /home/fctk/.conkyrc1
conky -c /home/fctk/.conkyrc2
conky -c /home/fctk/.conkyrc3
conky -c /home/fctk/.conkyrc4
Back to top
View user's profile Send private message
fctk
Veteran
Veteran


Joined: 28 Jan 2004
Posts: 1424
Location: Milan, Italy, EU

PostPosted: Thu Feb 23, 2006 7:15 pm    Post subject: Reply with quote

now conkystart looks like this:

Code:
#!/bin/bash

DISPLAY=":0.0"

sleep 20

conky -c /home/fctk/.conkyrc1
conky -c /home/fctk/.conkyrc2
conky -c /home/fctk/.conkyrc3
conky -c /home/fctk/.conkyrc4


but same error :cry:
Back to top
View user's profile Send private message
fctk
Veteran
Veteran


Joined: 28 Jan 2004
Posts: 1424
Location: Milan, Italy, EU

PostPosted: Thu Feb 23, 2006 7:28 pm    Post subject: Reply with quote

i also tried to put:
Code:
OnResume 00 sudo -u fctk conkystart

but nothing, same error.
Back to top
View user's profile Send private message
fctk
Veteran
Veteran


Joined: 28 Jan 2004
Posts: 1424
Location: Milan, Italy, EU

PostPosted: Wed Mar 01, 2006 6:58 pm    Post subject: Reply with quote

i fixed by putting:
Code:
export DISPLAY=":0.0"


anyway, there is another problem: i usually launch hibernation from an xterm, but in that way after resuming if i close the xterm conky is closed, too.

is there a way to avoid this?
Back to top
View user's profile Send private message
truc
Advocate
Advocate


Joined: 25 Jul 2005
Posts: 3199

PostPosted: Thu Mar 02, 2006 12:24 am    Post subject: Reply with quote

fctk wrote:
i fixed by putting:
Code:
export DISPLAY=":0.0"


anyway, there is another problem: i usually launch hibernation from an xterm, but in that way after resuming if i close the xterm conky is closed, too.

is there a way to avoid this?


Code:
 nohup yourscript &
should do it (close your term without ending conky


BTW To avoid exportint the DISPLAY, I think writing DISPLAY=:0.0 conky -c ... (onevery line) should work..
Back to top
View user's profile Send private message
fctk
Veteran
Veteran


Joined: 28 Jan 2004
Posts: 1424
Location: Milan, Italy, EU

PostPosted: Thu Mar 02, 2006 1:42 pm    Post subject: Reply with quote

thanks truc! now it works!

now in ram.conf i have:
Code:
OnResume 00 DISPLAY=:0.0 nohup conkystart &> /dev/null &


while conkystart looks like:
Code:
#!/bin/bash
conky -c /home/fctk/.conkyrc1
conky -c /home/fctk/.conkyrc2
conky -c /home/fctk/.conkyrc3
conky -c /home/fctk/.conkyrc4
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum