Linux Runtime on Headless Server

Deploying to Linux? Get penguinated here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
dcpbarrington
Posts: 87
Joined: Tue Nov 13, 2007 6:40 pm

Linux Runtime on Headless Server

Post by dcpbarrington » Fri Aug 22, 2014 9:58 pm

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

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9855
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Linux Runtime on Headless Server

Post by FourthWorld » Fri Aug 22, 2014 10:04 pm

"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
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

dcpbarrington
Posts: 87
Joined: Tue Nov 13, 2007 6:40 pm

Re: Linux Runtime on Headless Server

Post by dcpbarrington » Mon Aug 25, 2014 2:46 am

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

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9855
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Linux Runtime on Headless Server

Post by FourthWorld » Tue Aug 26, 2014 4:09 am

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?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

dcpbarrington
Posts: 87
Joined: Tue Nov 13, 2007 6:40 pm

Re: Linux Runtime on Headless Server

Post by dcpbarrington » Tue Aug 26, 2014 6:16 pm

Richard,

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

Post Reply

Return to “Linux”