View previous topic :: View next topic |
Author |
Message |
fctk Veteran
Joined: 28 Jan 2004 Posts: 1424 Location: Milan, Italy, EU
|
Posted: Wed Feb 22, 2006 7:24 pm Post subject: Conky and Hibernation [solved] |
|
|
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 |
|
|
ppurka Advocate
Joined: 26 Dec 2004 Posts: 3256
|
Posted: Wed Feb 22, 2006 10:11 pm Post subject: |
|
|
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 |
|
|
drphibes Guru
Joined: 30 Nov 2004 Posts: 432
|
Posted: Wed Feb 22, 2006 10:35 pm Post subject: Re: Conky and Hibernation |
|
|
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 |
|
|
fctk Veteran
Joined: 28 Jan 2004 Posts: 1424 Location: Milan, Italy, EU
|
Posted: Thu Feb 23, 2006 7:15 pm Post subject: |
|
|
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 |
|
Back to top |
|
|
fctk Veteran
Joined: 28 Jan 2004 Posts: 1424 Location: Milan, Italy, EU
|
Posted: Thu Feb 23, 2006 7:28 pm Post subject: |
|
|
i also tried to put:
Code: | OnResume 00 sudo -u fctk conkystart |
but nothing, same error. |
|
Back to top |
|
|
fctk Veteran
Joined: 28 Jan 2004 Posts: 1424 Location: Milan, Italy, EU
|
Posted: Wed Mar 01, 2006 6:58 pm Post subject: |
|
|
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 |
|
|
truc Advocate
Joined: 25 Jul 2005 Posts: 3199
|
Posted: Thu Mar 02, 2006 12:24 am Post subject: |
|
|
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? |
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 |
|
|
fctk Veteran
Joined: 28 Jan 2004 Posts: 1424 Location: Milan, Italy, EU
|
Posted: Thu Mar 02, 2006 1:42 pm Post subject: |
|
|
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 |
|
|
|