
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello, I am trying to run a script to check gmail as described here (with some errors) https://wiki.archlinux.org/index.php/Xmobar#Gmail_integration When I set the template to %mail% and restart xmobar, the bar refuses to display. If I set the script to a non-existent file, I see xmobar with a message "Could not execute command", so I know it's all configured fine, but for the script that checks gmail. If I run that script manually, I see a single integer value on standard output. I can't seem to find any place that xmobar is logging to help identify what is causing the error (xmobar refusing to display when asked to Run Com my script. Thanks for any pointers. - -- Tony Morris http://tmorris.net/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk1VLWkACgkQmnpgrYe6r60iTQCgmf3LImIGVUUPFwhyDqYZX15M LeUAoIKI+YD7Wf24++EehLBZ0BhoB+nN =41a2 -----END PGP SIGNATURE-----

Hi, On Fri, Feb 11 2011, Tony Morris wrote:
Hello, I am trying to run a script to check gmail as described here (with some errors) https://wiki.archlinux.org/index.php/Xmobar#Gmail_integration
When I set the template to %mail% and restart xmobar, the bar refuses to display. If I set the script to a non-existent file, I see xmobar with a message "Could not execute command", so I know it's all configured fine, but for the script that checks gmail. If I run that script manually, I see a single integer value on standard output.
I can't seem to find any place that xmobar is logging to help identify what is causing the error (xmobar refusing to display when asked to Run Com my script.
It works for me, with xmobar 0.12 (i haven't tried an earlier version). Using "mail" as the alias can give problems if you've compiled the Mail plugin: one thing to try is to change that to, say, "gmail". Also, make sure that the refresh time has a reasonable value (e.g., 3000 for checking every five minutes). This is the config line i'm using: , Run Com "sh" ["/home/jao/tmp/gmail.sh"] "gmail" 3000 xmobar logs to either the bar itself or stdout: just run 'xmobar /path/to/config' in a terminal window to see if there's any additional error message. HTH, jao -- "I don't want to achieve immortality through my work... I want to achieve it through not dying" -- Woody Allen

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 OK it works when I restart X. Pressing mod-q causing xmobar to disappear and I see the desktop background where xmobar should be. This doesn't happen when I remove the %gmail% from the xmobar template. I am using gnomeConfig. Perhaps the issue is not specific to xmobar -- any tips? On 11/02/11 23:53, Jose A. Ortega Ruiz wrote:
Hi,
On Fri, Feb 11 2011, Tony Morris wrote:
Hello, I am trying to run a script to check gmail as described here (with some errors) https://wiki.archlinux.org/index.php/Xmobar#Gmail_integration
When I set the template to %mail% and restart xmobar, the bar refuses to display. If I set the script to a non-existent file, I see xmobar with a message "Could not execute command", so I know it's all configured fine, but for the script that checks gmail. If I run that script manually, I see a single integer value on standard output.
I can't seem to find any place that xmobar is logging to help identify what is causing the error (xmobar refusing to display when asked to Run Com my script.
It works for me, with xmobar 0.12 (i haven't tried an earlier version). Using "mail" as the alias can give problems if you've compiled the Mail plugin: one thing to try is to change that to, say, "gmail". Also, make sure that the refresh time has a reasonable value (e.g., 3000 for checking every five minutes). This is the config line i'm using:
, Run Com "sh" ["/home/jao/tmp/gmail.sh"] "gmail" 3000
xmobar logs to either the bar itself or stdout: just run 'xmobar /path/to/config' in a terminal window to see if there's any additional error message.
HTH, jao
- -- Tony Morris http://tmorris.net/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk1Vm9IACgkQmnpgrYe6r61BTwCgixsoKzZXDjhVs0cZOQv5Y4xs uz8An1akfQwPYRi7zJv5RxJyR9Mq5HoH =7WQO -----END PGP SIGNATURE-----

Is the output you see from the script newline-terminated? If it isn't, xmobar may not process this input because, at least for the stdin reader (and I assume the mail reader does the same), it processes things one line at a time. Then again, I don't see why the whole bar should hang if it isn't newline-terminated. Normally, it should just display "Updating..." or something like that if it's waiting for input from the command it runs. - Norbert Tony Morris [2011.02.11 2236 +1000]:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hello, I am trying to run a script to check gmail as described here (with some errors) https://wiki.archlinux.org/index.php/Xmobar#Gmail_integration
When I set the template to %mail% and restart xmobar, the bar refuses to display. If I set the script to a non-existent file, I see xmobar with a message "Could not execute command", so I know it's all configured fine, but for the script that checks gmail. If I run that script manually, I see a single integer value on standard output.
I can't seem to find any place that xmobar is logging to help identify what is causing the error (xmobar refusing to display when asked to Run Com my script.
Thanks for any pointers.
- -- Tony Morris http://tmorris.net/
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk1VLWkACgkQmnpgrYe6r60iTQCgmf3LImIGVUUPFwhyDqYZX15M LeUAoIKI+YD7Wf24++EehLBZ0BhoB+nN =41a2 -----END PGP SIGNATURE-----
_______________________________________________ xmonad mailing list xmonad@haskell.org http://www.haskell.org/mailman/listinfo/xmonad

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Yes, it is newline-terminated. The output of hexdump is 0a30. I have it narrowed down to using a https connection instead of http. I can produce it with either curl or wget. xmobar is not logging anything. Grasping at straws... any more ideas? On 12/02/11 04:09, Norbert Zeh wrote:
Is the output you see from the script newline-terminated? If it isn't, xmobar may not process this input because, at least for the stdin reader (and I assume the mail reader does the same), it processes things one line at a time. Then again, I don't see why the whole bar should hang if it isn't newline-terminated. Normally, it should just display "Updating..." or something like that if it's waiting for input from the command it runs.
- Norbert
Tony Morris [2011.02.11 2236 +1000]:
Hello, I am trying to run a script to check gmail as described here (with some errors) https://wiki.archlinux.org/index.php/Xmobar#Gmail_integration
When I set the template to %mail% and restart xmobar, the bar refuses to display. If I set the script to a non-existent file, I see xmobar with a message "Could not execute command", so I know it's all configured fine, but for the script that checks gmail. If I run that script manually, I see a single integer value on standard output.
I can't seem to find any place that xmobar is logging to help identify what is causing the error (xmobar refusing to display when asked to Run Com my script.
Thanks for any pointers.
xmonad mailing list xmonad@haskell.org http://www.haskell.org/mailman/listinfo/xmonad
_______________________________________________ xmonad mailing list xmonad@haskell.org http://www.haskell.org/mailman/listinfo/xmonad
- -- Tony Morris http://tmorris.net/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk1WfPcACgkQmnpgrYe6r61QzwCgqz3C7RuwZRkWOv9ng3yP03Tq 8bEAnRBz+FAHS09Aum40h9sW0A0q122r =0PE3 -----END PGP SIGNATURE-----

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I can provide further detail on this issue.
I have the following in a script called /path/to/newgmails.sh
#!/bin/sh
gmails=`curl -q --insecure http://blog.tmorris.net/test | wc -l`
echo $gmails
In ~/.xmobarrc I have the following
Run Com "/path/to/newgmails.sh" [] "gmail" 100
and in the template
template = "%StdinReader% }{ %gmail%
Yes, it is newline-terminated. The output of hexdump is 0a30.
I have it narrowed down to using a https connection instead of http. I can produce it with either curl or wget. xmobar is not logging anything.
Grasping at straws... any more ideas?
On 12/02/11 04:09, Norbert Zeh wrote:
Is the output you see from the script newline-terminated? If it isn't, xmobar may not process this input because, at least for the stdin reader (and I assume the mail reader does the same), it processes things one line at a time. Then again, I don't see why the whole bar should hang if it isn't newline-terminated. Normally, it should just display "Updating..." or something like that if it's waiting for input from the command it runs.
- Norbert
Tony Morris [2011.02.11 2236 +1000]:
Hello, I am trying to run a script to check gmail as described here (with some errors) https://wiki.archlinux.org/index.php/Xmobar#Gmail_integration
When I set the template to %mail% and restart xmobar, the bar refuses to display. If I set the script to a non-existent file, I see xmobar with a message "Could not execute command", so I know it's all configured fine, but for the script that checks gmail. If I run that script manually, I see a single integer value on standard output.
I can't seem to find any place that xmobar is logging to help identify what is causing the error (xmobar refusing to display when asked to Run Com my script.
Thanks for any pointers.
_______________________________________________ xmonad mailing list xmonad@haskell.org http://www.haskell.org/mailman/listinfo/xmonad
_______________________________________________ xmonad mailing list xmonad@haskell.org http://www.haskell.org/mailman/listinfo/xmonad
- -- Tony Morris http://tmorris.net/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk1XSSsACgkQmnpgrYe6r61cGwCdFj9kpnAkzfSNyHd0j+hdpijw 52oAoKuv4RwTx9Da/X/+cRZV2ygxLng3 =A0zh -----END PGP SIGNATURE-----
participants (3)
-
Jose A. Ortega Ruiz
-
Norbert Zeh
-
Tony Morris