It is currently Tue Jan 26, 2021 9:23 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Linux Console app causing "cannot open display:" error
PostPosted: Wed Apr 01, 2020 4:54 pm 
Offline
Enthusiast
Enthusiast

Joined: Thu May 21, 2009 6:56 pm
Posts: 599
Hi Fred

My issue is that I want to print documents from Linux daemon. The daemon simply listens on a TCP port for a document request and then prints the document to the default printer. I built a Linux console app in PB 5.71 and the daemon works fine as long as the user is logged into the Linux PC. However, the daemon will not start if you re-boot the PC and then never login.

Can you tell me whether this something PureBasic is causing or whether it is the result of an underlying Linux library used by Purebasic? If it is an underlying library can you tell me which one as I would like to contact the developers to see if the issue can be fixed.

Thanks,
Simon

_________________
Simon White
dCipher Computing


Top
 Profile  
Reply with quote  
 Post subject: Re: Linux Console app causing "cannot open display:" error
PostPosted: Wed Apr 01, 2020 5:31 pm 
Offline
Addict
Addict
User avatar

Joined: Fri May 12, 2006 6:51 pm
Posts: 2820
Location: Germany
I think is not a Bug...

I assume that the application runs under a wrong authorization.
Only when the user has also logged on, the application can run.

But I also don't know how to get an application to run under another authorization.

_________________
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


Top
 Profile  
Reply with quote  
 Post subject: Re: Linux Console app causing "cannot open display:" error
PostPosted: Wed Apr 01, 2020 9:07 pm 
Offline
Enthusiast
Enthusiast

Joined: Thu May 21, 2009 6:56 pm
Posts: 599
mk-soft wrote:
I think is not a Bug...

I assume that the application runs under a wrong authorization.
Only when the user has also logged on, the application can run.

But I also don't know how to get an application to run under another authorization.


This daemon works perfectly as long as I do not include any code using SVG for printing. In fact it has been working for several years. The problem began when I added the ability to print to the default printer using SVG. Now it will only run if the user is logged in whereas before it always ran regardless of whether a user logged in. So there is something in the graphics library checking for a display. However my PB application never uses a display.

Simon

_________________
Simon White
dCipher Computing


Top
 Profile  
Reply with quote  
 Post subject: Re: Linux Console app causing "cannot open display:" error
PostPosted: Fri Apr 03, 2020 2:08 pm 
Offline
Enthusiast
Enthusiast

Joined: Thu May 21, 2009 6:56 pm
Posts: 599
Hi

I would still like to know what the real issue with this problem but for the time being I solved it by creating a second user with an automatic login and then added:

Code:
    nohup /home/remote/KardTech/FusionPro/dcfusnblad &


to the .bashrc file of the second user. Now the dcfusnblad executable runs and prints forms as expected.

Simon

_________________
Simon White
dCipher Computing


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye