-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Postdock hook not given "on" state automatically #84
Comments
My first guess is that this has something to do with the missing environment variables for DBus. When you call the script manually, it has the correct environment variables. The notifications are ususally sent through DBus which needs a special environment variable such that the notification actually shows up on your desktop, and not the one of root or udev. The strange thing is that it works with the hardware docking in one direction only. Could you please add the line
to your postdook hook? This will dump all your environment variables into the syslog. Then you can do a docking on and docking off and look into |
I think this might be related to #73 if it was not one way only … |
I've pointed that hook for "off" state works good. That because I've listed all needed vars in script and even call 2 of 3 commands with
|
Thanks for all the data! I find it a bit odd that there is no output from the thinkpad-scripts themselves. Did you disable the logging to syslog in the configuration file? It would be really helpful to have the full logging output of the scripts from the syslog. In case that you did not disable it, does the stuff show up in syslog when you call the scripts manually? You wrote in the first post that the hook for I just looked through the code and cannot see any reason why the hook itself would be treated differently. So maybe something fails before the hooks are called. The function dock will tell you the order of execution for the |
Nope, i did not disable logging. My config.ini file is just
You get me right, when I invoke This is the log of manually called
|
To be honest, I do not see what is wrong with it. Maybe the parameter is not passed correctly to the hook? I just put this into a #!/bin/bash
logger -t thinkpad-scripts-my-hooks "'$#': '$0' '$1' '$2'" It seems like |
Do you have any update on this or did you just give up? |
Not directly an update but for me it the same behaviour. Discovered with a |
I've written my postdock hook which is executed perfectly, only not if thinkpad-dock runs automatically on laptop docking. To be clear I've tested with one simple command in hook which sends notify-osd with text "Dock is On" or "Dock is Off". It behaves this way:
<thinkpad-dock on>
is executed in terminal - main script works, hook works, notification is present.My postdock hook has this structure:
The text was updated successfully, but these errors were encountered: