acpi - add an error dialog for systems with acpi but no acpid

we never told users before. we should. this would sovle some issues
i've seen of people saying that closing the lid doesn't work with e
and they didn't install acpid (even though packages often recommend it).

this improves usability.
This commit is contained in:
Carsten Haitzler 2019-07-08 15:12:38 +01:00
parent 515b8cd2b5
commit 61cc1351fa
1 changed files with 10 additions and 1 deletions

View File

@ -132,7 +132,16 @@ e_acpi_init(void)
E_EVENT_ACPI = ecore_event_type_new(); E_EVENT_ACPI = ecore_event_type_new();
/* check for running acpid */ /* check for running acpid */
if (!ecore_file_exists("/var/run/acpid.socket")) return 1; if (!ecore_file_exists("/var/run/acpid.socket"))
{
if (ecore_file_exists("/proc/acpi"))
e_util_dialog_show(_("Error"),
_("You seem to have an ACPI based system, but<br>"
"<hilight>acpid</hilight> does not seem to be running or<br>"
"contactable. Perhaps enable the <hilight>acpid</hilight><br>"
"service on your system?"));
return 1;
}
/* try to connect to acpid socket */ /* try to connect to acpid socket */
_e_acpid = ecore_con_server_connect(ECORE_CON_LOCAL_SYSTEM, _e_acpid = ecore_con_server_connect(ECORE_CON_LOCAL_SYSTEM,