User Tools

Site Tools


15.1.4 Method Desktop. OpenTerminal (gb. desktop)

When you call this method from a Gambas program, a terminal is started that corresponds to the active desktop:

KDE   → konsole
Gnome → gnome-terminal
LXDE  →	lxterminal
Xfce  → xfce4-terminal
Static Sub OpenTerminal ( [ Dir As String ] )

You can optionally specify a start directory as a parameter. If you do not specify this, the home directory is automatically selected as the start directory:


Figure Start Gnome terminal with the start directory ~/DBT

When specifying the source code like the following, make sure that the start directory is optional/:

Public Sub OpenTerminal(Optional sDirectory As String)
End ' OpenTerminal(..)
Public Sub btnOpenTerminal_Click()
  OpenTerminal(User.Home &/ "DBT")
End ' btnOpenTerminal_Click()

After closing the terminal, continue working in the Gambas program.


The website uses a temporary session cookie. This technically necessary cookie is deleted when the browser is closed. You can find information on cookies in our privacy policy.
k15/k15.1/k15.1.4/start.txt · Last modified: 28.09.2023 by emma

Page Tools