[NOOB] /etc/local doesn't exist ? [SOLVED] it's /usr/local !!

Started by MarieSophieSG, October 03, 2024, 01:24:08 AM

Previous topic - Next topic
October 03, 2024, 01:24:08 AM Last Edit: October 03, 2024, 12:22:00 PM by MarieSophieSG
Hi,
As I'm trying to make some modifications following posts found here, one of them leads to a folder in /etc/local/ somthing

But I don'T have a /etc/local path/folder ! Is that even normal ? or do I have to create one somewhere in the GUI that I would have overseen ?
Hunsn RS39 (N5105, 4x i225) 24.7.5_0 testing
LAN1 = swtch1 Laptop1 MX23, NAS, Laptop2 Win10
LAN2 = WiFi router AP, Laptop2, tablet, phone, printer, IoT, etc.
LAN3 = Swtch2 Laptop3 Suse; Laptop4 Qube-OS/Win10, printer
Pretending to be tech Savvy with a HomeLab :-p

What exactly is it you want to modify? OPNsense is an appliance OS. There are no user serviceable parts beneath the UI in general. Hooks for particular subsystems via config files are documented.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Quote from: Patrick M. Hausen on October 03, 2024, 01:26:51 AM
What exactly is it you want to modify? OPNsense is an appliance OS. There are no user serviceable parts beneath the UI in general. Hooks for particular subsystems via config files are documented.

I would like to change the color code of the interface, so it shows according to my RJ45 wire colors
According to this post: https://forum.opnsense.org/index.php?topic=37855.msg214694#msg214694 I could do that by editing the file: /usr/local/www/widgets/widgets/traffic_graphs.widget.php
But there is not /local on my system ?
Hunsn RS39 (N5105, 4x i225) 24.7.5_0 testing
LAN1 = swtch1 Laptop1 MX23, NAS, Laptop2 Win10
LAN2 = WiFi router AP, Laptop2, tablet, phone, printer, IoT, etc.
LAN3 = Swtch2 Laptop3 Suse; Laptop4 Qube-OS/Win10, printer
Pretending to be tech Savvy with a HomeLab :-p

But /usr/local/www is there - what are you seeking in /local, then?
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Quote from: Patrick M. Hausen on October 03, 2024, 01:38:47 AM
But /usr/local/www is there - what are you seeking in /local, then?

My point !
There is no /local I have access to /etc, and with ls I see a bunch of folders, but no /local which I find weird so I'm asking if I did something wrong or forgot to do some
Hunsn RS39 (N5105, 4x i225) 24.7.5_0 testing
LAN1 = swtch1 Laptop1 MX23, NAS, Laptop2 Win10
LAN2 = WiFi router AP, Laptop2, tablet, phone, printer, IoT, etc.
LAN3 = Swtch2 Laptop3 Suse; Laptop4 Qube-OS/Win10, printer
Pretending to be tech Savvy with a HomeLab :-p

You cannot access files from the UI.

You are supposed to login to the system via SSH as root, and type something like
vi /usr/local/www/widgets/widgets/traffic_graphs.widget.php

Then use the vi editor to change and save that file. Or replace vi by any other editor available which I don't know because I am using vi for 35 years, now.

And all your changes will be gone after every update and you will have to redo it.

The feature you are asking for does not exist and you are messing with the OPNsense software installed on your device itself.

I think that's pretty obvious from the thread you linked. If you want to change the colours you need to edit the piece of software that displays the widget.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

October 03, 2024, 11:59:21 AM #6 Last Edit: October 03, 2024, 12:17:53 PM by MarieSophieSG
Quote from: Patrick M. Hausen on October 03, 2024, 03:06:35 AM
You cannot access files from the UI.
Yes, that's where I saw there is no /local under /etc (using Putty)

Quote from: Patrick M. Hausen on October 03, 2024, 03:06:35 AM
You are supposed to login to the system via SSH as root, and type something like
vi /usr/local/www/widgets/widgets/traffic_graphs.widget.php
I prefer nano, but I don't mind using vi, if only the folder existed

Quote from: Patrick M. Hausen on October 03, 2024, 03:06:35 AM
Then use the vi editor to change and save that file. Or replace vi by any other editor available which I don't know because I am using vi for 35 years, now.

And all your changes will be gone after every update and you will have to redo it.
I got that (according to the other post) and although annoying, will just have to be a "manual cron" job, maybe an .sh  script

Quote from: Patrick M. Hausen on October 03, 2024, 03:06:35 AM
The feature you are asking for does not exist and you are messing with the OPNsense software installed on your device itself.

I think that's pretty obvious from the thread you linked. If you want to change the colours you need to edit the piece of software that displays the widget.
Yes, and I think this should be (easily) added to the GUI (absolutely not critical, just a nice to have), under "interface" but you are missing the point, I don't mind (for now) doing the edit of the file, but the path just doesn't exist, I don't have a /etc/local folder, and therefore can't access anything further than /etc
And I'm not talking about /etc/local not accessible (like many folders under /etc, which I see are present, but I can't access them for some reason) no, the /etc/local just is not there
That's why I created this post with this title, otherwise I would have just followed the other one
Hunsn RS39 (N5105, 4x i225) 24.7.5_0 testing
LAN1 = swtch1 Laptop1 MX23, NAS, Laptop2 Win10
LAN2 = WiFi router AP, Laptop2, tablet, phone, printer, IoT, etc.
LAN3 = Swtch2 Laptop3 Suse; Laptop4 Qube-OS/Win10, printer
Pretending to be tech Savvy with a HomeLab :-p

October 03, 2024, 12:04:38 PM #7 Last Edit: October 03, 2024, 12:09:26 PM by Ngr
From the link you posted it's: /usr/local/ not /etc/local/

Quote from: Ngr on October 03, 2024, 12:04:38 PM
From the link you posted it's: /usr/local/ not /etc/local/

aaarrrr what a dumb I am !
Thank you !!
And sorry Patrick for my %$/!* (Silly newbeness)
Hunsn RS39 (N5105, 4x i225) 24.7.5_0 testing
LAN1 = swtch1 Laptop1 MX23, NAS, Laptop2 Win10
LAN2 = WiFi router AP, Laptop2, tablet, phone, printer, IoT, etc.
LAN3 = Swtch2 Laptop3 Suse; Laptop4 Qube-OS/Win10, printer
Pretending to be tech Savvy with a HomeLab :-p


vi /usr/local/www/widgets/widgets/traffic_graphs.widget.php
Folder or file unkown


:q!
root@RS39:/ # cd /usr/local/www/widgets
root@RS39:/ /usr/local/www/widgets # ls
includes widgets
root@RS39:/usr/local/www/widgets/widgets # cd /widgets
root@RS39:/usr/local/www/widgets/widgets/widgets # ls
dmidecode.widget.php smart_status.widget.php
root@RS39:/usr/local/www/widgets/widgets/widgets #


Does anyone knows where traffic_graphs.widget.php is in ?
Hunsn RS39 (N5105, 4x i225) 24.7.5_0 testing
LAN1 = swtch1 Laptop1 MX23, NAS, Laptop2 Win10
LAN2 = WiFi router AP, Laptop2, tablet, phone, printer, IoT, etc.
LAN3 = Swtch2 Laptop3 Suse; Laptop4 Qube-OS/Win10, printer
Pretending to be tech Savvy with a HomeLab :-p

Looks like the location changed with the new dashboard. You can look in github for easier browsing.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)