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 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.