User Tools

Site Tools


k15:k15.1:k15.1.4:start

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:

B1

Figure 15.1.4.1: 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)
  Desktop.OpenTerminal(sDirectory)
End ' OpenTerminal(..)
 
Public Sub btnOpenTerminal_Click()
  OpenTerminal(User.Home &/ "DBT")
End ' btnOpenTerminal_Click()

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

Download

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