Associate pb Files to purebasic how to ?

Linux specific forum
loulou2522
Enthusiast
Enthusiast
Posts: 371
Joined: Tue Oct 14, 2014 12:09 pm

Associate pb Files to purebasic how to ?

Post by loulou2522 »

How do I associate PB files with Purebasic under Linux?
User avatar
ts-soft
Always Here
Always Here
Posts: 5758
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: Associate pb Files to purebasic how to ?

Post by ts-soft »

PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
loulou2522
Enthusiast
Enthusiast
Posts: 371
Joined: Tue Oct 14, 2014 12:09 pm

Re: Associate pb Files to purebasic how to ?

Post by loulou2522 »

Hi-Tsoft,
THanks for your answers. I use Linux Ubuntu 20 and Purebasic 73 LTS version on a virtual machine (virtual box)
The program you give me normally runs under terminal and in the Purebasic installation directory, with the command sh register.sh .The program runs without errors but the PB file assignments do not work in the output. Is there anything I'm not doing right because I'm a linux beginner?
It seems that Purebasic.xml won't be created
User avatar
Keya
Addict
Addict
Posts: 1765
Joined: Thu Jun 04, 2015 7:10 am

Re: Associate pb Files to purebasic how to ?

Post by Keya »

maybe add "sudo " ahead of the commandline instruction, to use admin priveleges which might be required
User avatar
mk-soft
Addict
Addict
Posts: 2975
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Associate pb Files to purebasic how to ?

Post by mk-soft »

I'm working without associate pb files und use a simple install of purebasic

Link: Simple Install of PureBasic (Ubuntu, Mint)
My Projects ThreadToGUI / OOP-BaseClass / OOP-BaseClassDispatch / EventDesigner V3
PB v3.30 / v5.70 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace
User avatar
Marc56us
Addict
Addict
Posts: 1034
Joined: Sat Feb 08, 2014 3:26 pm
Location: France

Re: Associate pb Files to purebasic how to ?

Post by Marc56us »

I don't full understand what you want, but, some tips:

1. Linux don't care about running direct or in a Virtual Machine (same)
2. There is no extension in unix file names, it is just a naming convention sometimes used by users used to Windows.
3. The graphical interface (XFCE, KDE, Gnome etc) is independent of the operating system (the kernel and the console tools). It uses a file convention to manage extensions if necessary.
4. In graphic mode, you can associate data file (so open IDE when double clic on .pb) with some program, like in Windows. To do that, left click on .pb and follow instruction on "open with..." and selec "other"
5. "associated" file does not work in console

:wink:
(English is not my native language, I use an online translator.)
AZJIO
User
User
Posts: 96
Joined: Sun May 14, 2017 1:48 am

Re: Associate pb Files to purebasic how to ?

Post by AZJIO »

x-user.xml file

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">

   <mime-type type="text/purebasic">
    <comment>PureBasic source code</comment>
    <generic-icon name="text-purebasic"/>
    <glob pattern="*.pb"/>
    <glob pattern="*.pbi"/>
    <glob pattern="*.pbf"/>
    <glob pattern="*.pbp"/>
   </mime-type>

</mime-info>
Run in the terminal

Code: Select all

sudo xdg-mime install x-user.xml
loulou2522
Enthusiast
Enthusiast
Posts: 371
Joined: Tue Oct 14, 2014 12:09 pm

Re: Associate pb Files to purebasic how to ?

Post by loulou2522 »

Thanks Azijo,
I mke whqt you do, but files where not assigned to PB. May be it provide from the fact i install purebasic manually and not with an automatic way.
Pure Basic is not recogniezd as an application in my virtual box.
Can you give me advise to help me in my problem ?
Thanks
Post Reply