! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
xfce4-notifyd-0.2.4 - theme colors change
Status:
RESOLVED: WONTFIX
Product:
Xfce4-notifyd
Component:
general

Comments

Description XfceBugs 2017-10-13 08:39:57 CEST
Created attachment 7362 
gtkrc

Hello,

I'm running Slackware 14.2 x64 with only Openbox 3.6.1, below are specs related to xfce4-notifyd

gtk+2-2.24.31
libxfce4ui 4.12.1
libxfce4util 4.12.1
xfconf 4.12.0
xorg-server-1.18.3
nvidia-driver-375.66 - for gtx1060

The problem I've been running into since last year that I also noticed in Slackware 14.1, is that sometimes when my notification pops up on the desktop all the color is gone and it just appears white, then I have to log out of X and back in, and then it reappears normal.

This has been going on for over a year and I've never really considered dealing with it till now.

I understand this is an older version of xfce4-notifyd, and that the Xfce team has better things then to work on older software, so I am not really looking for a fix to xfce4-notifyd, unless it should be done.

For now all I'm hoping is that someone can show, or tell me how to fix this, if possible?

I'm hoping maybe there's something wrong in the theme causing this, and that's all this is.

I place the theme paths like this;

~/.themes/Blue/xfce-notify-4.0/gtkrc

I'm attaching the theme I'm using.


THANKS
Comment 1 XfceBugs 2017-10-13 09:30:21 CEST
I should of taken the 'Smoke' theme and tried it out before reporting this.

So I edited the Smoke theme slightly to change it to a color I like and added a few options, this is how that theme looks now, and if I have any problems with this, I'll report back...

THANKS


style "blue-window"
{
    bg[NORMAL] = "#1c3a56"
    XfceNotifyWindow::border-color = "#2d2d2d"
    XfceNotifyWindow::border-color-hover = "#333333"
    XfceNotifyWindow::border-radius = 1.0
    XfceNotifyWindow::border-width = 1.0
    XfceNotifyWindow::border-width-hover = 1.0
}
class "XfceNotifyWindow" style "blue-window"

style "blue-button"
{
    bg[NORMAL] = "#242f3a"
    bg[PRELIGHT] = "#3d3d3d"
    fg[NORMAL] = "#ffffff"
    fg[PRELIGHT] = "#ffffff"
}
widget_class "XfceNotifyWindow.*.GtkButton*" style "blue-button"

style "blue-text"
{
    fg[NORMAL] = "#ffffff"
    GtkWidget::link-color = "#5294e2"
}
widget_class "XfceNotifyWindow.*.<GtkLabel>" style "blue-text"

style "blue-summary"
{
    font_name = "Bold"
}
widget "XfceNotifyWindow.*.summary" style "blue-summary"
Comment 2 Simon Steinbeiss editbugs 2017-10-15 22:07:39 CEST
Ok, thanks for looking into this yourself!
Comment 3 Simon Steinbeiss editbugs 2017-10-16 23:10:19 CEST
Closing - feel free to re-open if you think there's something left to clarify.
Comment 4 XfceBugs 2017-10-17 00:22:08 CEST
Hi Simon,

Well I took the Smoke theme as I mentioned and just edited it a little, and added a few options, did you look at this theme by chance?

I'm assuming that this should be ok, and it should work ok?

But has there been any issue like this in the past with 0.2.4, the theme changing colors and needing to be restarted to work normal again?

Thanks
Comment 5 Simon Steinbeiss editbugs 2017-10-17 20:43:34 CEST
Hi,

yes I presume that should work. However please note that I only took maintainership of notifyd after the port to Gtk3 and the version you are using still relies on Gtk2. While I remember theming Gtk2 from back in the day I haven't touched an actual theme with a ten-foot-pole in years...
If the colors change then that could either be a bug in Gtk+ itself or in xfce4-notifyd, but unlikely that it would be related to your theme at all.

Also note that xfce4-notifyd exits after 10mins of inactivity and then is restarted, so this could lead to both the theme troubles or them going away... (hard to say)

Cheers
Comment 6 XfceBugs 2017-10-18 04:22:43 CEST
What do you mean it exits after 10mins of inactivity and then restarted?

What the background daemon, dies after 10 mins and then restarts again?

Because I thought this alway has a daemon running in the background?

Thanks
Comment 7 Simon Steinbeiss editbugs 2017-10-22 16:59:00 CEST
Yes, the daemon exited after 10 mins of no notifications being sent and was then auto-launched when the next subsequent notification was sent.
This is the commit where I removed that behavior:
https://git.xfce.org/apps/xfce4-notifyd/commit/?id=d87a4a93b2ec4ab094f5a35ae818395f750f2891
Comment 8 XfceBugs 2017-10-26 01:29:24 CEST
Will this patch work with xfce4-notifyd-0.2.4?

Thanks
Comment 9 Simon Steinbeiss editbugs 2017-10-26 21:47:10 CEST
I don't know if it will apply cleanly but I see a good chance that it will work, yes.
Comment 10 XfceBugs 2017-10-27 03:32:35 CEST
Hi Simon,

I tried applying the patch and it failed;

This is what it gave me at the terminal;

patching file xfce4-notifyd/xfce-notify-daemon.c
Hunk #1 succeeded at 62 (offset -16 lines).
Hunk #2 FAILED at 116.
Hunk #3 FAILED at 395.
Hunk #4 FAILED at 501.
Hunk #5 succeeded at 849 with fuzz 2 (offset -103 lines).
Hunk #6 FAILED at 1207.
Hunk #7 FAILED at 1340.
Hunk #8 succeeded at 1024 with fuzz 2 (offset -354 lines).
Hunk #9 FAILED at 1400.
6 out of 9 hunks FAILED -- saving rejects to file xfce4-notifyd/xfce-notify-daemon.c.rej

I'm attaching the xfce-notify-daemon.c.rej

Simon, I know you at the Xfce team have better things to do then work on an outdate piece of source, but that is the world of Slackware, slow to move, which I do really appreciate, Pat does a great job of keeping his Slackware going, nice and stable!

If you have the time, could you please possibly try to get this patch to work with xfce4-notifyd-0.2.4? And I will do my best to help if you need any.

Thank you Simon, your consideration is greatly appreciated, this issue has been haunting me for several years in Slackware.
Comment 11 XfceBugs 2017-10-27 03:34:23 CEST
Created attachment 7390 
xfce-notify-daemon.c.rej
Comment 12 XfceBugs 2017-10-28 05:33:50 CEST
I forgot to mention, that when I first log into X and I then get a popup notification for the first time, I will then see it appearing sometimes incorrect, so I'm not seeing how this daemon sleeping and restaring is coming into play in this instance, because I'm logging into X, starting the dameon and then doing something that calls for the notification right away, just after the dameon has started.

So in the Openbox ~/.config/openbox/autostart.sh I have this listed to start it when Openbox starts;

/usr/lib64/xfce4/notifyd/xfce4-notifyd &

Then the other day, once I logged in, I started OpenVPN, which becomes a little involved, so I will explain.

I have a Launcher in the tint2 launcher section for OpenVPN which appears in the tint2 config like this;

~/.config/tint2/tint2rc;

launcher_item_app = /home/foo/.local/share/applications/openvpn.desktop

Next this openvpn.desktop file;

[Desktop Entry]
Encoding=UTF-8
Name=OpenVPN
GenericName=OpenVPN
Type=Application
Categories=Network;
Terminal=false
Icon=/home/foo/.icons/AwOken/clear/128x128/apps/openvpn.png
Exec=/home/foo/.config/openbox/openvpn.sh

Next as you noticed in the 'Exec=' line the openvpn.sh

~/.config/openbox/openvpn.sh (This is bash script that creates a bash gui like Zenity, but this is from Yad I am using, if you know Yad)...

#!/bin/bash

function confirm_close () {
    yad --title="OpenVPN Shutdown" --window-icon="/home/foo/.icons/AwOken/clear/128x128/apps/openvpn.png" \
	--center --width="360" --height="100" --image="dialog-question" \
	--text="Click 'OK' To Shutdown OpenVPN\nClick 'Cancel' to Keep OpenVPN Running"
    [[ $? -eq 0 ]] && kill -USR1 $YAD_PID
}
export -f confirm_close

sudo -b openvpn --config /etc/openvpn/openvpn.conf | \
    yad --fontname="Noto Sans 9" --text-info --wrap --fore="#ababab" --back="#264d74" --button="Close:bash -c confirm_close" \
    --center --width="700" --height="450" --title="OpenVPN" \
    --window-icon="/home/foo/.icons/AwOken/clear/128x128/apps/openvpn.png"

[[ $? -eq 0 ]] && sudo killall openvpn 2>/dev/null


In that script you will have noticed this line;

sudo -b openvpn --config /etc/openvpn/openvpn.conf

Next I have /etc/openvpn/openvpn.conf which I use the update-resolv-conf, these are the two lines out of my openvpn.conf that call this;

# Push DNS from server
up /etc/openvpn/update-resolv-conf
down /etc/openvpn/update-resolv-conf

And finally we reach update-resolv-conf where I call xfce4-notifyd-0.2.4 from, but through notify-send to give me the xfce notifications...

Because when I start X and log in and start Openvn maybe the second I log in, again I don't get the daemon sleeping aspect, because it just started and I'm calling it within a few minutes of starting, and many times when I go through the same steps it's not always happening, this just happens intermittently...

I'm going to attach the update-resolv-conf so you can see how I call this, and maybe through all these steps is the reason I see this crapping out and the theme color goes funny, but to be honest, I'm not sure how all these things is causing the problem.
Comment 13 XfceBugs 2017-10-28 05:34:59 CEST
Created attachment 7394 
update-resolv-conf
Comment 14 XfceBugs 2017-10-28 05:35:43 CEST
Sorry please reopen...

THANKS
Comment 15 Simon Steinbeiss editbugs 2017-11-03 00:41:33 CET
> I forgot to mention, that when I first log into X and I then get a popup notification for the first time, I will then see it appearing
> sometimes incorrect, so I'm not seeing how this daemon sleeping and restaring is coming into play in this instance, because I'm
> logging into X, starting the dameon and then doing something that calls for the notification right away, just after the dameon has 
> started.

While notifyd may be fully started xfsettingsd (which applies the Gtk+ theme) may not be and that's why they sometimes look "incorrect". You'd need proper session management where services depend (and wait) on each other, which is not the case in Xfce at the moment.

Whether or not the daemon exits and restarts is hard to tell as there are no logs where this would be recorded.
I'm not shocked that you cannot cleanly apply the commit/patch, you'd have to do this by hand - i.e. line by line - (same for me) for 0.2.4.
Comment 16 XfceBugs 2017-11-07 03:36:34 CET
I'm using Openbox, so not so sure if I have it setup correct for proper session management.

This is how I start it in .xinitrc;

if [ -z "$DESKTOP_SESSION" -a -x /usr/bin/ck-launch-session ]; then
  exec ck-launch-session dbus-launch --sh-syntax --exit-with-session openbox-session
else
  exec openbox-session
fi


So it looks like the patch is only patching xfce-notify-daemon.c...

I'm assuming when you meant by hand is that this patch for a different version, and all I have to do is just track down these section in xfce-notify-daemon.c for 0.2.4?

Thanks
Comment 17 Simon Steinbeiss editbugs 2017-11-09 22:55:45 CET
Indeed, the relevant code hasn't changed, so you just need to track down these lines and remove them.

Can't tell you much about Openbox session management/setup, haven't used it in too long.
Comment 18 XfceBugs 2017-11-26 04:58:41 CET
Something I've been thinking about, maybe this is the issue...

In the $HOME ~/.cache there's this file;

xfce4-notifyd-theme.rc

Which shows the theme and path being loaded;

include "/home/foo/.themes/Blue/xfce-notify-4.0/gtkrc"

I use bleachbit to clean out the cache and in the past without considering this file I removed it, but since running into this issue and trying to resolve it, I have recently added the file to the whitelist to not have it deleted out of the cache, and I'm not sure if it's just coincidence, but I'm not seeing this problem now.

So could the removal of this file from the cache be causing this?

Also even though I have it whitelisted, and I no longer delete it, I find it just disappears on it's own, so what would be causing this?

Hmm
Comment 19 Simon Steinbeiss editbugs 2017-12-04 20:54:40 CET
I don't remember how this was handled in 0.2.4, I presume the maintainer at the time completely got rid of the rc file with porting to xfconf.

Sorry, with 0.2.4 you're really on your own, it's been more than 4 years since that release...
Comment 20 XfceBugs 2017-12-09 01:58:09 CET
No problem it seems to be doing good for now.

But one thing if anyone knows, sometimes I notice in the ~/.cache the xfce4-notifyd-theme.rc file disappears and I'm not removing/deleting it. Before I was cleaning out the cache, and was thinking if this file was not deleted, maybe it would fix my problem, so far it seems to be working.

But I can't figure out what causes it to disappear sometimes, meaning I look inside the cache directory and it's gone....

Hmm

Bug #13918

Reported by:
XfceBugs
Reported on: 2017-10-13
Last modified on: 2017-12-09

People

Assignee:
Simon Steinbeiss
CC List:
0 users

Version

Version:
unspecified

Attachments

gtkrc (1.75 KB, application/octet-stream)
2017-10-13 08:39 CEST , XfceBugs
no flags
xfce-notify-daemon.c.rej (2.94 KB, text/x-reject)
2017-10-27 03:34 CEST , XfceBugs
no flags
update-resolv-conf (1.58 KB, application/octet-stream)
2017-10-28 05:34 CEST , XfceBugs
no flags

Additional information