How a create custom luci gui interface

I want to build a custom gui luci interface .or to change the openwrt name on luci overview page to my customised name .is it possible to do that ? If yes,how ?can anyone please help me .

For this part, go to LuCI→"System" menu→"System" page→"General Settings" tab and change the Hostname option.

Thanks for the reply.I am having a customised firmware,and i want the customised hostname for luci interface in every device with this firmware installed, how can i do that can you please explain.

hi @adithya229

customized firmware? how you customized? buildroot ? compile?

you didn't explain exactly what you want
every device need to have same hostname out of box?

Hello @NPeca75 ,
I have customised a firmware using customised firmware selector,
i have 3 devices in my hand and i want to install my customised firmware, i want the hostname of luci page to be same without getting in every general setting.

so, since you using online build, your only option is so called "uci-defaults"
here is documentation

in your case, command will be something similar to

set system.@system[0].hostname='xxx.yyyy.zzzz'

To elaborate a bit on @NPeca75's solution, uci-defaults is a shell script that runs on first boot. On the firmware selector, you put this script into the text box called "Script to run on first boot (uci-defaults)". The full script you can put into that text box would look like this:

uci -q batch << EOF
set system.@system[0].hostname='my_custom_name'

You can add more configuration lines between the EOF tokens for further customization.

1 Like

@elbertmai is i have to uci commit after this?

No, you don't need uci commit with uci batch. You only need it after these commands:

  • uci set
  • uci add
  • uci rename
  • uci delete
1 Like

but its not working brother,could you please suggest me a way.

What doesn't work? The firmware selector build? Hostname doesn't seem to have changed? (You may need a reboot to ensure the new name is used.)

Hostname doesn't seem to have changed

i did the reboot but the hostname not changed

Actually it appears I was mistaken. The UCI defaults example doesn't include a commit command, so I thought it wasn't necessary. Looking closer into other examples in /rom/etc/uci-defaults it appears that you do in fact need it. Try this instead:

uci -q batch << EOF
set system.@system[0].hostname='my_custom_name'
1 Like

The commit command is needed to write the changes to the actual config files. At least if you use uci commands for the changes.

You seem to be trying to fork OpenWrt, based on you most recent posts.

Is that your goal?

I don't have the capability to fork or engage in development activities, including forking OpenWrt. However, I can certainly discuss OpenWrt, its features, development process, and related topics ,based on my recent posts you could got that the knowledge i have in openwrt.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.