App Center [examples]

to login and run an App directly without having to go through the App Center.

For example, put this in the browser address bar (or an href in a link).


or login, run an App and go to a specific page.


This enhancement provides the ability to use the reCAPTCHA login page to authenticate, setup the correct roles and permissions and then navigate to the specified app.

You can also authenticate and run a .rsp page. For example, where myreport.rsp resides in the library directory:


You can pass arguments like this:


Switching to the App Center

This will return to the App Center:


Logging out

This will exit the App and return to the Login page:



App center


I’ve published several of the example apps to my cloud server and I’ve had no problems accessing them locally in my browser. I then opened up the required firewall ports and was able to access the app centre, login and run the published apps from another desktop machine on my home wireless network.

I next tried to access the app centre via my chrome browser on my iPad and found that while I was able to access the app centre login screen, I was unable to login using any valid user credentials. I then tried accessing the app centre using my Galaxy tablet and found the same result. The app centre displays but I can’t login.


Double-check the login to see if the tablets are ‘helpfully’ auto-correcting – I’ve been caught out by auto-capitalisation before.

You can also enable logging on the Lianja Server:…ndows#Settings

This will require a Lianja Server restart. After restarting and retrying the login, check the \lianja\server\log folder for .log files.


You must be psychic! The user name was being upper cased and that, apparently, was the problem.


Lianja runs on Linux and Mac also. Thus the reason why usernames are cased (so the app behaves the same everywhere).


only the admin user is recognized to access the application form the app center, even when I use –username and –password switches in the shortcut.
Users and permission exist in the system database, I can access to them from the APP buider. I redeployed the system database but still more the user can’t be authenticated, apart from the default admin.
I have all users using admin role for the application!!


your issue is permissions related. If you are copying the installed app builder bin directory and it works then the user that copies that may have the required permissions but when you install they may not.

When you run the app center exit it then look in the log directory and attach it to a ticket. That tells us what your environment is that you are trying to run in.

Have you tried opening a command window then cd to the lianja\bin directory and type .\lianjaruntime.exe

That may shed some light on the issue you are having as you may have a duplicate dll in your path which is the wrong version.

You can delete the system database on your target directory and copy the development system database to be sure that it is being copied properly. It cannot be overwritten if its open in a client PC.

if you want to verify that you are not missing any dlls download dependency walker and open lianjaruntime.exe


I’m testing the Lianja Tablet Web UI Demo app on an iPad 4 and I’m running into some issues. I’m not sure if these are Lianja issues or iPad issues.

I am unable to scroll the App Centre main screen. I’ve published 13 apps and I can see 12 in portrait and 6 in landscape orientations, and I can run the apps that I can see, but I can’t scroll the screen to see all the apps.

The App Centre LogOut button doesn’t appear to do anything. Tapping the icon simply highlights LogOut and nothing else.


The App Center is primarily for desktop and web apps.

Mobile apps are normally built as discrete apps that are installed on mobile devices.

Running web apps on a touch enabled mobile device you will also encounter some permission issues if you are trying to access the camera, local storage etc. Mobile apps handle these permissions as well as the native UI controls such as the date picker.

Building a native PhoneGap app with the correct settings will allow you to request permission to access hardware specific functionality that may be rejected in a web app for security reasons.

in Lianja 3.2 the App Builder and the App Center now always uses UTF-8 character encoding unless you explicitly specify a –CODEPAGE or specify –NOUTF8 as a command line switch.

This change was introduced in order to provide better data compatibility between desktop, web and mobile apps as web and mobile always use UTF-8.


App Center

Note that the Lianja App Builder is for development, users use the Lianja App Center

The default login page for the Lianja App Center desktop client is drive:\lianja\cloudserver\appcenter\login.rsp,
for the web client it is drive:\lianja\cloudserver\tenants\public\wwwroot\l ogin.rsp.
So, you can back these up then modify as required or have a starting Page in your App that does further validation after the initial Lianja login.

The Lianja App Builder (development) runs with data access in exclusive mode to allow you to modify structures, build tag indexes, zap, pack etc.
The Lianja App Center (runtime) runs with data access in shared mode unless you specifically set exclusive on or specify exclusive use on the open database or use commands.

The embedded HTTP server port setting is in app settings. The port is shared between the app builder and the app center.

exist a way to know if I’m inside on Lianja App Builder or Lianja App Center?
Try Lianja.isRuntimeMode()

App Center

I see the app in a web page, but not in the app center…
Make sure the App is ‘Published and that you are looking in the correct App Category in the App Center.

The Lianja App Builder is the development environment.
The Lianja App Center is the desktop client for published and deployed Apps.
When you install the Lianja App Builder, one user is already created – the admin’ user, with the same password: ‘admin‘.
You don’t need to use these login details when you start the App Builder – you will be logged in automatically – but you do need them to log into the Lianja App Center or when you log out of the App Builder Home Workspace and want to login again without exiting the App Builder.

The normal way to use Lianja is to deploy Apps and let your users choose what App to run from the App Center after they login.
But did you know that for desktop apps you can design your own custom home page so that after a user logs in or they click on the “Home” icon in the header bar your custom home page app is displayed rather than the App Center.
Just add this command line switch to the App center on the desktop.

--homepageapp yourhomepageapp

Note also that there is an attribute in the App Settings to specify the “Home page app”.

Does a web app always have to begin with a login from App Center?
Can I have a Lianja web app run along with other legacy .NET apps – and ideally be able to queryWindows authentication instead of having a login?
[That’s our scheme today. We have a single authentication when people log into our intranet. After that, our separate web apps do a .NET call to look up the Windows login.]
No, if you look in the App settings you can enable guest access.
The reason the authentication through the App Center is important is that after login roles and permissions are assigned for the authenticated user. Bypassing Lianja authentication you lose that functionality.

We need to run our program automatically (absolutely no user intervention) at system startup on both windows and linux and in full screen (called kiosk mode?).
You just need to put the –kiosk –app appname switches on the lianjaruntime and set the app as guest access.

How could I set the window size of the app center to a fixed size and disable the maximize button?
I tried to set the window size of the application in app settings but upon deploying the app, lianja app center maximizes its size. I want the app center to be not re-sizable.
…window which contains the Webview hosting the desktop app center.
The issue is that there is a minumum resolution the main Windows can run in otherwise it will be maximized. I believe this was fixed in v2.0 and can be set with –geometry x,y,width,height

My application is made up of multiple apps.
Is there a way (an event or delegate of the app center) I can
display a special page when the users login into the application via the app center?
The “Initial page” attribute in the app settings handles that.
The “home page” attribute in the app settings determines what page to navigate to when the home icon is clicked.
The app center is also customizable as is the login page.

We need to run our program automatically (absolutely no user intervention) in full screen (called kiosk mode?)
Command line switches, including –kiosk to run the Lianja App Center in full screen kiosk mode
Have a look at the Command Line Switches doc – you can also specify –loginapp, –nosplashscreen, –username and others to configure whether the user needs to login, whether they see the App Center, splashscreen etc.

How to set the app as guest access?
‘Enable guest access’ is an App Setting.
Here I have set it to true, so without logging in I can access the example_mobileapp1 from:


Also, if the Lianja Cloud Server is enabled on port 80 or you are using the IIS ISAPI extension from:



When I press the button, the “label1” shows me 0, as if not recording or anything like I was not accessing the DB.
I should show what returns TTOC (DATETIME (), 1) as I show in the next picture being in the development environment:

And this other image Lianja App Center:
What could be happening? Is there a log of Lianja App Center?

Select a
use mytable order tag mytable again
Replace myfield with ttoc(datetime(),1)

Try removing the ‘again‘. You can run multiple sessions with the same App Center application to try.

Is it possible to run my app directly?
Without having to go through the “Lianja Login” and “Lianja App Center” where Apps are selected.
Yes, see here: Command Line Switches
For example:

C:\lianja\bin\lianjaruntime.exe --app myapp
C:\lianja\bin\lianjaruntime.exe --app myapp --nosplashscreen
C:\lianja\bin\lianjaruntime.exe --app myapp --nosplashscreen  --username admin --password admin

I would like to
start my app with a customised page size. i.e Less than maximised.
Have a look at the –geometry command line switch.
Command Line Switches

I can not use the app center on my computer, where I have the app builder.
in another PC where only the app center is, works my application.
the aplication it´s on a server drive w:\
I run this:

C:\lianja\bin\lianjaruntime.exe --app W:soporte

this only works at pc with only app center
this not works at pc with app builder
Your ‘soporte’ App is in the ‘public’ tenancy on the server in C:\lianja\cloudserver\tenants\public\apps\soporte

If your W: drive is mapped to C: on your server, the command would be

C:\lianja\bin\lianjaruntime.exe --runtimedir W: --app soporte

Or, if your W: drive is mapped to C:\lianja\cloudserver\tenants\public on your server, the command would be

C:\lianja\bin\lianjaruntime.exe --tenancy W: --app soporte

Have a look at the file c:\lianja\log\log.txt. That will list the directories it is using.

Did you specify a different drive for shared files when you installed the Lianja App Center?
It is not finding the data if you can see the form but not the data values.

App Center

To provide a nicer user experience in v1.2.4 the icon specified for an App tile is now deployed automatically and displayed in an App Center tile in both desktop and Web. Note that the minimum optimum size for an App tile icon is 96×96.

These tile icons are also active in the new “Page Center”.
You can copy your icons into the library directory (just drag and drop) and then reference them in the App “Settings” for the tile like this lib:/iconname.png

On your desktop shortcut if all you want to do is bypass the App Center and run a custom application written in Lianja/VFP using the Application Framework.
c:\lianja\bin\lianjaruntime main
By default that will look for the compiled main.dbo file.
You can run PHP, Python or JavaScript Applications just by adding the appropriate file extension.
You can add this shortcut inside your installer with a custom icon and remove the app center desktop shortcut.

Lianja as many of you know by now is a “platform” for developing and deploying business Apps, not just an IDE.
The basic development methodology is to break an application down into groups of smaller Apps. You then break the Apps down into pages then break the pages down into sections, fields and gadgets.
The focal point for end users is the “Lianja App Center” which provides optional login and displays tiles representing the Apps that the user has permission to run.
In the next version I have implemented the “
Lianja Page Center” which can optionally be used to navigate between the pages of an App. This is fully configurable.
So the steps are.
1. User logs in.
2. Selects an App from the App Center (Only those that the user can run are displayed based on their roles and permissions).
3. The Page Center for the App is displayed. The categories such as “Select a Page” (as can be seen in the attachments) are new attributes in the page attributes as is the tile size, color and caption. You tell the App to render a Page Center in the App attributes by checking the “Show Page Center” checkbox.
4. The user clicks a “Page Center tile” and navigates between the pages. Clicking the “Page menu icon” in the top left switches back to the page center. Clicking the “Home icon” in the header of any page or the Page Center itself switches back to the App Center.
This is all generated dynamically. You just set the attributes.
I will also add the ability to specify the icon to display in the “Tile”.
The existing page navigation menu can still be used as can the page selection panel in the left sidebar. The “Page Center” provides you with a simplified touch friendly interface for navigating between the pages of an App and reduces software maintenance and training of end users as it is a common interface for interacting with Apps and the pages of the Apps that you build in Lianja.
1. Login

2. The App Center is displayed.

3. Click or touch an App Center tile to display the “Page Center” for the App.

4. Click or touch a Page Center tile to switch between pages.

You declare the Page Center attributes for the tiles in the Page attributes dialog and the App Settings dialog.

customize the size and style of the tiles
Yes, and you can. The tiles are declared in the page attributes.

In Lianja v1.2, note that in a desktop App you can now extend the Lianja system object like this to pass data between apps. Try this from the console.
Lianja.mydata = object() = “Barry”
declare mytable[10]
Lianja.mydata.mytable = mytable
Lianja.mydata.mytable[1] = “Lianja”
Lianja.mydata.mytable[2] = object()
Lianja.mydata.mytable[2].name = “Hello world”
? json_encode( Lianja.mydata )
? json_decode( json_encode( Lianja.mydata ) )
So in other words
you can extend the Lianja system object with your own data that persists between each App that you open.
Lianja, unlike VFP reference counts the arrays and objects so they can be assigned into data structures as above.

App Center

Make sure you have put your icon in .\lianja\library\ and not .\lianja\lib\

Make a copy of the file \Lianja\cloudserver\tenants\public\wwwroot\login.r sp, modify it to your liking and then change the default page in the Lianja Server Manager to point to your new file.

App Center is the desktop client (runtime) and the default login is admin/admin. When you start the Lianja App Builder, you are logged in automatically. You can also use admin/admin as the username/password if you log out and want to log in again. The Lianja App Builder includes theLianja App Center for testing your Apps once built, published and deployed.

If you include the Lianja App Center desktop client in your Installer as discussed on the Forums previously (and the default behaviour of the Installer template), your users will start the Lianja App Center from the desktop shortcut, just as you can do on your development machine.

The App Center should be looking for Library files in C:\Lianja\cloudserver\tenants\public\library.

Is there an easy way to have a top menu bar sort of an application toolbar that provide user direct accessibility to sertain functions from any pages or any apps?
In my case, I have many apps and want the toolbar to available to the user once they login to the app centre which display all my apps. The
toolbar should persists when user get into the page centre too.
This will be similar to the top toolbar in Lianja app builder provides where we find options like “Dashboard”, “Documentation”, “Reset” and “Logout”
The App Center and the Page Center are .rsp files that generate dynamic HTML5/JavaScript.
you can customize these with your own background image and branding, and also add the menu bar that you mention by reading the appcenter.rspsource code.

I have a test app and now I want to see if I can create an installation file that I can run on another computer. I’d like to be able to run my app on a computer that does not have Lianja installed.
Looks like I need to install the “App Center Runtime Client Only” installed in \Lianja\Redist.
Just download the App Center Distro that matches the version of the App Builder and copy it into the redist directory.
This will be embedded in your installer file for you App and will install quietly on the target machine if it is not already installed.

What is the easiest way to customise the APP Center login screen?
Want to change the “Lianja login” and graphics, window title etc but will obviously leave all the copyright stuff intact at the bottom.

This is App Center on the desktop (we are using RDP to serve up Lianja). We don’t use Server Manager.
On dev machine have modified every version of Login.rsp & nothing changes when we fire up app Center.

That’s because you start Lianja with the –rdp switch which uses login_rdp.rsp not login.rsp.
it will be in the following location for desktop apps started with the –rdp command line switch:
Without that switch it is in:
After logging in the App Center will be displayed.
This is in:
and for –rdp
For Web Apps it is located in a tenancy (default is public) so it can be customized for each customer in a hosted cloud.
c:\lianja\cloudserver\tenants\public\wwwroot\login .rsp
and then the App Center…
c:\lianja\cloudserver\tenants\public\wwwroot\appce nter.rsp
So… You would setup virtual host mapping in the http server to map a customers data and apps. e.g. which would you map to.
The customer then would hit on

Which would cause all data accessed and all apps run to be via that virtual hosts wwwroot. If you register a domain name for the customer and setup the address record for that domain (e.g. in network solutions) you can then redirect to your hosted apps. e.g.

You can then have the default page to be login.rsp.
This is basically how multi-tenancy works in Lianja Cloud Server. One server and multiple customers. The “Tenancy” is the “domain” specified for the user when they login.
Also note that when firing up a desktop app using rdp you can have different login and app centers for each customer.
You accomplish this using the –customer custname command line switch.
This causes login_custname and app center_custname to be used so you can host multiple customers on a single server.
I hope this better explains how to customize the user experience for individual hosted customers.

In fact thats for the Web Client.
The desktop client (for –rdp) is in: