Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change the default command scope in the Felix gogo shell?

When you enter a command into the gogo shell, it looks first in the default scope for a match for that command. How do you configure what this default scope is?

For example, if you start up the Felix framework with gogo, it uses the felix scope as the default. But if you start up equinox 3.8.1, which now uses the felix shell as the default, it uses the equinox scope as default.

The main irritation is that when I type:

g! help

I get the results from equinox:help, instead of felix:help, so I'd like to make the felix scope the default.

Is there an OSGi framework property to configure this?

like image 348
Lindsay Smith Avatar asked Dec 04 '12 20:12

Lindsay Smith


People also ask

Which command do you need to execute to close the connection to the Gogo shell without shutting the OSGi container down?

To disconnect the session, execute the disconnect command. Warning: Commands shutdown , close , and exit stop the OSGi framework. So make sure to use the disconnect command to end the telnet Gogo Shell session.

How do you use Gogo shell?

The Gogo shell is accessible in the Control Panel (recommended) and from the command line. Lists information about why the specified bundle is not working (e.g., unresolved dependencies, etc.) Lists OSGi components that are “not available” (unresolved).

What is the use of Apache Felix?

Apache Felix provides a foundation for creating modular and dynamically extensible applications. This page presents an example application to demonstrate the various approaches to consider when creating a OSGi/Felix-based application.


1 Answers

The gogo shell, when starting up, will try to find a startup script. By default it will look in the folder (relative to your startup directory):

etc/gosh_profile

If it does not find a script there, the default script (inside org.apache.felix.gogo.shell) is used, which contains this line:

SCOPE = gogo:*

So, to change the default scope, provide your own script.

like image 96
Marcel Offermans Avatar answered Sep 28 '22 06:09

Marcel Offermans