Jason Buberel | 2 Apr 17:06 2009

Time-sensitive fishd startup errors

I have fish installed and working property (v1.23.0) on a set of 7
linux hosts (RHEL5). On 6 of those hosts there is a cron job that runs
every minute of every day.  That cron job executes a command similar
to:

/usr/bin/ssh srv1 'perl /home/jason/some-script.pl'

Normally, the command will produce no output, so cron does not send me
an email of the results, which is as expected. But from time to time
(5% perhaps), I will get output to stderr that is mailed to me:

"fish: Could not connect to universal variable server, already tried
manual restart (or no command supplied). You will not be able to share
variable values between fish sessions. Is fish properly installed?"

This seems to be caused when srv2-srv6 attempt to establish their ssh
connections at or nearly at the exact same time. When this happens, it
looks like multiple simultaneous attempts to start fishd on srv1
results in this error message.

Now according to the ssh documentation, because I am specifying a
command to be executed, that no login shell will be spawned, but
obviously instances of 'fish' are being executed as non-login shells
to handle the commands.

I've read through the fish/fishd documentation for a configuration
option to disable the use of the fishd process, but have not found
any. I don't really need universal variables supported on this
machine, so would be happy to disable the feature in order to avoid
these error messages. Another question is: What sort of locking
(Continue reading)

Martin Bähr | 2 Apr 17:47 2009
Picon

Re: Time-sensitive fishd startup errors

On Thu, Apr 02, 2009 at 08:06:34AM -0700, Jason Buberel wrote:
> "fish: Could not connect to universal variable server, already tried
> manual restart (or no command supplied). You will not be able to share
> variable values between fish sessions. Is fish properly installed?"
> 
> This seems to be caused when srv2-srv6 attempt to establish their ssh
> connections at or nearly at the exact same time. When this happens, it
> looks like multiple simultaneous attempts to start fishd on srv1
> results in this error message.

i can confirm this problem.
i get the same error when i start a screen session with multiple
terminals when fishd is not yet running. (i resolved to starting fish in
first another terminal (which i need anyways) and only then start screen.)

greetings, martin.
--

-- 
cooperative communication with sTeam      -     caudium, pike, roxen and unix
offering: programming, training and administration   -  anywhere in the world
--
pike programmer   working in china                      community.gotpike.org
unix system-      iaeste.(tuwien.ac|or).at                     open-steam.org
administrator     caudium.org                                    is.schon.org
Martin Bähr       http://www.iaeste.or.at/~mbaehr/

------------------------------------------------------------------------------
Jason Buberel | 2 Apr 18:05 2009

Re: Time-sensitive fishd startup errors

So besides interleaving my cron jobs so that they do not overlap in time so closely, there is probably not much I can do about this right now. Does that sound right?

That being the apparent case, are there any real negative consequences or side effects to this? It seems as though the shell commands are still being executed, only without access to any universal variables (which is perfectly OK in my case).

-jason

On Thu, Apr 2, 2009 at 8:47 AM, Martin Bähr <mbaehr-J82dVEKiPgVsIEQYbtjsvCEcasqEdqbRs2V0tQ3P5b8@public.gmane.org> wrote:
i can confirm this problem.
i get the same error when i start a screen session with multiple
terminals when fishd is not yet running. (i resolved to starting fish in
first another terminal (which i need anyways) and only then start screen.)


--
Jason L. Buberel
jason-D8K6ohQOu01AfugRpC6u6w@public.gmane.org
------------------------------------------------------------------------------
_______________________________________________
Fish-users mailing list
Fish-users@...
https://lists.sourceforge.net/lists/listinfo/fish-users
Martin Bähr | 2 Apr 18:14 2009
Picon

Re: Time-sensitive fishd startup errors

On Thu, Apr 02, 2009 at 09:05:56AM -0700, Jason Buberel wrote:
> So besides interleaving my cron jobs so that they do not overlap in time so
> closely, there is probably not much I can do about this right now. Does that
> sound right?

seems like it. a mode to run fish without fishd would be nice.

greetings, martin.
--

-- 
cooperative communication with sTeam      -     caudium, pike, roxen and unix
offering: programming, training and administration   -  anywhere in the world
--
pike programmer   working in china                      community.gotpike.org
unix system-      iaeste.(tuwien.ac|or).at                     open-steam.org
administrator     caudium.org                                    is.schon.org
Martin Bähr       http://www.iaeste.or.at/~mbaehr/

------------------------------------------------------------------------------
Jason Buberel | 2 Apr 18:18 2009

Re: Time-sensitive fishd startup errors

Agreed - a simple config variable in ~/.config/fish/config.fish would be nice "set -x DISABLE_FISHD true".

-jason

On Thu, Apr 2, 2009 at 9:14 AM, Martin Bähr <mbaehr <at> email.archlab.tuwien.ac.at> wrote:
seems like it. a mode to run fish without fishd would be nice.

--
Jason L. Buberel
jason-D8K6ohQOu01AfugRpC6u6w@public.gmane.org
------------------------------------------------------------------------------
_______________________________________________
Fish-users mailing list
Fish-users@...
https://lists.sourceforge.net/lists/listinfo/fish-users
Jason Buberel | 3 Apr 17:21 2009

Well, I can't exactly reproduce this...

But one of my cron jobs (you'll recall - they run every minute from a
cluster of 6 servers all contacting a single central server, where
fish is invoked, which occasionally causes fishd to terminate during
startup) reported the following to me this morning:

fish: function eval called while blocking signals.
fish: This is a bug. If you can reproduce it, please send a bug report
to fish-users@...
fish: Backtrace:
fish(show_stackframe+0x1a) [0x43209a]
fish(eval+0x8c) [0x41f58c]
fish [0x414d45]
fish [0x42c591]
fish [0x42caff]
fish(env_universal_read_all+0x39) [0x42c699]
fish [0x42c717]
fish(env_universal_read_all+0x28) [0x42c688]
fish(env_universal_barrier+0x150) [0x42c880]
fish(env_export_arr+0x21d) [0x41351d]
fish(exec+0x4da) [0x41610a]
fish(eval+0x89e) [0x41fd9e]
fish(reader_read+0x147) [0x424e47]
fish [0x40a120]
fish(builtin_run+0xa2) [0x40ac42]
fish(exec+0x70e) [0x41633e]
fish(eval+0x89e) [0x41fd9e]
fish(main+0x292) [0x437e22]
/lib64/libc.so.6(__libc_start_main+0xf4) [0x36a781d8b4]
fish [0x4086c9]

-jason

--

-- 
Jason L. Buberel
jason@...

------------------------------------------------------------------------------
mpb | 8 Apr 05:52 2009
Picon

How to echo a blank line before the prompt?

Hi fish-users,

I am considering switching to the fish shell, primarily for interactive use.

I like each prompt to be proceeded by a blank line, as a visual separation cue.

Fish does not support multi-line prompts, so I thought maybe I could
use the fish_prompt event to echo a blank line, like this:

function -e fish_prompt fish_prompt_handler
  echo
end

Unfortunately, the above only works for the first prompt of each
shell.  It does not work for each "new fish prompt".  (Evidently, the
docs and I ascribe different meanings to the phrase "whenever a new
fish prompt is about to be displayed".)

Then I thought, maybe I could echo a blank line every time the status
variable changes.  This would not cover every prompt, but it might
cover 90% of them.

function -v status status_handler
  echo
end

Unfortunately, this does not work at all.

I currently use bash.  Bash makes echoing blank lines before each
prompt very easy.  I also have bash set up to echo, in red, the exit
status of any process that exits with a status other than zero.  In
the future I may also conditionally print additional status
information before prompt.  In bash, doing this is straightforward via
the PROMPT_COMMAND variable.

Is there any way to achieve similar results with fish?

Thanks!

-mpb

------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
Info | 10 Apr 21:42 2009
Picon

Fish pacman and yaourt completion

Hello, can I use the pacman.fish as yaourt.fish?

From wiki of archlinux (http://wiki.archlinux.org/index.php/Yaourt): "Yaourt uses the same exact syntax as pacman, which saves you from relearning an entirely new method of system maintenance, but also adds new options".

Then I copy pacman.fish as yaourt.fish, then y replace "pacman" by "yaourt" on yaourt.fish, but it doesn't show a list packages. For example when i did:

pacman -S nan<TAB>
pacman -S nano

But when i try:

yaourt -S nan<TAB>
yaourt -S nan==> Listing all packages in repos

But nothing happend, no "nano" is completed.

I only use options on yaourt that already exist on pacman.

------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Fish-users mailing list
Fish-users@...
https://lists.sourceforge.net/lists/listinfo/fish-users
Joenio Costa | 14 Apr 04:32 2009
Picon

completion for dict

Hi,

Here is a simple completion for the dict command for fish.

-- 
Joenio Costa
- www.Colivre.coop.br
- www.Perl.org.br
- Salvador.pm.org

GNU/Linux User #431067 http://counter.li.org

#
# Completions for the dict command
# Joenio Costa <joenio@...>
#

complete -c dict -x -s d -a ! -d "First match"
complete -c dict -x -s d -a gcide -d "The Collaborative International Dictionary of English v.0.48"
complete -c dict -x -s d -a wn -d "WordNet (r) 2.0"
complete -c dict -x -s d -a moby-thes -d "Moby Thesaurus II by Grady Ward, 1.0"
complete -c dict -x -s d -a elements -d "Elements database 20001107"
complete -c dict -x -s d -a vera -d "Virtual Entity of Relevant Acronyms (Version 1.9, June 2002)"
complete -c dict -x -s d -a jargon -d "Jargon File (4.3.1, 29 Jun 2001)"
complete -c dict -x -s d -a foldoc -d "The Free On-line Dictionary of Computing (27 SEP 03)"
complete -c dict -x -s d -a easton -d "Easton's 1897 Bible Dictionary"
complete -c dict -x -s d -a hitchcock -d "Hitchcock's Bible Names Dictionary (late 1800's)"
complete -c dict -x -s d -a bouvier -d "Bouvier's Law Dictionary, Revised 6th Ed (1856)"
complete -c dict -x -s d -a devils -d "THE DEVIL'S DICTIONARY ((C)1911 Released April 15 1993)"
complete -c dict -x -s d -a world02 -d "CIA World Factbook 2002"
complete -c dict -x -s d -a gazetteer -d "U.S. Gazetteer (1990)"
complete -c dict -x -s d -a gaz-county -d "U.S. Gazetteer Counties (2000)"
complete -c dict -x -s d -a gaz-place -d "U.S. Gazetteer Places (2000)"
complete -c dict -x -s d -a gaz-zip -d "U.S. Gazetteer Zip Code Tabulation Areas (2000)"
complete -c dict -x -s d -a afr-deu -d "Africaan-German Freedict dictionary"
complete -c dict -x -s d -a afr-eng -d "Africaan-English Freedict Dictionary"
complete -c dict -x -s d -a ara-eng -d "English-Arabic Freedict Dictionary"
complete -c dict -x -s d -a cro-eng -d "Croatian-English Freedict Dictionary"
complete -c dict -x -s d -a cze-eng -d "Czech-English Freedict dictionary"
complete -c dict -x -s d -a dan-eng -d "Danish-English Freedict dictionary"
complete -c dict -x -s d -a deu-eng -d "German-English Freedict dictionary"
complete -c dict -x -s d -a deu-fra -d "German-French Freedict dictionary"
complete -c dict -x -s d -a deu-ita -d "German-Italian Freedict dictionary"
complete -c dict -x -s d -a deu-nld -d "German-Nederland Freedict dictionary"
complete -c dict -x -s d -a deu-por -d "German-Portugese Freedict dictionary"
complete -c dict -x -s d -a eng-afr -d "English-Africaan Freedict Dictionary"
complete -c dict -x -s d -a eng-ara -d "English-Arabic FreeDict Dictionary"
complete -c dict -x -s d -a eng-cro -d "English-Croatian Freedict Dictionary"
complete -c dict -x -s d -a eng-cze -d "English-Czech fdicts/FreeDict Dictionary"
complete -c dict -x -s d -a eng-deu -d "English-German Freedict dictionary"
complete -c dict -x -s d -a eng-fra -d "English-French Freedict Dictionary"
complete -c dict -x -s d -a eng-hin -d "English-Hindi Freedict Dictionary"
complete -c dict -x -s d -a eng-hun -d "English-Hungarian Freedict Dictionary"
complete -c dict -x -s d -a eng-iri -d "English-Irish Freedict dictionary"
complete -c dict -x -s d -a eng-ita -d "English-Italian Freedict dictionary"
complete -c dict -x -s d -a eng-lat -d "English-Latin Freedict dictionary"
complete -c dict -x -s d -a eng-nld -d "English-Netherlands Freedict dictionary"
complete -c dict -x -s d -a eng-por -d "English-Portugese Freedict dictionary"
complete -c dict -x -s d -a eng-rom -d "English-Romanian FreeDict dictionary"
complete -c dict -x -s d -a eng-rus -d "English-Russian Freedict dictionary"
complete -c dict -x -s d -a eng-spa -d "English-Spanish Freedict dictionary"
complete -c dict -x -s d -a eng-swa -d "English-Swahili xFried/FreeDict Dictionary"
complete -c dict -x -s d -a eng-swe -d "English-Swedish Freedict dictionary"
complete -c dict -x -s d -a eng-tur -d "English-Turkish FreeDict Dictionary"
complete -c dict -x -s d -a eng-wel -d "English-Welsh Freedict dictionary"
complete -c dict -x -s d -a fra-deu -d "French-German Freedict dictionary"
complete -c dict -x -s d -a fra-eng -d "French-English Freedict dictionary"
complete -c dict -x -s d -a fra-nld -d "French-Nederlands Freedict dictionary"
complete -c dict -x -s d -a hin-eng -d "English-Hindi Freedict Dictionary [reverse index]"
complete -c dict -x -s d -a hun-eng -d "Hungarian-English FreeDict Dictionary"
complete -c dict -x -s d -a iri-eng -d "Irish-English Freedict dictionary"
complete -c dict -x -s d -a ita-deu -d "Italian-German Freedict dictionary"
complete -c dict -x -s d -a jpn-deu -d "Japanese-German Freedict dictionary"
complete -c dict -x -s d -a kha-deu -d "Khasi-German FreeDict Dictionary"
complete -c dict -x -s d -a lat-deu -d "Latin-German Freedict dictionary"
complete -c dict -x -s d -a lat-eng -d "Latin-English Freedict dictionary"
complete -c dict -x -s d -a nld-deu -d "Nederlands-German Freedict dictionary"
complete -c dict -x -s d -a nld-eng -d "Nederlands-English Freedict dictionary"
complete -c dict -x -s d -a nld-fra -d "Nederlands-French Freedict dictionary"
complete -c dict -x -s d -a por-deu -d "Portugese-German Freedict dictionary"
complete -c dict -x -s d -a por-eng -d "Portugese-English Freedict dictionary"
complete -c dict -x -s d -a sco-deu -d "Scottish-German Freedict dictionary"
complete -c dict -x -s d -a scr-eng -d "Serbo-Croat-English Freedict dictionary"
complete -c dict -x -s d -a slo-eng -d "Slovenian-English Freedict dictionary"
complete -c dict -x -s d -a spa-eng -d "Spanish-English Freedict dictionary"
complete -c dict -x -s d -a swa-eng -d "Swahili-English xFried/FreeDict Dictionary"
complete -c dict -x -s d -a swe-eng -d "Swedish-English Freedict dictionary"
complete -c dict -x -s d -a tur-deu -d "Turkish-German Freedict dictionary"
complete -c dict -x -s d -a tur-eng -d "Turkish-English Freedict dictionary"
complete -c dict -x -s d -a english -d "English Monolingual Dictionaries"
complete -c dict -x -s d -a trans -d "Translating Dictionaries"
complete -c dict -x -s d -a all -d "All Dictionaries (English-Only and Translating)"
complete -c dict -x -s d -a web1913 -d "Webster's Revised Unabridged Dictionary (1913)"
complete -c dict -x -s d -a world95 -d "The CIA World Factbook (1995)"
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Fish-users mailing list
Fish-users@...
https://lists.sourceforge.net/lists/listinfo/fish-users
Steven Ruppert | 14 Apr 06:08 2009
Picon

Fish 1.23.1 on Gentoo x86 hangs forever on login shell

Hello everybody,

This is a problem that has defeated my usual efforts. I checked the logs. I cleaned out and re-emerged fish. I even--to the best of my middling linux debugging skill--ran "su" through strace and gdb in a vain attempt to make sense of the output flying past.

This is a cry for help.

So here's the situation: I've got a Gentoo x86 box, running on the unstable tree, with nothing else especially fancy--but you, dear reader or fish developer, probably don't care about that. I installed fish-1.23.1 with a simple ebuild name change from the official fish-1.23.0.ebuild. It lost a "glibc-2.8.patch" in the 1.23.0 ebuild, but I'm not sure that would affect my current problem. But anyways, fish works just fine through my regular user. I've set the shell for myself and root to "/bin/fish" in /etc/passwd. I use it through screen, and it's very pretty. It also works through screen running as root, as well as "su /bin/fish". I even--and this is cool--made a custom prompt through the fish_prompt function to make a fancy--dare I say _gorgeous_--prompt that changes color when logged on as root. Life is good.

However!

Whenever I log in through an "su", a "sudo su", or through a getty program on the "real" virtual terminals, fish greets me with a cordial "Welcome to fish, the friendly interactive shell; Type help for instructions on how to use fish," but then just sits there, with a dumbfounded look on her face, as if waiting for something--something long lost, perhaps a childhood friend, or a missing configuration file. Something big, apparently, because as fish hangs there, she uses up all my extra CPU time, according to top. "kill <pid>" handles that problem just fine, even without the "-s 9" overkill switch, so fish isn't hung _that_ bad. But no matter how long I wait, or how much I _nag_--no key combination and/or profanity has yet stirred her--fish does not respond, forever imploring me to "type 'help' for instructions on how to use fish", in an almost ironic fashion.

What's funny though, is this only affects login shells. As I said before, running "/bin/fish" through screen, gnome-terminal, or plain command works without a hitch. Only in login shells does she hang in that annoying, yet wistful manner. It is considerably more annoying than wistful, however. You, dear reader, can probably imagine my chagrin when X stops working, leaving me with getty prompts opening only to hung terminals, practically forcing a liveCD recovery session for what would otherwise be a routine "vi /etc/X11/xorg.conf" edit.

But don't get me wrong. Fish's real time syntax highlighting is _very_ shiny, and her tab completion far outclasses bash. I still love fish. I only wish that we could take our relationship farther. There's always something between us, whether it be screen, or the alpha blended transparency of Compiz enhanced gnome-terminal. If there is anything you, the reader, can do to help me, please reply post haste. And likewise, if there is anything more I can provide, you need only ask. I am your humble servant.

Thank you,
Steven Ruppert

P.S. Here's my great fish_prompt function, in case that affects login shells differently. I did test fish without it, and it had no effect either way. 

function fish_prompt -d (N_ "Write out the prompt")
        printf '%s[ %s%s %s%s%s <at> %s%s %s%s%s ]%s ' (set_color -o blue) (set_color -o cyan) (date +%H:%M:%S) (set_color -o green) (whoami) (set_color -o white) (set_color -o cyan) (hostname|cut -d . -f 1) (set_color -o yellow) (prompt_pwd) (set_color blue) (set_color normal)
end

and for root (I'm not clever enough for one function setting of colors by whoami testing)

function fish_prompt -d (N_ "Write out the prompt")
        printf '%s{ %s%s %s%s%s <at> %s%s %s%s%s }%s ' (set_color -o red) (set_color -o cyan) (date +%H:%M:%S) (set_color -o green) (whoami) (set_color -o white) (set_color -o cyan) (hostname|cut -d . -f 1) (set_color -o yellow) (prompt_pwd) (set_color -o red) (set_color normal)
end


------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Fish-users mailing list
Fish-users@...
https://lists.sourceforge.net/lists/listinfo/fish-users

Gmane