"FreeBASIC program in Linux text mode Error?

Linux specific questions.
Post Reply
St_W
Posts: 1627
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: FreeBASIC program in Linux Error?

Post by St_W »

Gablea wrote:i have install gfxlib3 for Debian [...]
gfxlib3??

I just tested framebuffer support on my system and it seems to work, but only for a color depth >= 16. So the old screen mode (like e.g. SCREEN 13) don't work (just a black screen).
btw my system is still an older one: Linux debian 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt20-1+deb8u3 (2016-01-17) x86_64 GNU/Linux
Unfortunately I don't have a newer one to test.
caseih
Posts: 2158
Joined: Feb 26, 2007 5:32

Re: FreeBASIC program in Linux Error?

Post by caseih »

dkl wrote:On my Ubuntu using the gfxlib2 fbdev backend requires explicit permissions - either being in the "video" group, or running as root (access to /dev/fb0 is restricted that way). But it works, even ScreenRes with 32bit per pixel...

Without permissions Screen/ScreenRes gives "Illegal function call".

(tested by switching to tty1, while X server was running on tty7 as usual)
Doesn't give any error message for me. I have no framebuffer device so I created an empty dummy node and made sure the permission were such that my user cannot read or write to this file. Then I ran a test program that uses Screen 12 and it simply printed my test output to the text console. I traced the execution and it tries to open /dev/fb0 but each time the OS tells it permission denied. Yet there's no runtime error. This is stock FB 1.05. Is this not intended behavior?
caseih
Posts: 2158
Joined: Feb 26, 2007 5:32

Re: FreeBASIC program in Linux Error?

Post by caseih »

Gablea wrote:it is a USB Keyboard attached to the PoS Terminals screen (usb) and it works in console as I can press the keys and a-k will show upbut When I start the PoS application I should be able to press a and have the cashier sign on screen appear but nothing
Very strange. There are no drivers needed for keyboards. Does this keyboard work with a normal desktop environment like Gnome on this computer? Again, what do the messages say in /var/log/messages when you plug it in.

Just a little complaint. St_W and I have both given you some specific things to test and check, such as the /var/log/messages thing, for but I have never seen you respond to them and tell us what you learned from them. Makes trying to help a bit frustrating. To get to the bottom of this you have to methodically isolate the problem, which is what we've been trying to help you do.
dkl
Site Admin
Posts: 3235
Joined: Jul 28, 2005 14:45
Location: Germany

Re: FreeBASIC program in Linux Error?

Post by dkl »

To see the Screen error, I suppose you'd have to compile with -e, or use ScreenRes as a function and check its result.
Gablea
Posts: 1104
Joined: Apr 06, 2010 0:05
Location: Northampton, United Kingdom
Contact:

Re: FreeBASIC program in Linux Error?

Post by Gablea »

if there was anything in th /var/log/messages file i would have said but when I use sudo nano /var/log/messages I get a lank file with the words ** NEW FILE ** show up.

And Yes the keyboard works fine inside the Plan CLI of Debian as well as XFCE desktop.

I have even tried to reinstall 8.2 (as that worked fine) but debian installed 8.5 (even though I was using 8.2 installer)
petan
Posts: 683
Joined: Feb 16, 2010 15:34
Location: Europe
Contact:

Re: FreeBASIC program in Linux Error?

Post by petan »

Did you try another handy linux distro with your app to check, where is your problem ? OS , or app ?
I see you are hardly oriented on Debian only.Why?
I have discovered that's quite miracle to find properly configured and working distro&version.
So if your older Debian & app work OK together, and newest distro NOT => It's not a problem in Freebasic, but in misconfigured OS.
Gablea
Posts: 1104
Joined: Apr 06, 2010 0:05
Location: Northampton, United Kingdom
Contact:

Re: FreeBASIC program in Linux Error?

Post by Gablea »

I only use Debian as it is the only Distro that will install onto the Terminal (apart from Windows) I have been thinking about changing but I need to have a super lightweight Operating system that would work on a 566 MHz CPU and 512MB RAM

I have even thought about going back to Windows (remove as much as I can from the Install)
petan
Posts: 683
Joined: Feb 16, 2010 15:34
Location: Europe
Contact:

Re: FreeBASIC program in Linux Error?

Post by petan »

Ahh, yeah, now I understand, thx for detailed words.
But why so low frequency powered CPU ? ( I had Duron 700MHz used so about in 2001 year ...).

This looks like you have a few liquere shops network connected over your bill cashier app, where very low powered desktop PC are used as simple terminals only.

I think it's hard to find OSs & distros, which fulfills your needs.
I know that distros developers often write insufficient minimal HW requirement, to be their OS properly working.

This is fundamental question to have sufficient OS selected/installed for such low hardware, IMO.
Gablea
Posts: 1104
Joined: Apr 06, 2010 0:05
Location: Northampton, United Kingdom
Contact:

Re: FreeBASIC program in Linux Error?

Post by Gablea »

the CPUs are low because they are Point of sale systems (they do not progress as quickly as desktop PCs do)

I use to have DOS running on my PoS terminals but I can not use that at the moment (as noo way to make a DOS version of the mySQL interface)

if I could to that I would move back to DOS is a flash.

this is my post about the DOS MySQL access http://www.freebasic.net/forum/viewtopi ... 7&p=220632 i am sure someone is smart enought to work out how to do it.
petan
Posts: 683
Joined: Feb 16, 2010 15:34
Location: Europe
Contact:

Re: FreeBASIC program in Linux Error?

Post by petan »

For low HW and safe running services you need OS fully supported
maybe take a look on FreeBSD,
what I found quickly
http://www.freebsd.org/doc/en_US.ISO885 ... dware.html
ISOs
ftp://ftp.freebsd.org/pub/FreeBSD/relea ... MAGES/9.3/
Last edited by petan on Jun 25, 2016 14:33, edited 1 time in total.
Gablea
Posts: 1104
Joined: Apr 06, 2010 0:05
Location: Northampton, United Kingdom
Contact:

Re: FreeBASIC program in Linux Error?

Post by Gablea »

Thanks I Shall look into that and give it a test run.
caseih
Posts: 2158
Joined: Feb 26, 2007 5:32

Re: FreeBASIC program in Linux Error?

Post by caseih »

dkl wrote:To see the Screen error, I suppose you'd have to compile with -e, or use ScreenRes as a function and check its result.
Oh right! I had forgotten about that. Gablea you definitely should re-compile and turn on the runtime checking stuff. That should help you pin down the problem. Excellent point about the ScreenRes function returning a success or failure value! Gablea give that a try and let us know what it says.
Gablea wrote:if there was anything in th /var/log/messages file i would have said but when I use sudo nano /var/log/messages I get a lank file with the words ** NEW FILE ** show up.
Well unless you tell me I can't know. I wonder if this version of Debian is only using the systemd journal and not writing logs anymore. I have Debian 8.4 on my laptop and it definitely has a syslog in /var/log/messages. To view logs with systemd you can run "journalctl" to dump the last 10 messages, or run "journalctl -f" to continuously list them while you plug in the hardware. However...
And Yes the keyboard works fine inside the Plan CLI of Debian as well as XFCE desktop.
Hmm, so it should work just fine without the desktop environment. Very strange. The kiosks I ran in the past were bare X sessions with no desktop running and even no window manager, and I had usb keyboards and usb card reader wedges working just fine with them. So I'm not sure what's going on. Could be that the keyboard focus isn't working properly with the FB window, which would mean you may need to run a Window manager such as "metacity" to allow the keyboard focus to work right.
I have even tried to reinstall 8.2 (as that worked fine) but debian installed 8.5 (even though I was using 8.2 installer)
And the result of reinstalling 8.2 was?
petan wrote:For low HW and safe running services you need OS fully supported
maybe take a look on FreeBSD, what I found quickly
Unfortunately you didn't look to see whether FreeBASIC even works on FreeBSD. I suspect it does, but would require compiling it from source, bootstrapping it from a Linux machine probably since there is no existing FB compiler on FreeBSD to compile itself with. Besides that, using FreeBSD is just changing one set of problems for another. And Linux runs just fine on older hardware or light-weight specs. FreeBSD has no inherent advantage over it in this area.
petan
Posts: 683
Joined: Feb 16, 2010 15:34
Location: Europe
Contact:

Re: FreeBASIC program in Linux Error?

Post by petan »

@ caseih
FreeBSD was a quick tip only. IIRC, some time ago some FB member had compiler package for 'BSD' system.
Of course, optimal way for Andy, IMO, is keeping on working Debian 8.2, if upgrade to 8.5 is crappy..
Also, used 566MHz CPUs are unknown.Are they very old chips, or newer ??
Next, NPoS terminals connected in network permanently, or a few times per day to making selling summary reports ?
If yes, stable and secure/updated linux distro is highly needed.

Remembering my troubles on XP with Sempron 2.2 and 512MB RAM when more bigger apps opened alltogether,
the same with KDE, Gnome distros.
For Andy's HW parameters I don't know such actual, active, secured & supported linux distro.
It needs reply from really specialist in this theme, because all is developed for modern things.
caseih
Posts: 2158
Joined: Feb 26, 2007 5:32

Re: FreeBASIC program in Linux Error?

Post by caseih »

Yes and Debian fits the bill. His hardware may seem strange to you and me, but it's still apparently well-supported by Debian. The CPU is slow, but handles the latest stable kernels, and it has USB hardware. He can't run Gnome true, but basic X could still work well, and even a minimal desktop like xfce would run.

Getting the framebuffer device to work, however, is proving difficult. Looking forward to hearing what messages he gets when he compiles with -e to enable runtime error checking.
petan
Posts: 683
Joined: Feb 16, 2010 15:34
Location: Europe
Contact:

Re: FreeBASIC program in Linux Error?

Post by petan »

Agree.But that works, just seeing on d'load page for LAST version of 7 = 7.11.
Reading what to do in troubles - amazing, especially last choice = pay a consultant.
Old true is still right - Debian is not for beginners and if you want to have something different setuped...
IRC channel help ?
Post Reply