Where are the LuCI directories?

Hi all,

i've just compiled a OS derived from OpenWrt. This is running quite well on the device (CortexA7 iMX6ULL) and I'd like to add a new custom page to LuCI module.

The default pages are browseble correctly under the link http://192.168.10.116/cgi-bin/luci/.

So I'm following the rules under https://openwrt.org/docs/guide-developer/luci and https://github.com/openwrt/luci/wiki/ModulesHowTo guides but I'm not able to get/find the active folders where LuCI lives, for example the folder is missing:

root@horizongw:~# ls /usr/lib/lua
ls: /usr/lib/lua: No such file or directory

How is possible?

How can I get the luci-path value and the other directories?

Thanks!

Hello,
do find your paths if you run

find / -type d -name luci 2>/dev/null

on the router?

As I understand: different router-packages, different standard installation paths.

edit: ls /rom/usr/share/ucode/luci/controller
would be the path where I could put my application files, I think. Never tried it. :stuck_out_tongue:

Hello @anon22003091 ,

thanks for reply.

This is the output of some commands:

root@horizongw:~#
root@horizongw:~# find / -type d -name luci 2>/dev/null
/usr/lib/ucode/luci
/usr/share/luci
/usr/share/ucode/luci
root@horizongw:~#
root@horizongw:~# ls /usr/lib/ucode/luci
core.so
root@horizongw:~# ls /usr/share/luci/
menu.d
root@horizongw:~# ls /usr/share/luci/menu.d/
luci-app-firewall.json         luci-mod-network.json
luci-app-package-manager.json  luci-mod-status.json
luci-app-snmpd.json            luci-mod-system.json
luci-base.json
root@horizongw:~#
root@horizongw:~#
root@horizongw:~# ls /usr/share/ucode/
fw4.uc     iwinfo.uc  luci/      wifi/
root@horizongw:~# ls /usr/share/ucode/luci/
controller     http.uc        sys.uc         uhttpd.uc      zoneinfo.uc
dispatcher.uc  runtime.uc     template       version.uc
root@horizongw:~# ls /usr/share/ucode/luci/controller/
admin
root@horizongw:~# ls /usr/share/ucode/luci/controller/admin/
index.uc  uci.uc
root@horizongw:~#

Thanks!

@SteMMo
You may find more if you change luci to luci*
find / -type d -name luci* 2>/dev/null

Such as /www/luci-static

you need to include the luci-compat package if you intend to use lua modules ...

I always use: MobaXterm on Windows and WindTerm on Ubuntu as an alternative terminal to access openwrt SSH, then I could get the full file system picture.

A good starting point is to study the luci example:

https://github.com/openwrt/luci/tree/master/applications/luci-app-example

You could enable it in your .configfile, complie(make) and install, then you'll see the example page after login luci on your router.