GUI sample program
Install GUI sample utility
This GUI sample provides display of temperature information, voltage information, display of SMART information,
setting of temperature monitoring daemon, and simple smartd monitoring setting.
* Since this GUI sample uses the environment variables of X11, it may not be possible to start it as a desktop application
after installation in the Wayland environment. If you cannot execute it, please use it in the X11 environment.
* Please refer to the following contents when you install separately.
・By executing the "make" command, an object file and an executable file are created.
./CoRasGuiUtil, ./CoRasGuiUtil.o
・Files will be extracted into each directory when you execute "make install".(Requires root privileges.)
$ make install
"CORAS Util (root)" and "CORAS Util" are registered as applications.
・Running "make uninstall" removes the extracted files.(Requires root privileges.)
$ make uninstall
* Please install the library and driver module provided by this CORAS (LNX) in advance.
* Please install the following package for each distribution about using GUI sample.
- Since this GUI tool is implemented with GTK + 2 and glade, the development package for gtk + 2 is required to compile.
- Acquisition of SMART information using smartmontools and setting of simple SMART monitoring can be performed.
Please refer to the relevant documentation of smartmontools for information on the SMART information to be obtained and the settings for SMART monitoring.
ubuntu 18.04、20.04、22.04
smartmontools
libgtk2.0-dev
hdparm
CentOS7、RHEL7、RHEL8、RHEL9、ML8
smartmontools
gtk2-devel
hdparm
About using GUI sample utility
After installation, "CORAS Util (root)" and "CORAS Util" are registered as applications.
(The display example is for ubuntu 16.04 (unity desktop, BX-825 Series). The window design differs depending on the environment such as Gnome2 of CentOS and RHEL and Gnome3.)
They are for root authority execution and general user authority execution respectively.
Password authentication is required for "CORAS Util (root)".
If the application does not appear, please log in again, restart, etc.

The display of the GUI sample utility is as follows.
- OK
Starts and ends the temperature monitoring and SMART monitoring daemon, reflecting the settings.
- APPLY
Start the daemon of temperature monitoring and SMART monitoring reflecting the setting contents.
- CANCEL
Exit without updating settings.
- HELP
The help document related to this utility is displayed. (firefox starts up)
* The snap version of firefox, which is installed as standard on Ubuntu 22.04, cannot open
the local html file(this help document) under the /opt directory of the installation destination.
- Temperature Display tab
Information of CPU temperature, current value of M/B temperature, average value is displayed numerically and graphically. (Update: 2 seconds cycle)
Displays data acquired since the GUI application was started.
The average value shows the average of the last 20 data.
I use cairo for graph drawing.

- Voltage display tab
The Voltage tab shows the measured value of the voltage. (Update: 2 seconds cycle)
See the MT_GetVoltage item for the types of voltage that can be measured.
When executed with non-root privileges, N/A will be displayed if you do not have access privileges for some models (BX-220 Series, BX-830 Series).

- SMART tab
Acquisition and display of storage SMART information is possible only when "CORAS Util (root)" is executed. (Root required)
* Since root information is required to display SMART information, since information is acquired using smartctl command of smartmontools.
* Standard disk management tools such as gnome-disks may also be able to retrieve and display SMART information.
- DiskDrive
The model of the connected physical drive is displayed regardless of whether it is SMART compatible or not.
After selecting the drive for which you want to acquire SMART, if it is a SMART compatible drive, you can display the SMART information by pressing the Update button.
The SMART information that is displayed is acquired by smartmontools's smartctl command.
Please refer to smartmontools and related documents for the contents to be displayed.

- Settings tab
The setting tab can be edited only when "CORAS Util (root)" is executed. (Root required)
- Hardware Monitor Settings tab
You can set the cothermald.
- Scan cycle [seconds] (Reset to default: 2 [seconds])
Specify the time interval to check temperature information. If this time interval is short, the time from when the error occurs to detection will be short. It can be set in the range of 2 to 60 [seconds].
- CPU temperature, MB/System temperature
Displays the current CPU and MB / System temperature.
- CPU, MB temperature threshold (Reset to default: TH1 = 60, Th2 = 65)
Specify the threshold for CPU and MB temperature respectively. Two levels of threshold can be specified so that th1 < th2. When the measured temperature exceeds the threshold, the action set in the alarm action described below is executed.
You can specify a value between 0 and 120 (deg C) as the threshold. If 0 is specified, the threshold is invalidated and no error is detected.
- Alarm action (Reset to default: All None)
Specify the operation to be performed when the preset threshold is exceeded.
From the combo box, select the action to be executed when the CPU or MB temperature thresholds Th1, Th2 are exceeded.
- None
do nothing.
- Popup Message
Display the corresponding message box.
- Reboot
Reboot the system
- Shutdown
Shut down the system
- Run specified application
Execute the specified application.
Specify the file to be executed from the file selection dialog.
* Popup messages are sent out using the notify-send command during Popup Message, Reboot, and Shutdown.
About Reboot and Shutdown, about 30 seconds after notification, Reboot and Shutdown processing is performed.
The display of the popup message differs depending on the specifications of each distribution, desktop environment, etc.

- smartd settings tab
You can make simple settings for smartd.
No special settings have been made for smart information monitoring items or contents. If you want to do advanced smartd configuration, please refer to the smartd configuration document and edit the configuration file directly.
The default setting of smartd follows the setting when installing smartmontools. Since settings are not performed when this utility is installed, the displayed contents may differ from the actual settings at the time of initial startup.
For details on the settings provided by this GUI utility, please refer to the contents such as program source and script.
For details on smartd specifications such as monitoring items and monitoring contents, please refer to the document.
- Scan cycle[hours] (Reset to default: 0)
Specify the time interval to check SMART information.
You can specify in the range of 1 to 24[hours].
When 0[hour] is input, the daemon is not started.
- Alarm action (Reset to default: None)
Sets the behavior of the script called when an error occurs.
Please check the specification of smartd for detection of abnormality.
- None
do nothing.
- Popup Message
Display the corresponding message box.
- Reboot
Reboot the system
- Shutdown
Shut down the system
- Run specified application
Execute the specified application.
Specify the file to be executed from the file selection dialog on the right.
* The action of the alarm action is performed by executing a script from smartd.
* Popup messages are sent out using the notify-send command during Popup Message, Reboot, and Shutdown.
About Reboot and Shutdown, about 30 seconds after notification, Reboot and Shutdown processing is performed.
The display of the popup message differs depending on the specifications of each distribution, desktop environment, etc.
