Skip to content
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

mpd widget doesn't work when fish is set as the default login shell. #145

Closed
TheReverend403 opened this issue Sep 24, 2015 · 8 comments
Closed

Comments

@TheReverend403
Copy link
Contributor

No errors, just no output from the mpd widget, and no notifications. All other widgets that use the shell work fine.

@lcpz
Copy link
Owner

lcpz commented Sep 25, 2015

Tell me the exact steps to reproduce this.

@TheReverend403
Copy link
Contributor Author

  • Install http://fishshell.com/
  • Set it as your default shell with chsh -s /bin/fish, then relogin. Alternatively, use xephyr with the environment variable SHELL set to /bin/fish, it seems to work just as well. You should probably do this as a preferred method, because depending on how you launch X, your startup scripts like xinit may also be incompatible with fish without some tweaks.
  • Observe how the MPD widget doesn't do anything.

As a sidenote, certain other things are not fish compatible, such as run_once(). I already have a workaround for that, and if you need it, I can make a PR for it.

@TheReverend403
Copy link
Contributor Author

Also of interest is that I can run the exact curl command used in mpd.lua manually, and it produces expected output. I suspect the issue may be in asyncshell, but I haven't been able to produce any results from modifying it.

@TheReverend403
Copy link
Contributor Author

Here we go, I figured out how to get Awesome's stdout.

Thunar: D-BUS name org.xfce.Thunar already registered.
Flag 0x0001, status 0, EXIT 1 STAT 0
fish: Could not expand string “"asyncshell.deliver(1, [[\"$(echo 'password 
status
currentsong
close' | curl --connect-timeout 1 -fsm 3 telnet://127.0.0.1:6600)\"]])"”
Standard input: echo "asyncshell.deliver(1, [[\"$(echo 'password 
                     ^

fish: Could not expand string “"asyncshell.deliver(2, [[\"$(echo 'password 
status
currentsong
close' | curl --connect-timeout 1 -fsm 3 telnet://127.0.0.1:6600)\"]])"”
Standard input: echo "asyncshell.deliver(2, [[\"$(echo 'password 
                     ^
fish: Could not expand string “"asyncshell.deliver(3, [[\"$(echo 'password 
status
currentsong
close' | curl --connect-timeout 1 -fsm 3 telnet://127.0.0.1:6600)\"]])"”
Standard input: echo "asyncshell.deliver(3, [[\"$(echo 'password 
                     ^
fish: Could not expand string “"asyncshell.deliver(4, [[\"$(echo 'password 
status
currentsong
close' | curl --connect-timeout 1 -fsm 3 telnet://127.0.0.1:6600)\"]])"”
Standard input: echo "asyncshell.deliver(4, [[\"$(echo 'password

@TheReverend403
Copy link
Contributor Author

OK, adding awful.util.shell = '/bin/sh' after line 15 of asyncshell.lua fixes it. Is this an acceptable workaround for compatibility across multiple shells?

@lcpz
Copy link
Owner

lcpz commented Oct 10, 2015

Yes.

@lcpz lcpz closed this as completed Oct 10, 2015
@unode
Copy link
Contributor

unode commented Oct 11, 2015

Keep in mind that /bin/sh may still be a different shell (usually bash or dash) depending on the system.

Some incompatibilities may still show up in some cases.

@lcpz
Copy link
Owner

lcpz commented Oct 11, 2015

For those special cases, I wrote a line in the widgets section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants