[tw5] Re: bash script fails after git update (node.js on linux)

2019-02-13 Thread Rich
These suggestions fixed everything. The only scary thing was that my 
tiddlers took about 15 seconds to show their content.  SHould I file an 
issue or is thisan expected part of "laziness?" Thnx again!

On Sunday, February 10, 2019 at 2:37:15 AM UTC-10, Rich wrote:
>
> Thanks Jeremy and JWD.  I got busy with other things but will see if I can 
> sort this out today.  My guess is that I accidentally put the space in the 
> shebang line, which would explain why the launcher failed but the command 
> line worked.  WIll try out all the other good suggestions too.  Thanks as 
> always!
>
> On Wednesday, January 30, 2019 at 10:15:50 PM UTC-10, Rich wrote:
>>
>> Tiddlywiki  5.1.20 prerelease on nodjs on manjaro linux
>>
>> I have a little bash script that runs on starting the system or that I 
>> manually run to reload TW after updates and such.  The script has worked 
>> fine to this point, and if I run it from the command line it still works, 
>> but when I launch it from its desktop file without going to a terminal it 
>> refuses to start. Although it shows up in the system monitor, the browser 
>> won't load the page, indicating that the node server did not actually start 
>> serving anything.
>>
>> Here is the refiddle script:
>>
>>  #! /bin/bash
>> #restart TiddlyWIki node.js server after updates
>> killall node
>> tiddlywiki /home/rich/Dropbox/FiddlyWiki --server $:/core/save/lazy-all
>>
>> I can't use the newer --listen directive in place of server bacause it 
>> does not recognize the lazy loading param at the end while --server still 
>> does.
>> If I run from command line or alt-f2 with full path it runs fine, but it 
>> fails to run when launched from the .desktop file below.  I only updated 
>> TW, not the script or desktop file, both of which worked fine before the 
>> update as far as I can tell.
>>
>> .desktop launcher:
>> #!/usr/bin/env xdg-open
>> [Desktop Entry]
>> Encoding=UTF-8
>> Name=refiddle
>> Categories=Acessories
>> Exec=/home/rich/bin/refiddle
>> Icon=/usr/share/icons/HighContrast/scalable/actions/view-refresh.svg
>> StartupNotify=false
>> Terminal=false
>> Type=Application
>> Comment=Restart FiddlyWiki
>>
>> I tried a few things but am basically stumped as to why it is failing.  
>> ANyone have any ideas?
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/a1787987-ca9d-4fa2-b614-2af1cae31bce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: bash script fails after git update (node.js on linux)

2019-02-10 Thread Rich
Thanks Jeremy and JWD.  I got busy with other things but will see if I can 
sort this out today.  My guess is that I accidentally put the space in the 
shebang line, which would explain why the launcher failed but the command 
line worked.  WIll try out all the other good suggestions too.  Thanks as 
always!

On Wednesday, January 30, 2019 at 10:15:50 PM UTC-10, Rich wrote:
>
> Tiddlywiki  5.1.20 prerelease on nodjs on manjaro linux
>
> I have a little bash script that runs on starting the system or that I 
> manually run to reload TW after updates and such.  The script has worked 
> fine to this point, and if I run it from the command line it still works, 
> but when I launch it from its desktop file without going to a terminal it 
> refuses to start. Although it shows up in the system monitor, the browser 
> won't load the page, indicating that the node server did not actually start 
> serving anything.
>
> Here is the refiddle script:
>
>  #! /bin/bash
> #restart TiddlyWIki node.js server after updates
> killall node
> tiddlywiki /home/rich/Dropbox/FiddlyWiki --server $:/core/save/lazy-all
>
> I can't use the newer --listen directive in place of server bacause it 
> does not recognize the lazy loading param at the end while --server still 
> does.
> If I run from command line or alt-f2 with full path it runs fine, but it 
> fails to run when launched from the .desktop file below.  I only updated 
> TW, not the script or desktop file, both of which worked fine before the 
> update as far as I can tell.
>
> .desktop launcher:
> #!/usr/bin/env xdg-open
> [Desktop Entry]
> Encoding=UTF-8
> Name=refiddle
> Categories=Acessories
> Exec=/home/rich/bin/refiddle
> Icon=/usr/share/icons/HighContrast/scalable/actions/view-refresh.svg
> StartupNotify=false
> Terminal=false
> Type=Application
> Comment=Restart FiddlyWiki
>
> I tried a few things but am basically stumped as to why it is failing.  
> ANyone have any ideas?
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/44105bf7-fdaf-40f8-921a-a537a61be848%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: bash script fails after git update (node.js on linux)

2019-01-31 Thread jwd
It is bash and so $ generally introduces a variable substitution. You might 
have some luck with making sure that the --server parameter is not being 
interpreted in some odd way by quoting it:

tiddlywiki /home/rich/Dropbox/FiddlyWiki --server '$:/core/save/lazy-all'

Your shebang line does not look quite right either:
 #! /bin/bash
should be without spaces:
#!/bin/bash
or
#!/usr/bin/env bash

I am guessing the incorrect shebang line might be causing the desktop 
launcher's Exec directive to fail or use sh (though it would not explain 
why the process shows up in the system monitor.)

killall node is a bit of a blunt instrument. On some flavors of Linux you 
might find pkill -f tiddlywiki would be sure that the correct process 
running node is being killed successfully.

Last, the bare tiddlywiki command - one presumes tiddlywiki is in the PATH 
that ,xdg-open gives to the process running the refiddle shell script and 
that the location of the correct version of node is in the environment that 
tiddlywiki's shebang line is going to get. Setting your path expectations 
in the refiddle script
export PATH=/where/tiddlywiki/is:/where/node/is:${PATH}
might address mysterious behavior. Again, I am mystified why the node 
process would continue to show up in the process list.

Those are all the ideas that occur to me.

On Thursday, January 31, 2019 at 3:15:50 AM UTC-5, Rich wrote:

> Tiddlywiki  5.1.20 prerelease on nodjs on manjaro linux
>
> I have a little bash script that runs on starting the system or that I 
> manually run to reload TW after updates and such.  The script has worked 
> fine to this point, and if I run it from the command line it still works, 
> but when I launch it from its desktop file without going to a terminal it 
> refuses to start. Although it shows up in the system monitor, the browser 
> won't load the page, indicating that the node server did not actually start 
> serving anything.
>
> Here is the refiddle script:
>
>  #! /bin/bash
> #restart TiddlyWIki node.js server after updates
> killall node
> tiddlywiki /home/rich/Dropbox/FiddlyWiki --server $:/core/save/lazy-all
>
> I can't use the newer --listen directive in place of server bacause it 
> does not recognize the lazy loading param at the end while --server still 
> does.
> If I run from command line or alt-f2 with full path it runs fine, but it 
> fails to run when launched from the .desktop file below.  I only updated 
> TW, not the script or desktop file, both of which worked fine before the 
> update as far as I can tell.
>
> .desktop launcher:
> #!/usr/bin/env xdg-open
> [Desktop Entry]
> Encoding=UTF-8
> Name=refiddle
> Categories=Acessories
> Exec=/home/rich/bin/refiddle
> Icon=/usr/share/icons/HighContrast/scalable/actions/view-refresh.svg
> StartupNotify=false
> Terminal=false
> Type=Application
> Comment=Restart FiddlyWiki
>
> I tried a few things but am basically stumped as to why it is failing.  
> ANyone have any ideas?
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/d914d52b-d139-4086-9eb0-3bab178d0f75%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.