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

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.
k15/k15.1/k15.1.4/start.txt · Last modified: by 127.0.0.1