[RESOLVED]: Conky seems to hang in terminal

Add functionality to your desktop
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
iamoraal
Level 2
Level 2
Posts: 81
Joined: Sun Jan 12, 2020 4:05 pm

[RESOLVED]: Conky seems to hang in terminal

Post by iamoraal »

I'm new to Linux and Conky. When modifying a Conky script and launching it via terminal, I noticed that the script never stops, I never get a new Command Prompt. I use ctrl+c to stop the script. (I normally have it launching at startup, this was just to do some editing). I commented out the weather and lunar scripts to see if they were the culprits; nope.
Just wondering:
1. is this normal behaviour or is there an issue with the script?
2. Is it " update_interval = 1.0" that's doing this?

Irvin.

Terminal output:

Code: Select all

irvin@irvin-Latitude-E6330:~$ killall conky
irvin@irvin-Latitude-E6330:~$ conky
conky: desktop window (3400029) is subwindow of root window (144)
conky: window type - desktop
conky: drawing to created window (0x3a00002)
conky: drawing to double buffer
Conky.config script:

Code: Select all

-- vim: ts=4 sw=4 noet ai cindent syntax=lua

conky.config = {
    alignment = 'top_right',
    background = false,
    border_width = 10,
    cpu_avg_samples = 2,
    default_color = 'EEE8AA',
    color1 = 'EEE8AA',
    default_outline_color = '440C38',
    default_shade_color = '7A999C',
    double_buffer = true,
    draw_borders = false,
    draw_graph_borders = false,
    draw_outline = false,
    draw_shades = false,
    use_xft = true,
    font = 'Fira Sans:normal:size=14',
    gap_x = 0,
    gap_y = 0,
    minimum_height = 1005,
    minimum_width = 275,
    maximum_width = 275,
    net_avg_samples = 2,
    no_buffers = true,
    out_to_console = false,
    out_to_stderr = false,
    extra_newline = false,
    own_window = true,
    own_window_class = 'Conky',
    own_window_transparent = false,
    own_window_argb_visual = true,
    own_window_argb_value = 0,
    own_window_type = 'desktop',
    stippled_borders = 0,
    update_interval = 1.0,
    uppercase = false,
    use_spacer = 'none',
    show_graph_scale = false,
    show_graph_range = false,
}
conky.text = [[

${alignc}${font :size=28} ${time %k:%M %p}${font}
${alignc}${font :size=18} ${time %d.%B.%Y}${font} 

# ${alignc}${execpi 1800 /etc/conky/weather.lua}
# ${alignc}${execpi 3600 /etc/conky/moonphase.lua}
]]
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 4 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Linux Mint 20 Ulyana, Cinnamon 4.6.6, iMac8.1, Intel Core2 Duo E8135
ajgreeny
Level 7
Level 7
Posts: 1656
Joined: Mon Nov 19, 2007 3:27 pm

Re: Conky seems to hang in terminal

Post by ajgreeny »

When you say "conky script" are you simply referring to the .conkyrc configuration file in your home or do you use another config file?

Does conky run OK when you start it from terminal?
Does conky close properly when you Ctrl+C in terminal to kill the running process?

Try starting it with command

Code: Select all

conky &
which should run it in the background and allow you to close the terminal without stopping conky.
iamoraal
Level 2
Level 2
Posts: 81
Joined: Sun Jan 12, 2020 4:05 pm

Re: Conky seems to hang in terminal

Post by iamoraal »

@ajgreeny:
When you say "conky script" are you simply referring to the .conkyrc configuration file in your home or do you use another config file?
No. The file is '/ect/conky/conky.config' .
Does conky run OK when you start it from terminal?
Yes. It runs through the whole config script at both startup and in terminal.
Does conky close properly when you Ctrl+C in terminal to kill the running process?
Yes. When starting through terminal, it does kill the process and and output to the screen disappears, and the prompt appears.
Linux Mint 20 Ulyana, Cinnamon 4.6.6, iMac8.1, Intel Core2 Duo E8135
User avatar
zcot
Level 9
Level 9
Posts: 2833
Joined: Wed Oct 19, 2016 6:08 pm

Re: Conky seems to hang in terminal

Post by zcot »

iamoraal wrote: Tue Feb 04, 2020 10:20 am
1. is this normal behaviour or is there an issue with the script?
2. Is it " update_interval = 1.0" that's doing this?

1. It's normal for conky. Some "scripts" or programs will do some action or return some data to the terminal, then they are done doing their job, and they end, and you come back to the prompt. Others just continue to run possibly forever, doing something. Conky is one of these. ajgreeny mentions how to "background" or "detach" a process this way.

2. update interval tells conky how often to run. Conky just runs through the script and will wait to run through it again and again base on this interval. In this case it does run every second.
Locked

Return to “Compiz, Conky, Docks & Widgets”