Ability to specify terminal emulator in Linux

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
ColeopterusMaximus
User
User
Posts: 37
Joined: Fri Oct 29, 2010 11:29 am

Ability to specify terminal emulator in Linux

Post by ColeopterusMaximus »

In Linux when creating and running console applications from the IDE the current Purebasic (v6.0.2) behaviour seems to be hard-coded to try to run Gnome-Terminal and if that is not available then run xterm as last resort.

In my case I have two DEs installed in my computer, Gnome-Desktop and XFCE. I use Gnome exclusively for testing and I rather prefer to use xterm or xfce-terminal than Gnome-Terminal. Not just because of personal preference but also because in "gnome-terminal 3.48.1-1" when running the PB application Gnome-Terminal doesn't show any text, the terminal is blank.

I can remove the Gnome-Terminal executable and substitute it with a symlink to xterm as a workaround, however when Gnome-Terminal package is updated it obviously overwrites the symlink. So this solution is not the best.

What I think would work best is for Purebasic to run "x-terminal-emulator" instead first, then Gnome-Terminal, then xterm, so "x-terminal-emulator" can be symlinked to whatever terminal emulator we want to use thus achieving maximum flexibility with the least amount of effort :D

x-terminal-emulator is used in Debian/Ubuntu via the alternatives system to specify a default terminal, using this would allow one to specify the default terminal in Linux without much fuss.