Written by

Senior Sales Engineer at InterSystems Corporation
Article Theo Stolker · Jan 15, 2024 1m read

How to add webterminal when you have no terminal access

I though this is a pretty cool way of installing webterminal in an environment where I had Management Portal / Visual code access, but I had no terminal access. zpm was already present. otherwise you could add it in the same class.

  1. Create the following class file
  2. Compile. This will take a while, and then you will see the output from zpm!
  3. You can now open the webterminal by opening http://your-host/terminal/
Class Theo.Util.Webterminal Extends %RegisteredObject
{

/// Description
ClassMethod install() As %Status [ CodeMode = objectgenerator ]
{
    zpm "install webterminal"
}

}

Comments

Evgeny Shvarov · Jan 15, 2024

Nice "hack" in using ObjectScript Code Generator! ObjectScript is a powerful tool!

0
Jason Jones · Feb 1, 2024

I am getting a 401 error when trying to reach the page after install. I am running IRIS  2022.1.2 (Build 574U)  on my laptop. 

0
Stella Ticker · Apr 6, 2024

This did not work for me either. I used ##class(HS.UI.Navigation.RestHandler).BuildRootUrl() 

to get the host url. Then tried to launch the web terminal as listed in step 3. I got this error

"the requested URL/terminal was not found on this server"

@Theo Stolker 
Is there a step that may have been missed in these instructions?

0
STEPHEN Pisani  Apr 6, 2024 to Robert Cemper

Hi.  Note (which should be obvious), the typo in that there are only two 't's in http, so:

http​​​://localhost:52773/terminal/

0
Robert Cemper · Apr 6, 2024

Alternate approach:
in SMP SQL  run this:
 

CREATEPROCEDURE ZPM.terminal() LANGUAGE OBJECTSCRIPT
{
 zpm "install webterminal"
 quit 1
}
 and next
 SELECT ZPM.terminal()
0