The gogo shell dialect is described in the OSGi R4.2 draft [1] (page 103 of
the PDF).

The Gosh profile is written in that same syntax. See here [2] for some
introductory features of the shell language and command interface.

[1] https://osgi.org/download/osgi-4.2-early-draft.pdf#page=103
[2]
http://felix.apache.org/documentation/subprojects/apache-felix-gogo/rfc-147-overview.html


On Thu, Nov 29, 2018 at 3:35 PM Doug Meredith <doug.mered...@skyridge.com>
wrote:

> Thanks for the information, Guillaume. Much appreciated. Based on this
> information, I did some further research. Some of this stuff isn't well
> documented, so for anyone finding this later, here is what I understand:
>
>    - Gosh is an abbreviation for Gogo Shell. Sure, that seems obvious to
>    you now that I've pointed it out, but you wouldn't believe how much
>    googling I did on this mysterious thing before it finally came to me.
> lol
>    - gosh_profile is a startup script for the Gogo Shell. You place it in
>    an "etc" directory relative to the working directory where the
> framework is
>    started. If you put shell-like echo commands in this file, you will see
>    them when you start Gogo.
>    - The location of gosh_profile can be changed using the system property
>    gosh.home. (I didn't test this).
>    - I found no documentation on how to code a gosh_profile, and it isn't
>    even clear to me what language it uses.
>    - The JLine 3 Git repository contains code for both telnet and SSH
>    servers.
>    - The sample gosh_profile given in the JLine repository has code to add
>    commands to Gogo for enabling telnetd.This gosh_profile causes
> exceptions
>    to be thrown when used in an OSGi environment.
>    - It's unclear to me if proper telnet/ssh support could be enabled
>    without some coding. Quite possibly it could by someone with sufficient
>    knowledge of JLine and the intricacies of gosh_profile.
>
> I'm only about 80% sure of everything that I said above, and some of my
> terminology could be a bit off, so take it with a grain of salt.
>
> Doug
>
> On Thu, Nov 29, 2018 at 2:46 AM Guillaume Nodet <gno...@apache.org> wrote:
>
> > The remote shell bundle does not support the JLine gogo integration. The
> > code is 10 years old and has not been maintained.
> > JLine requires a terminal to be created and setup when the CommandSession
> > is created and this step is not done by the remote shell bundle.
> > If you want remote access, JLine provides good telnet and ssh support for
> > incoming connections.
> > For example if you start the main JLine demo which uses gogo, but outside
> > OSGi, you can then run:
> >   > telnetd start
> > which starts the telnet daemon and you can then connect remotely.
> >
> > The commands are registered via a custom gosh_profile script which is
> > executed when a gogo shell is created:
> >
> >
> https://github.com/jline/jline3/blob/master/demo/etc/gosh_profile#L151-L163
> >
> >
>


-- 
*Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile>
 (@rotty3000)
Senior Software Architect *Liferay, Inc.* <http://www.liferay.com>
 (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance <http://osgi.org> (@OSGiAlliance)

Reply via email to