Page 1 of 1

Linux Runtime on Headless Server

Posted: Fri Aug 22, 2014 9:58 pm
by dcpbarrington
Forum,

I've used LiveCode to create a simple utility program that I want to run on a headless 64 bit Ubuntu 12.04 server in a cron job daily.

The program simply opens the database and modifies a table value and closes the stack. Nothing much to it and it works fine on my Ubuntu development server that has a full GUI installed.

However when I upload it to the target 64bit VPS set the privileges to execute and try to run it I get the following error message:

$ ./FreeConnections < /dev/null > /dev/null
$ Can't open display

Do I need to install the full graphics library on the server to to be able to run this utility program?

I do have LiveCode server running on the Ubuntu 64bit server and have installed the 32-bit libraries with the following command.

$ sudo apt-get install ia32-libs

I must be missing some libraries. Though I could just send the output to /dev/null
Thanks for the help.
Dan

Re: Linux Runtime on Headless Server

Posted: Fri Aug 22, 2014 10:04 pm
by FourthWorld
"Can't open display" suggests it's trying to initialize a graphical interface, which will be difficult to do on a server since there isn't one. :)

You can tell the engine to bypass all GUI initialization by passing -ui as an argument in the command line:

./SomeAppName -ui

Re: Linux Runtime on Headless Server

Posted: Mon Aug 25, 2014 2:46 am
by dcpbarrington
Richard,

Thank you so much for the command line arguments. Just what I needed. Where would I have found that information in the documentation?

Now the only error message I get is the following:

Use of deprecated SAXv1 function setDocumentLocator

Looks like LiveCode is using some old function library SAXv1. I'm assuming that RunRev knows that is an issue for Ubuntu.
Should I not be including one of the RunTime libraryies in the Standalone Application Settings? I have all the following enabled
> Unix File Selector
> Unix Page Setup
> Unix Printer Chooser
> Unix Color Chooser

Thanks for the help.
Dan

Re: Linux Runtime on Headless Server

Posted: Tue Aug 26, 2014 4:09 am
by FourthWorld
Those elements are UI widgets. If you're running without a UI you won't need them (and even with a UI, LiveCode has good hooks for just about every modern Linux so I've never used those even in desktop app).

Have you filed a bug report on the old lib dependency?

Re: Linux Runtime on Headless Server

Posted: Tue Aug 26, 2014 6:16 pm
by dcpbarrington
Richard,

No I have not filed a bug report. I will do that.
Dan