> On Thu, 9 Oct 2014, Andrew Schulman wrote:
> > I have fish (2.1.1) set as my default login shell now on my Ubuntu 
> > (14.04.1) host.
> > Mostly it works fine, but when I ssh into the host to run a command, so 
> > fish runs
> > non-interactively, I get a bunch of errors:
> > 
> > andrex@helium ~> ssh helium w
> > set_color: Could not set up terminal
> > set_color: Could not set up terminal
> > set_color: Could not set up terminal
> > set_color: Could not set up terminal
> > set_color: Could not set up terminal
> > set_color: Could not set up terminal
> > sed: -e expression #1, char 1: unknown command: `-'
> >  22:27:09 up 15:53,  5 users,  load average: 1.26, 1.96, 1.50
> > ...
> > 
> > Requesting a TTY makes the errors go away:
> > 
> > andrex@helium ~> ssh -t helium w
> >  22:27:52 up 15:54,  6 users,  load average: 1.57, 1.96, 1.52
> > ...
> 
> `set_color` needs a terminal, because its output depends on your terminal 
> characteristics!
> 
> I suspect that you have a call to `set_color` in your  
> `.config/fish/config.fish`, possibly in a command substitution or a 
> function call, and this gets run for all new instances. 

OK, thanks for the suggestion.  I don't use set_color in my config.fish or any 
of my
custom functions, but I did take a closer look at config.fish to narrow down the
problem.  It turns out to have been caused by this statement:

switch $XDG_CURRENT_DESKTOP
  case LXDE
    set EDITOR leafpad
  case Unity
    set EDITOR gedit
end

When I log in non-interactively, XDG_CURRENT_DESKTOP isn't set.  So switch 
doesn't
get an argument, and that seems to cause it to fail in a strange way, with the 
above
error messages.  Why it leads to errors about set_color and sed, I don't know.

Anyway, I double-quoted $XDG_CURRENT_DESKTOP in that statement, and the problem 
is
now solved.  Thanks for taking a look.

Andrew


------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to