Gambas Documentation
Application Repository
Code Snippets
Compilation & Installation from source code
Components
Controls pictures
Deprecated components
Developer Documentation
Development Environment Documentation
Documents
Error Messages
Gambas Playground
How To's
How To Change the Tab Order of GUI Controls
How To Contribute
How to Create and Open a ".gmail.txt" Archive
How to deal with Git and Gitlab concerning your Project
How to deal with Git and Gitlab for Gambas
How To Deal With Subversion for Gambas
How To Display a Chinese Character
How To Draw with gb.Cairo
How To Enter Data With gb.db.form
How To Get Gambas Web Started (1)
How To Get Started
How To Interface Gambas With External Libraries
How To make a chart with the gb.chart component
How to make a report with Gambas
How To Make KDE Run Gambas Executables Automatically
How To Open, Debug & Compile The IDE
How To Open a MySQL connection and use it
How To Open a SQLite connection and use it
How To Open a Unix ODBC connection and use it
How To Package Gambas
How To Package your Project
How To Print
How to Run Gambas and Gambas Apps on Windows using WSL
How To Run Gambas On Windows using Cygwin
How To Translate A Gambas Project
How To Translate Gambas
How To Translate The Gambas IDE (deprecated)
How To Use Parallel Port
Language Index
Language Overviews
Last Changes
Lexicon
README
Search the wiki
To Do
Topics
Tutorials
Wiki License
Wiki Manual

How To Make KDE Run Gambas Executables Automatically

Note: $YOURKDE is the installation directory of KDE in your system. In my Slackware 10.0 it is /opt/kde. To know yours just type in a console:
$ kde-config --prefix.

1. Creates a MIME type for Gambas executable

Create the text file $YOURKDE/share/mimelnk/application/x-gambas.desktop.

Open it and add these lines:

[Desktop Entry]
Encoding=UTF-8
Comment=Gambas executable
Icon=binary
Type=MimeType
MimeType=application/x-gambas

2. Creates a desktop file for the interpreter

Creates the text file $YOURKDE/share/applnk/.hidden/gbr2.desktop. Notice the dot before hidden.

Open it and add these lines:

[Desktop Entry]
Exec=gbr2
InitialPreference=1
MimeType=application/x-gambas
Name=gbr2
Terminal=false
Type=Application

3. Adds Gambas executables description to the KDE magic file

The next file already exists!!! You just have to edit it... Be careful!

Edit the file $YOURKDE/share/mimelnk/magic and add this line:
0      string     #!/usr/bin/gbr3    application/x-gambas

That's all.

Restart your kde session. The Gambas executables will have the generic icon "binary" and you will be able to run them by just clicking on them.

Adapted from a mail of Stefano Palmeri