[SOLVED]Upgrade broke Conky & how to update/upgrade?

Forum rules
Before you post please read how to get help

[SOLVED]Upgrade broke Conky & how to update/upgrade?

Postby phredbull on Thu May 05, 2011 7:30 pm

After upgrading my Mint XFCE setup, my Conky, which previously looked like this:
ConkyScreenshot.png
ConkyScreenshot.png (455.38 KiB) Viewed 1544 times

now looks like this:
ConkyBrokenBG.png
ConkyBrokenBG.png (455.85 KiB) Viewed 1544 times

The backgrounds are made with .lua, here's the script:
Code: Select all
--[[    Background by londonali1010 (2009)
    VinDSL Background Hack (2010-2011)

This script draws a background to the Conky window. It covers the whole of the Conky window, but you can specify rounded corners, if you wish.

To call this script in Conky, use (assuming you have saved this script to ~/Scripts/):
    lua_load ~/Scripts/draw_bg.lua
    lua_draw_hook_pre draw_bg

Changelog:
    + v3.0    VinDSL Hack (01.28.2011) Killed memory leak.
    + v2.4    VinDSL Hack (01.25.2011) Declared all variables in local.
    + v2.3    VinDSL Hack (12.31.2010) Added shading example(s).
    + v2.2    VinDSL Hack (12.30.2010) Cleaned up the code a bit.
    + v2.1    VinDSL Hack (12.24.2010) Added cairo destroy function(s).
    + v2.0    VinDSL Hack (12.21.2010) Added height adjustment variable.
    + v1.0    Original release (07.10.2009)

]]

--------------START OF PARAMETERS ------------
-- Change these settings to affect your background:

-- "corner_r" is the radius, in pixels, of the rounded corners. If you don't want rounded corners, use 0.

    local corner_r = 8

-- Set the colour and transparency (alpha) of your background (0.00 - 0.99).

--    (Light Shading Example)
--    local bg_colour = 0x4d4d4d
--    local bg_alpha = 0.50

--    (Medium Shading Example)
--    local bg_colour = 0x222222
--    local bg_alpha = 0.50

--    (Dark Shading Example)
--    local bg_colour = 0x000000
--    local bg_alpha = 0.50

    local bg_colour = 0xd2d2d2
    local bg_alpha = .4

-- Tweaks the height of your background, in pixels. If you don't need to adjust the height, use 0.

--    (Default Setting)
--    local vindsl_hack_height = 0

    local vindsl_hack_height = -12
---------------END OF PARAMETERS -------------

require 'cairo'
local    cs, cr = nil

local function rgb_to_r_g_b(colour,alpha)
    return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
    end

function conky_draw_bg()
    if conky_window == nil then return end
    if cs == nil then cairo_surface_destroy(cs) end
    if cr == nil then cairo_destroy(cr) end
    local w = conky_window.width
    local h = conky_window.height
    local v = vindsl_hack_height
    local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
    local cr = cairo_create(cs)
   
    cairo_move_to(cr,corner_r,0)
    cairo_line_to(cr,w-corner_r,0)
    cairo_curve_to(cr,w,0,w,0,w,corner_r)
    cairo_line_to(cr,w,h+v-corner_r)
    cairo_curve_to(cr,w,h+v,w,h+v,w-corner_r,h+v)
    cairo_line_to(cr,corner_r,h+v)
    cairo_curve_to(cr,0,h+v,0,h+v,0,h+v-corner_r)
    cairo_line_to(cr,0,corner_r)
    cairo_curve_to(cr,0,0,0,0,corner_r,0)
    cairo_close_path(cr)

    cairo_set_source_rgba(cr,rgb_to_r_g_b(bg_colour,bg_alpha))
    cairo_fill(cr)

    cairo_surface_destroy(cs)
    cairo_destroy(cr)
    end

and it's implementation in one of the Conky configs:
Code: Select all
conky configuration

# set to yes if you want Conky to be forked in the background
background yes

# Use Xft?
use_xft yes
xftfont Sawasdee:bold:size=8
text_buffer_size 2048
xftalpha 1.0

# Print everything to console?
out_to_console no

# mail spool
#mail_spool $MAIL

# Update interval in seconds
update_interval 600

# This is the number of times Conky will update before quitting.
# Set to zero to run forever.
total_run_times 0

# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type override
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_transparent yes

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# Draw shades?
draw_shades yes

# Draw outlines?
draw_outline no

# Draw borders around text?
draw_borders no

# Stippled borders?
stippled_borders no

# border margins
border_inner_margin 1

# border width
border_width 0

# Default colors and also border colors
default_color 000000
color1 7a7a7a
color2 9a9a9a
color3 81c53c
color4 6571a8
color5 8480c2
color6 b980c2
color7 ad6a9f
color8 866aad
default_shade_color cbe5b3
default_outline_color 05110d

# Minimum size of text area
minimum_size 256
maximum_width 256

# Text alignment, other possible values are commented
alignment top_left
#alignment top_right
#alignment bottom_left
#alignment bottom_right

# Gap between borders of screen and text
# same thing as passing -x at command line
gap_x 36
gap_y 96

# Subtract file system buffers from used memory?
no_buffers yes

# set to yes if you want all text to be in uppercase
uppercase no

# number of cpu samples to average
# set to 1 to disable averaging
cpu_avg_samples 1

# number of net samples to average
# set to 1 to disable averaging
net_avg_samples 1

# Force UTF8? note that UTF8 support required XFT
override_utf8_locale yes

# Add spaces to keep things from moving about?  This only affects certain objects.
use_spacer yes

# load .lua background script
lua_load ~/Scripts/draw_bg.lua
lua_draw_hook_pre draw_bg

# stuff after 'TEXT' will be formatted on screen

TEXT
${voffset -2}${font Sawasdee:bold:size=12}${color1}weather ${hr 2}${font}
${execpi 1800 conkyForecast --location=USIL0228 --template=~/Scripts/conkyForecast}

Any idea how to make Conky display properly again?

On a related note, how should I be dealing with updates and upgrades? I generally install all updates, (level 1-3), and for Upgrade Behavior in Synaptic, I have "always choose the highest version" selected, which was the default, and have thus far applied all upgrades, resulting in this latest breakage/regression. This is my first Debian/rolling distro experience, so I'm not sure what the best way to deal w/this is.
:(
Last edited by phredbull on Sun May 08, 2011 4:03 pm, edited 1 time in total.
Apple iMac, Core2Duo 2.0gHz, 3gb, ATI Radeon Mobility X1600
-Mint Nadia Cinnamon
-Mac OSX 10.5.8
Compaq Evo N610c, P4M 2.8gHz, 7688mb, ATI Radeon m7500
-LMDE XFCE
-Mint Katya Gnome
-Windoze XP
Ext. HD
-Mint Isadora Fluxbox
USB stick
-#! Statler
User avatar
phredbull
Level 1
Level 1
 
Posts: 42
Joined: Wed Dec 01, 2010 8:55 pm
Location: Chicago, IL, USA

Linux Mint is funded by ads and donations.
 

Re: Upgrade broke Conky & how to update/upgrade?

Postby aljoriz on Thu May 05, 2011 7:40 pm

If via MintUpdate:
make sure you have all levels check form Level 1-5. You can check it under the preference.

If via terminal:
Code: Select all
sudo apt-get update && sudo apt-get dist-upgrade


As you can see the conky transparency is enable but it uses the default wallpaper, I'm still looking for a solution for the conky.
aljoriz
Level 4
Level 4
 
Posts: 269
Joined: Wed Dec 23, 2009 12:50 pm
Location: Cebu City, Philippines

Re: Upgrade broke Conky & how to update/upgrade?

Postby phredbull on Thu May 05, 2011 7:52 pm

aljoriz wrote:If via MintUpdate:
make sure you have all levels check form Level 1-5.

Really? Is this good advice? :?
Apple iMac, Core2Duo 2.0gHz, 3gb, ATI Radeon Mobility X1600
-Mint Nadia Cinnamon
-Mac OSX 10.5.8
Compaq Evo N610c, P4M 2.8gHz, 7688mb, ATI Radeon m7500
-LMDE XFCE
-Mint Katya Gnome
-Windoze XP
Ext. HD
-Mint Isadora Fluxbox
USB stick
-#! Statler
User avatar
phredbull
Level 1
Level 1
 
Posts: 42
Joined: Wed Dec 01, 2010 8:55 pm
Location: Chicago, IL, USA

Re: Upgrade broke Conky & how to update/upgrade?

Postby jeffreyC on Thu May 05, 2011 8:11 pm

Mint Update is really made for Ubuntu where it is more dangerous to do all updates.
In Debian if you do not do all updates you will find breakages due to packages needing dependencies which are not there or too old.
Get Dropbox and an extra 250 mb http://db.tt/wAizqw0
jeffreyC
Level 4
Level 4
 
Posts: 318
Joined: Mon Jun 07, 2010 9:34 pm

Re: Upgrade broke Conky & how to update/upgrade?

Postby phredbull on Thu May 05, 2011 10:58 pm

@jeffreyC: So you are also saying that I should enable level 1-5 updates? And that I should apply all available upgrades as well? I know that MintUpdate was designed for Ubuntu based distros, but I'm new to Debian base, so I have lots of questions, for example;
-What happens if an upgrade breaks your system? AFAIK, you can't roll back to old packages, so are you just screwed 'til an update fixes your broken packages?
-And I actually like how Mint XFCE ran OOTB, in that case, should I ignore all updates and upgrades? Or should I just apply updates, but not upgrades?

I wish there were a "Guide to Debian for Ubuntu Users!"
Apple iMac, Core2Duo 2.0gHz, 3gb, ATI Radeon Mobility X1600
-Mint Nadia Cinnamon
-Mac OSX 10.5.8
Compaq Evo N610c, P4M 2.8gHz, 7688mb, ATI Radeon m7500
-LMDE XFCE
-Mint Katya Gnome
-Windoze XP
Ext. HD
-Mint Isadora Fluxbox
USB stick
-#! Statler
User avatar
phredbull
Level 1
Level 1
 
Posts: 42
Joined: Wed Dec 01, 2010 8:55 pm
Location: Chicago, IL, USA

Re: Upgrade broke Conky & how to update/upgrade?

Postby aljoriz on Fri May 06, 2011 2:46 am

4. How does LMDE compare to the Ubuntu-based editions?

Pros:

You don’t need to ever re-install the system. New versions of software and updates are continuously brought to you.
It’s faster and more responsive than Ubuntu-based editions.
Cons:

Although it’s using Romeo for unstable packages, LMDE continuously changes as it receives updates and new software. Compared to a frozen version of Linux Mint which changes very little once it’s publicly released, it’s not as stable. Things are likely to break more often but fixes can also come quicker. For this reason, LMDE requires a deeper knowledge and experience with Linux, dpkg and APT.
Debian is a less user-friendly/desktop-ready base than Ubuntu. Expect some rough edges.

******
the suggested way is to update via terminal. Granted some updates may end up breaking the system specially if you have installed proprietary drivers for video cards, as you have it resets the xorg.conf file back to default.

Most issues with updates merely lie with bugs and not really breaking the system per se; the vlc bug comes to my mind.

as jeffreyC stated: not upgrading all packages is dangerous as new software may require dependencies.

For further reading may I recommend the LMDE breakages page1 is very helpful http://forums.linuxmint.com/viewtopic.php?f=141&t=67502

I have read some post about breakages only to have them realize their worries were caused by not updating and upgrading all the necessary packages.
aljoriz
Level 4
Level 4
 
Posts: 269
Joined: Wed Dec 23, 2009 12:50 pm
Location: Cebu City, Philippines

Re: Upgrade broke Conky & how to update/upgrade?

Postby jeffreyC on Fri May 06, 2011 4:17 pm

Yes, you should enable all 5 levels of update-upgrades.
Many people suggest using the terminal to update-upgrade, I use Synaptic, it gives more information than the Ubuntu type update managers.
The Ubuntu type set up is for people coming from Windows, who might be alarmed by seeing what is going on under the hood. :lol:
Welcome to Debian. :D
Get Dropbox and an extra 250 mb http://db.tt/wAizqw0
jeffreyC
Level 4
Level 4
 
Posts: 318
Joined: Mon Jun 07, 2010 9:34 pm

Re: Upgrade broke Conky & how to update/upgrade?

Postby phredbull on Fri May 06, 2011 5:38 pm

Thanks for the replies.
I've learned that MintUpdate is really meant for Ubuntu-based distros, so I won't use it anymore, and will deal w/\updates in Synaptic. I have Upgrade Behavior set to "highest version", testing repos and Backports enabled, but not Romeo.

EDIT: Conky fixed by changing own_window_type to "desktop" and adding own_window_argb_visual yes.
:mrgreen:
Apple iMac, Core2Duo 2.0gHz, 3gb, ATI Radeon Mobility X1600
-Mint Nadia Cinnamon
-Mac OSX 10.5.8
Compaq Evo N610c, P4M 2.8gHz, 7688mb, ATI Radeon m7500
-LMDE XFCE
-Mint Katya Gnome
-Windoze XP
Ext. HD
-Mint Isadora Fluxbox
USB stick
-#! Statler
User avatar
phredbull
Level 1
Level 1
 
Posts: 42
Joined: Wed Dec 01, 2010 8:55 pm
Location: Chicago, IL, USA

Linux Mint is funded by ads and donations.
 

Return to Compiz, Conky, Docks, & Widgets

Who is online

Users browsing this forum: No registered users and 1 guest