LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-14-2022, 08:09 PM   #1
jmccue
Member
 
Registered: Nov 2008
Location: US
Distribution: slackware
Posts: 874
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Current - notify-send with fvwm (or any WM)


Hi all,

I moved to Current today performing a full install, fully replacing Slackware 14.2. I also searched LQ Slackware and Google without luck.

I noticed this issue with notify-send.

1. When I 'startx' for fvwm, notify-send fails to show a message. This also prevents nm-applet from prompting its status and it causes nm-applet to take longer to show up in the tray (stalonetray)

2. When I 'startx' for xfce, notify-send and nm-applet works as expected with nm-applet appearing quickly.

Is there a setting I need ?

I see this in /var/message:
Quote:
Jan 14 20:40:13 jmclin1 dbus-daemon[7646]: [session uid=0 pid=7644] Activating service name='org.freedesktop.Notifications' requested by ':1.0' (uid=0 pid=7640 comm="notify-send HI ")

all dbus processes:
Quote:
1271 /usr/bin/dbus-daemon --system 0.0 0.0 messagebus
5602 dbus-launch --exit-with-session /usr/bin/startfvwm2 0.0 0.0 jmccue
5603 /usr/bin/dbus-daemon --syslog --fork --print-pid 5 --p 0.0 0.0 jmccue
5727 /usr/bin/dbus-daemon --config-file=/usr/share/defaults 0.0 0.0 jmccue
7928 grep dbus 0.0 0.0 jmccue
and $DBUS_SESSION_BUS_ADDRESS has this value:
Quote:
unix:abstract=/tmp/dbus-roh9ZaR43A,guid=622721f6e6085fe4659f390961e21dd4
Thanks
John

Last edited by jmccue; 01-14-2022 at 08:10 PM. Reason: adjusted fmt
 
Old 01-14-2022, 09:27 PM   #2
Mechanikx
Member
 
Registered: Jul 2018
Posts: 494

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
In order to use notify-send you need a notification server. DE's like xfce have one but WM's (at least the ones I've used) don't. I use notification-daemon (there are others) which is available from slackbuilds.org or ponce's repo. I have this line in my .xinitrc to start the daemon:

Quote:
/usr/libexec/notification-daemon &
 
2 members found this post helpful.
Old 01-14-2022, 11:17 PM   #3
khronosschoty
Member
 
Registered: Jul 2008
Distribution: Slackware
Posts: 648
Blog Entries: 2

Rep: Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514
I use dunst with my windows manager.

https://slackbuilds.org/repository/1.../?search=dunst
 
1 members found this post helpful.
Old 01-15-2022, 06:22 AM   #4
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,574

Rep: Reputation: 2847Reputation: 2847Reputation: 2847Reputation: 2847Reputation: 2847Reputation: 2847Reputation: 2847Reputation: 2847Reputation: 2847Reputation: 2847Reputation: 2847
This thread has alternative solutions that do not require any package additions.
 
2 members found this post helpful.
Old 01-15-2022, 07:42 AM   #5
jmccue
Member
 
Registered: Nov 2008
Location: US
Distribution: slackware
Posts: 874

Original Poster
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Thanks allend

Starting
/usr/lib64/xfce4/notifyd/xfce4-notifyd
corrected the issue.

I am marking this solved.

John
 
Old 01-21-2022, 06:24 PM   #6
ethelack
Member
 
Registered: Mar 2021
Location: New Zealand
Distribution: Slackware
Posts: 92

Rep: Reputation: Disabled
Quote:
Originally Posted by Mechanikx View Post
In order to use notify-send you need a notification server. DE's like xfce have one but WM's (at least the ones I've used) don't. I use notification-daemon (there are others) which is available from slackbuilds.org or ponce's repo. I have this line in my .xinitrc to start the daemon:

/usr/libexec/notification-daemon &
Hi Mechanikx, thanks for your tip I have been looking at notify-send for the last few days.
Using fvwm and fluxbox have put the notification-daemon command at the bottom of .xinitrc but the daemon is not starting.

Any advice about where in .xinitrc you put the command to start the notification daemon with your window manager would be much appreciated.

I have figured out two ways to get the daemon to autostart and display a message in fvwm. One is to create the file "/usr/share/dbus-1/services/org.freedesktop.Notifications.service" to start the daemon for the notify-send message in my fvwm config.

Code:
[D-BUS Service]
Name=org.freedesktop.Notifications
Exec=/usr/libexec/notification-daemon
The other is to start the daemon from my ~/.fvwm/config file with a short sleep to allow notify-send time to send a message.

Code:
Exec /usr/libexec/notification-daemon &

Exec sleep 1 && notify-send "Connection status" "$(nmcli d | grep ' connected')" && notify-send "Disk space" "$(df -h | grep -e '/root' -e 'efi' -e '/home')"
Have also tried dunst which has the advantage it autostarts its notification server on notify-send request.

Last edited by ethelack; 01-21-2022 at 06:39 PM.
 
Old 01-21-2022, 07:38 PM   #7
Mechanikx
Member
 
Registered: Jul 2018
Posts: 494

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
Quote:
Originally Posted by ethelack View Post
Hi Mechanikx, thanks for your tip I have been looking at notify-send for the last few days.
Using fvwm and fluxbox have put the notification-daemon command at the bottom of .xinitrc but the daemon is not starting.

Any advice about where in .xinitrc you put the command to start the notification daemon with your window manager would be much appreciated.

...
You need to put it before you launch your window manager. If you put it after then that line won't get executed and, in this case, notification-daemon won't get launched.

Try this and you'll see it's not running:

Code:
ps aux | grep notification-daemon
Here's my .xinitrc:

Code:
#!/bin/sh

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

# Merge in defaults and keymaps
[ -f $sysresources ] && /usr/bin/xrdb -merge $sysresources
[ -f $sysmodmap ] && /usr/bin/xmodmap $sysmodmap
[ -f $userresources ] && /usr/bin/xrdb -merge $userresources
[ -f $usermodmap ] && /usr/bin/xmodmap $usermodmap

# Display settings
~/Bin/display_settings.sh &

# Wallpaper
~/.fehbg &

# status
~/Bin/Dwm/dwm-status.sh &

# start sxhkd
/usr/bin/sxhkd &

# start notification server
/usr/libexec/notification-daemon &

# start nm-applet
/usr/bin/nm-applet &

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

Last edited by Mechanikx; 01-21-2022 at 07:39 PM.
 
Old 01-22-2022, 05:49 PM   #8
ethelack
Member
 
Registered: Mar 2021
Location: New Zealand
Distribution: Slackware
Posts: 92

Rep: Reputation: Disabled
Quote:
Originally Posted by Mechanikx View Post
You need to put it before you launch your window manager. If you put it after then that line won't get executed and, in this case, notification-daemon won't get launched.

thanks it works with the notification-daemon line edited into /usr/bin/startfvwm which ~/.xinitrc points to but not in ~/.xinitrc itself. Because this requires root to edit the startfvwm file I will just stick to starting the notification-daemon from ~/.fvwm/config.
 
  


Reply

Tags
notify-send startx


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Send Results of Curl Command to Notify-Send? jakfish Linux - General 7 09-01-2016 08:55 AM
Notifications don't show up (notify-send notify-osd) michal017 Linux - Desktop 0 05-06-2014 03:44 PM
transparency not correct with fvwm + fvwm-crystal + radeon hedpe Linux - Desktop 0 01-30-2007 07:59 PM
clock not working in fvwm with fvwm-crystal hedpe Linux - Software 0 09-13-2005 08:04 PM
2 fvwm processes with 2 displays, only want one fvwm enzo250gto Linux - Software 0 01-27-2005 04:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration