OpenWrt Forum Archive

Topic: New webgui for OpenWRT

The content of this topic has been archived between 9 Apr 2018 and 20 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

JUCI is a new webgui for OpenWRT. Originally developped for IOPSYS, you can now try juci on OpenWRT.

Here is full version of JUCI running on CG300 IOPSYS router:

https://raw.githubusercontent.com/mkschreder/luci-express/master/media/screenshot.jpg

Here I have it running on CC imx23 olinuxino :-)

http://i.imgur.com/wGg5ZVk.jpg

NOTE: instructions below may be slightly out of date. I will update instructions when I have more time to work on OpenWRT support.

Here is how to install it:

- checkout the juci openwrt branch from here: https://github.com/mkschreder/juciwrt.git

- Update and install the feed
./scripts/feeds update -a
./scripts/feeds update juci
./scripts/feeds install -f -a -p juci #necessary for overriding core packages!
./scripts/feeds install -a

- select juci in menuconfig
make menuconfig -> select juci apps you want (see juci docs for example packages selection)

- BUILD!

And it should work. If you then go to your router ip you should see the login screen. By default admin user is used to login but if you don't have password set for admin user you will not be able to login. So then go to the console and set password for admin user or change the user used for logging in by editing /etc/config/rpcd and then do /etc/init.d/rpcd restart.

Have fun! :-)

(Last edited by mkschreder on 3 Feb 2016, 13:20)

Hmmm...

( I should volunteer that I'm ar71xx )

I had a go on my buildroot which works OK. I did:

echo src-git juci https://github.com/mkschreder/juci-openwrt-feed.git >> feeds.conf
./scripts/feeds update
./scripts/feeds install -p juci -a

I then selected these packages:

dbonnes@db-buildr:~/openwrt/trunk$ cat .config | grep juci
CONFIG_FEED_juci=y
CONFIG_PACKAGE_juci=y
# CONFIG_PACKAGE_juci-asterisk is not set
# CONFIG_PACKAGE_juci-broadcom-dsl is not set
# CONFIG_PACKAGE_juci-broadcom-ethernet is not set
# CONFIG_PACKAGE_juci-broadcom-vlan is not set
# CONFIG_PACKAGE_juci-broadcom-wl is not set
CONFIG_PACKAGE_juci-ddns=y
CONFIG_PACKAGE_juci-diagnostics=y
CONFIG_PACKAGE_juci-dnsmasq-dhcp=y
CONFIG_PACKAGE_juci-dropbear=y
CONFIG_PACKAGE_juci-event=y
CONFIG_PACKAGE_juci-firewall-fw3=y
# CONFIG_PACKAGE_juci-igmpinfo is not set
# CONFIG_PACKAGE_juci-inteno-router is not set
# CONFIG_PACKAGE_juci-jquery-console is not set
CONFIG_PACKAGE_juci-macdb=y
CONFIG_PACKAGE_juci-minidlna=y
CONFIG_PACKAGE_juci-mod-status=y
CONFIG_PACKAGE_juci-mod-system=y
# CONFIG_PACKAGE_juci-natalie-dect is not set
# CONFIG_PACKAGE_juci-netmode is not set
CONFIG_PACKAGE_juci-network-netifd=y
CONFIG_PACKAGE_juci-router-openwrt=y
# CONFIG_PACKAGE_juci-samba is not set
# CONFIG_PACKAGE_juci-sysupgrade is not set
CONFIG_PACKAGE_juci-theme-inteno=y
CONFIG_PACKAGE_juci-upnp=y
CONFIG_PACKAGE_juci-usb=y
# CONFIG_PACKAGE_juci-theme-default is not set
CONFIG_PACKAGE_juci-uhttpd=y
CONFIG_PACKAGE_juci-uhttpd-mod-ubus=y
CONFIG_PACKAGE_juci-rpcd=y
# CONFIG_PACKAGE_juci-rpcd-mod-file is not set
CONFIG_PACKAGE_juci-ubus-core=y

and then:

make defconfig
make -j 1 V=s

But needed to then:

sudo apt-get install npm

and then:

sudo npm install -g grunt-cli

And now I get a lot of:

... <snip> ...

Any tips what I'm doing wrong?

(Last edited by zxdavb on 7 Sep 2015, 20:57)

Hi zxdavb,

I have also tried to compile the theme in CC.

In this project, I think he has used a lot no nodejs technique in inside. You need to install nodejs on your computer first first.

Besides

sudo apt-get install npm
sudo npm install -g grunt-cli

You also need to link to your of nodejs for compile

ln -sf /usr/bin/nodejs /usr/bin/node
sudo apt-get install uglifyjs yui-compressor

Hope this help

There are a few ways to get the build dependencies. WaterTiger's answer above should cover what you need. There is also a file called juci/bootstrap.sh here https://github.com/mkschreder/luci-expr … otstrap.sh to install the build tools. You can skip mocha and bower though because they are not needed for a normal build.

After WaterTiger's help, it has compiled without error.

I will test it tonight!

OK, stuck again...

Although I get:

root@db-router:~# ps -w | grep sbin | tail -n 5
 4434 root      1148 S    /usr/sbin/dropbear -F -P /var/run/dropbear.1.pid -p 8022 -K 300
 5501 root      1596 S    /sbin/rpcd
 5539 root      1548 S    {juci-eventd} /usr/bin/lua /sbin/juci-eventd
 5552 root      1564 S    {juci-netdevd} /usr/bin/lua /sbin/juci-netdevd
 5561 root      1192 S    grep sbin

I also get:

root@db-router:~# netstat -nltp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:53              0.0.0.0:*               LISTEN      2594/dnsmasq
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      2495/sshd
tcp        0      0 0.0.0.0:8022            0.0.0.0:*               LISTEN      1884/dropbear
tcp        0      0 :::5000                 :::*                    LISTEN      2680/miniupnpd
tcp        0      0 :::53                   :::*                    LISTEN      2594/dnsmasq
tcp        0      0 :::22                   :::*                    LISTEN      2495/sshd
tcp        0      0 :::8022                 :::*                    LISTEN      1884/dropbear

And apparently nothing in the syslog...

Any tips?  If I run /etc/init.d/uhttpd start, I still get the old web site.

(Last edited by zxdavb on 7 Sep 2015, 20:58)

@mkschreder:

WARNING: JUCI.module() is deprecated! [core]
WARNING: JUCI.module() is deprecated! [core]
WARNING: JUCI.module() is deprecated! [core]
Registering page 404: pages/404.html
Registering page bootstrap: 
Registering page login: pages/login.html
Registered new section type system.system
Registered new section type system.upgrade
Registered new section type netmode.mode
Registered new section type netmode.netmode
Registered new section type network.interface
Registered new section type network.route
Registered new section type layer2_interface_ethernet.ethernet_interface
Registered new section type ddns.service
Registered new section type hosts.host
Init UBUS
Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.3.15/$injector/modulerr?p0=juci&p1=Error%3A%2…%20at%20_t%20(http%3A%2F%2F192.168.1.1%2Fjs%2F00-juci-libs.js%3A38%3A19686)

root@OpenWrt:~# opkg list_installed *juci*
juci - 1.0.40-2146b9f1d250565271f51b35fa73f3fb00ffabb4
juci-rpcd - 1.0.18-830fbe9ac656c825cc86a990ce48c121da62ae6a
juci-rpcd-mod-file - 1.0.18-830fbe9ac656c825cc86a990ce48c121da62ae6a
juci-theme-inteno - 15.6.15
juci-ubus-core - 15.6.8
juci-uhttpd - 2014-10-27-fb9b5af83699c4e9841ff77f9a04824798c16575
juci-uhttpd-mod-ubus - 2014-10-27-fb9b5af83699c4e9841ff77f9a04824798c16575

Got this errors during compile:


http://pastebin.com/3CMhSjCy

What did i do wrong?

(Last edited by subixonfire on 7 Sep 2015, 23:24)

Thanks for this new webinterface. Can I also control the switch via the Webinterface to make VLAN's like on Luci?

The future is now!  :-) nice work mkschreder!

Any chance I could install it from the openwrt packages in some near future?

stangri wrote:

Any chance I could install it from the openwrt packages in some near future?

Or that you could publish MIPS ipk pckages?

As of now there is already a juci openwrt branch that builds a working gui. In the near future also I will add support for a lot of standard things that you have in openwrt. It's not hard to do but takes some time to implement in a way that works both for broadcom speciffic stack and openwrt standard. :-)

I had to add a dependency on libpthread to the ubus-scriptd makefile to get compilation to work for me.

once compiled, which had some permissions issues with npm accessing my ~/tmp/ directory but I got through it, I can't get juci to run on my x86_64 chaos calmer VM.

I'm getting an access denied error from the jsonrpc juci.ui.menu.  juci.js is all minified (uglified?) so it's tough to tell what's going on in short order.

No, I added juci repo to a caos calmer clone.  I'll give your juciwrt repo a  try now, couldn't find it on your github before, but I got it now.

I just found out something interesting. If I build my image with dash as default shell (/bin/sh -> /bin/dash), I get all kinds of problems. It seems not just related to juci... I have always used bash and everything worked fine.

So if you do this:
rm -f /bin/sh
ln -s /bin/bash /bin/sh

Then everything works fine.

I have added a change to juci that makes juci build with dash, but I was still getting other strange behaviour so now I switched back to using bash and my images build fine again.

openwrt barrier_breaker14.07
- Add juci feed to your feeds.conf.default
src-git juci https://github.com/mkschreder/juci-open … .git;devel

- Update and install the feed
./scripts/feeds update juci

./scripts/feeds install -p juci -a

         show  waring: No feed for package 'juci-mod-samba' found ,maybe it's already part of the standard packages?

make menuconfig select juci-core package

make
   show error:
------------error  begin-------------------
make[4]: [juci-install] Error 1 (ignored)
\033[0;33m[JS]\tjuci -> bin/www/js/01-juci.js\033[m
\033[0;33m[HTML]\tjuci -> bin/www/js/01-juci.tpl.js\033[m
./juci-build-tpl-cache: line 2: exec: : not found
make[4]: *** [bin/www/js/01-juci.tpl.js] Error 127
make[4]: Leaving directory `/root/openwrt/barrier_breaker/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/juci-322aacc2bd71fc5382de56fc7eeb88c455c821d9'
make[3]: *** [/root/openwrt/barrier_breaker/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/juci-322aacc2bd71fc5382de56fc7eeb88c455c821d9/.built] Error 2
make[3]: Leaving directory `/root/openwrt/barrier_breaker/feeds/juci/juci'
make[2]: *** [package/feeds/juci/juci/compile] Error 2
make[2]: Leaving directory `/root/openwrt/barrier_breaker'
make[1]: *** [/root/openwrt/barrier_breaker/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/stamp/.package_compile] Error 2
make[1]: Leaving directory `/root/openwrt/barrier_breaker'
make: *** [world] Error 2
--------------error  end-----------------

I just added to the 15.05 ,fllow your step ,but i got a problem, when i open 192.168.1.1 i can't see the web just like you posted pic, but i can see a file-tree cgi-bin/ ..... and there is also have a time string...i will post a pic later,

adersonleo wrote:

I just added to the 15.05 ,fllow your step ,but i got a problem, when i open 192.168.1.1 i can't see the web just like you posted pic, but i can see a file-tree cgi-bin/ ..... and there is also have a time string...i will post a pic later,


me too ,

I uninstall luci in the openwrt source firstly,

and install juci,

and make,

and run it,

and I can't see the beautiful web ..

chokyeung wrote:
adersonleo wrote:

I just added to the 15.05 ,fllow your step ,but i got a problem, when i open 192.168.1.1 i can't see the web just like you posted pic, but i can see a file-tree cgi-bin/ ..... and there is also have a time string...i will post a pic later,


me too ,

I uninstall luci in the openwrt source firstly,

and install juci,

and make,

and run it,

and I can't see the beautiful web ..

yeah...i am still trying on 14.07.and this time ...chrome show can't open this page..web may broken..and ..i am still trying:)

you should be trying with feed version v1.15.11. Are you Labouring Under Correct Knowledge? :-)

And also, are you building with patches from https://github.com/mkschreder/juciwrt.git? You can not build juci using current openwrt trunk. It is not going to work. You need to have these extra patches.

Additional note: there have been new changes in juci to how the menu system is configured through /etc/config/juci which have not made their way to the community builds. You can find example config here: https://github.com/mkschreder/juci/blob … ig.example

Until I update the community build to use new config it is probably not going to work either. :-)

Hello,

trying to install on my Buffalo with OpenWRT BB.
Followed the how-to, built with no problems, using https://github.com/mkschreder/juci-openwrt-feed.git

However I had custom uhttp config for luci and lua as below:

config uhttpd 'main'
    list listen_http '0.0.0.0:80'
    list listen_https '0.0.0.0:3601'
    option redirect_https '0'
    option home '/www'
    option rfc1918_filter '0'
    option max_requests '12'
    option max_connections '100'
    option cert '/etc/ssl/xxxxxxxxxx.bundle.crt'
    option key '/etc/ssl/xxxxxxxx.key'
#    option cgi_prefix '/cgi-bin'
    option lua_prefix '/luci'
        option lua_handler '/usr/lib/lua/luci/sgi/uhttpd.lua'
    option script_timeout '60'
    option network_timeout '30'
    option http_keepalive '20'
    option tcp_keepalive '1'
    option ubus_prefix '/ubus

and Juci not working with that, showing the page like here: http://screencloud.net/v/pW7K when I open the http://router-ip/

Is it possible to get working uhttpd config for Juci?

Thank you.

(Last edited by kixx09 on 16 Nov 2015, 12:16)

Seems that it's not about uhttpd config as I see other people have the same problem (didn't noticed when read the topic first).