[Gambas-user] Gambas mime type

T Lee Davidson t.lee.davidson at ...626...
Wed Apr 6 17:37:33 CEST 2016


Matti,

I was wrong about the pattern in "/usr/share/mimelnk/application/x-gambas3.desktop". That mimetype file is for Gambas scripts, 
not Gambas executables.

And, I recommend ignoring my instruction to create "~/.local/share/applications/gbr3.desktop". It might be much better to just 
create the association in System Settings.

Once there, go to Applications -> File Associations and search on "gambas". There should be two there already which you can use 
as examples to create a "x-gambas" type. You can switch back an forth between the types as you create the new one.

I chose the "application-x-gambas" icon from System icons, added "*.gambas" as a filename pattern, described it as "Gambas 
executable", and added "/usr/bin/gbr3" in Application Preference Order.

Once I clicked Apply, the file, "~/.local/share/applications/gbr3.desktop", was created and the mimetype database updated 
automatically.


On 04/05/2016 09:47 PM, T Lee Davidson wrote:
> On 04/05/2016 03:17 PM, Matti wrote:
>> Unfortunately, I have to set up my system (openSUSE 42.1) completely new.
>> I installed Gambas 3.8.4 fromhttp://download.opensuse.org/repositories/Education/openSUSE_Leap_42.1/, and it runs ok as it did
>> before.
>>
>> But the packager seems to have made a mistake, as *.gambas files are regarded as plain text documents and won't start by
>> clicking on them.
>>
>> So, does anyone know how to make KDE run *.gambas files automatically?
>
> Matti,
>
> I think the mistake in "/usr/share/mimelnk/application/x-gambas3.desktop" is the Patterns being set to "*.g;*.G". I tried
> correcting that to "*.gambas;*.Gambas" on my system. But, I got impatient and didn't want bother seeing if a reboot would cause
> the new pattern to be picked up.
>
> Here's a quick fix.
>
> Ensure that you have a file "~/.local/share/applications/gbr3.desktop" with the content:
> [Desktop Entry]
> Exec=/usr/bin/gbr3
> MimeType=application/gambas;
> Name=gbr3
> NoDisplay=true
> Type=Application
>
> (It can sometimes take a minute or so for the system to recognize changes in "~/.local/share/applications".)
>
> Then go to System Settings -> Applications -> File Associations. Search for "gambas". It should be:
> Filename patterns: *.gambas
> Description: application/gambas
> Application Preference Order: gbr3
>
> If it's not there, add it.
>

-- 
Lee
__________

"Artificial Intelligence is no match for natural stupidity."




More information about the User mailing list