Results 1 to 6 of 6

Thread: need conky help

  1. #1
    Join Date
    Oct 2014
    Posts
    24

    Default need conky help

    Hello folks. for the life of me i cant figure out this conky program,

    i have everything set except one aspect.

    i want something to display either "online" or "offline" depending on the network status.
    so basically if it detects network connection then it displays the word "online"
    if not then it displays "offline"

    anybody got any ideas on this? also it has to be both capable with wireless or ethernet

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,402

    Default Re: need conky help

    Could you please at least tell which version of openSUSE you use?

    And a positive identification of yoour desktop environment (and version) is also nice.
    Henk van Velden

  3. #3
    Join Date
    Oct 2014
    Posts
    24

    Default Re: need conky help

    Quote Originally Posted by hcvv View Post
    Could you please at least tell which version of openSUSE you use?

    And a positive identification of yoour desktop environment (and version) is also nice.

    oh shoot sorry,

    im useing 13.1 and KDE4

  4. #4
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    27,254
    Blog Entries
    15

    Default Re: need conky help

    Hi
    You probably need to set the if_up_strictness (see http://conky.sourceforge.net/config_settings.html)

    So in your config before TEXT add;
    Code:
    if_up_strictness link
    Then after TEXT add something like;
    Code:
    ${if_existing /proc/net/route enp4s0}Ethernet: ONLINE
    ${else}
    ${if_existing /proc/net/route wlo1}Wireless: ONLINE
    ${else} OFFLINE
    ${endif}
    Note those are my two interface, you need to modify as required from /sbin/ifconfig
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  5. #5
    Join Date
    Oct 2014
    Posts
    24

    Default Re: need conky help

    Quote Originally Posted by malcolmlewis View Post
    Hi
    You probably need to set the if_up_strictness (see http://conky.sourceforge.net/config_settings.html)

    So in your config before TEXT add;
    Code:
    if_up_strictness link
    Then after TEXT add something like;
    Code:
    ${if_existing /proc/net/route enp4s0}Ethernet: ONLINE
    ${else}
    ${if_existing /proc/net/route wlo1}Wireless: ONLINE
    ${else} OFFLINE
    ${endif}
    Note those are my two interface, you need to modify as required from /sbin/ifconfig
    Hello malcolmlewis,

    thanks for the reply. this appears to work good if there is only 1 adapter present. unfortunately the computers will have 2 adapters present but only one connecting wither its wireless or wired. if it detects the ethernet is present but not connecting it reports offline even if wireless is working. any way around this? and unfortunately the wireless adapters will be different names as well im assuming because this will be put on diffent tyles of machines IE dell, lenovo, hp..is there a way to just get around all this?

  6. #6
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    27,254
    Blog Entries
    15

    Default Re: need conky help

    On Thu 23 Oct 2014 08:36:01 PM CDT, rady wrote:


    malcolmlewis;2670883 Wrote:
    > Hi
    > You probably need to set the if_up_strictness (see
    > http://conky.sourceforge.net/config_settings.html)
    >
    > So in your config before TEXT add;
    > >

    Code:
    --------------------
    > >

    > if_up_strictness link
    >

    --------------------
    > >

    > Then after TEXT add something like;
    > >

    Code:
    --------------------
    > >

    > ${if_existing /proc/net/route enp4s0}Ethernet: ONLINE
    > ${else}
    > ${if_existing /proc/net/route wlo1}Wireless: ONLINE
    > ${else} OFFLINE
    > ${endif}
    >

    --------------------
    > >

    > Note those are my two interface, you need to modify as required from
    > /sbin/ifconfig


    Hello malcolmlewis,

    thanks for the reply. this appears to work good if there is only 1
    adapter present. unfortunately the computers will have 2 adapters
    present but only one connecting wither its wireless or wired. if it
    detects the ethernet is present but not connecting it reports offline
    even if wireless is working. any way around this? and unfortunately the
    wireless adapters will be different names as well im assuming because
    this will be put on diffent tyles of machines IE dell, lenovo, hp..is
    there a way to just get around all this?


    Hi
    Change the 'link' to 'address', see the reference link

    I tested here with ethernet and wireless (as in two adapters), I'm
    guessing the change to address should fix it.

    You could also try if_up.

    You can configure the system back to the old naming method eg eth0 and
    wlan0 if required.

    --
    Cheers Malcolm °¿° LFCS, SUSE Knowledge Partner (Linux Counter #276890)
    openSUSE 13.1 (Bottle) (x86_64) GNOME 3.10.1 Kernel 3.11.10-21-desktop
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •