Associate pb Files to purebasic how to ?
-
- Enthusiast
- Posts: 501
- Joined: Tue Oct 14, 2014 12:09 pm
Associate pb Files to purebasic how to ?
How do I associate PB files with Purebasic under Linux?
Re: Associate pb Files to purebasic how to ?
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.
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
-
- Enthusiast
- Posts: 501
- Joined: Tue Oct 14, 2014 12:09 pm
Re: Associate pb Files to purebasic how to ?
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
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
Re: Associate pb Files to purebasic how to ?
maybe add "sudo " ahead of the commandline instruction, to use admin priveleges which might be required
Re: Associate pb Files to purebasic how to ?
I'm working without associate pb files und use a simple install of purebasic
Link: Simple Install of PureBasic (Ubuntu, Mint)
Link: Simple Install of PureBasic (Ubuntu, Mint)
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Re: Associate pb Files to purebasic how to ?
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
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
Re: Associate pb Files to purebasic how to ?
x-user.xml file
Run in the terminal
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>
Code: Select all
sudo xdg-mime install x-user.xml
-
- Enthusiast
- Posts: 501
- Joined: Tue Oct 14, 2014 12:09 pm
Re: Associate pb Files to purebasic how to ?
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
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
Re: Associate pb Files to purebasic how to ?
Manually
1. Make a catalog with PureBasic (/home/user/purebasic). It can be different, but take into account the path to the program in this instruction.
2. Create a settings directory and copy the settings files there (/home/user/.purebasic). Same as "С:\Users\user\AppData\Roaming\PureBasic". You don't have to customize the color theme, etc., every time.
3. Copy the /home/user/purebasic/logo.png icon to /usr/share/pixmaps (You can change the path in the shortcut Icon=/home/user/purebasic/logo.png)
4. Create a shortcut to the program in the "/usr/share/applications/PureBasic.desktop" (And on the desktop)
5. Create an icon "text-purebasic.png" in the "/home/user/.icons" (/home/user/.icons/Faenza/mimetypes/16/text-purebasic.png)
Run the command to link the files to the program I pointed out in the previous post. You may need to install the xdg-utils package.
6. Open /home/user/.config/mimeapps.list. Add lines:
There are already sections, you just need to add a type and a shortcut to them (type=shortcut or type=shortcut1;shortcut2;shortcut3;). Here you list the programs that will be offered to open in them (Code highlighting in Geany).
7. Copy language to /home/user/purebasic/catalogs
That's it, finished
1. Make a catalog with PureBasic (/home/user/purebasic). It can be different, but take into account the path to the program in this instruction.
2. Create a settings directory and copy the settings files there (/home/user/.purebasic). Same as "С:\Users\user\AppData\Roaming\PureBasic". You don't have to customize the color theme, etc., every time.
3. Copy the /home/user/purebasic/logo.png icon to /usr/share/pixmaps (You can change the path in the shortcut Icon=/home/user/purebasic/logo.png)
4. Create a shortcut to the program in the "/usr/share/applications/PureBasic.desktop" (And on the desktop)
Code: Select all
[Desktop Entry]
Type=Application
Name=PureBasic
GenericName=PureBasic
Exec=/home/user/purebasic/compilers/purebasic %F
Terminal=false
Icon=/usr/share/pixmaps/purebasic.png
Categories=Development;Utility;IDE;
Comment=PureBasic development environment
Comment[ru]=Среда разработки PureBasic
MimeType=text/purebasic
Run the command to link the files to the program I pointed out in the previous post. You may need to install the xdg-utils package.
6. Open /home/user/.config/mimeapps.list. Add lines:
Code: Select all
[Default Applications]
text/purebasic=purebasic.desktop
[Added Associations]
text/purebasic=purebasic.desktop;geany.desktop;xed.desktop;
7. Copy language to /home/user/purebasic/catalogs
That's it, finished