Как отключить питание от Tripp Lite UPS?

Чистое исправление, но требуется восстановление исходного кода, возвращая эту фиксацию:

diff --git a/src/nautilus-mime-actions.c b/src/nautilus-mime-actions.c
index ca1f0ac..0b363b4 100644
--- a/src/nautilus-mime-actions.c
+++ b/src/nautilus-mime-actions.c
@@ -2029,21 +2029,13 @@ activate_activation_uris_ready_callback (GList *files_ignore,

    /* Convert the files to the actual activation uri files */
    for (l = parameters->locations; l != NULL; l = l->next) {
-       char *uri = NULL;
-
+       char *uri;
        location = l->data;

        /* We want the file for the activation URI since we care
         * about the attributes for that, not for the original file.
         */
-       if (nautilus_file_is_symbolic_link (location->file)) {
-           uri = nautilus_file_get_symbolic_link_target_uri (location->file);
-       }
-
-       if (uri == NULL) {
-           uri = nautilus_file_get_activation_uri (location->file);
-       }
-
+       uri = nautilus_file_get_activation_uri (location->file);
        if (uri != NULL) {
            launch_location_update_from_uri (location, uri);
        }

Инструкции по сборке:

Источник загрузки:
apt-get source nautilus
Загрузка зависимостей сборки
sudo apt-get build-dep nautilus
изменение из патча Edit src/nautilus-mime-actions.c
/* Convert the files to the actual activation uri files */
for (l = parameters->locations; l != NULL; l = l->next) {
    char *uri = NULL;
    location = l->data;

    /* We want the file for the activation URI since we care
     * about the attributes for that, not for the original file.
     */
    if (nautilus_file_is_symbolic_link (location->file)) {
        uri = nautilus_file_get_symbolic_link_target_uri (location->file);
    }

    if (uri == NULL) {
        uri = nautilus_file_get_activation_uri (location->file);
    }

    if (uri != NULL) {
        launch_location_update_from_uri (location, uri);
    }
Build & amp; установите его
autoreconf
./configure
make
Чтобы протестировать без установки
sudo killall -r "[\w]*nautilus"
./src/nautilus
Чтобы установить его
sudo make install

Это заставит nautilus разрешить ссылки в их целевой путь. Кстати, об этом сообщалось как об ошибке некоторое время назад. Если вы считаете, что это функция, отправьте еще один отчет об ошибке, попросив установить для него переключатель или специальный ярлык.

Ссылка: this commit

2
задан 21 August 2017 в 17:00

2 ответа

Обратите внимание на пакет nut (Network UPS Tools).

Драйвер для вашего устройства, скорее всего, tripplite_usb.

2
ответ дан 18 July 2018 в 10:15

Обратите внимание на пакет nut (Network UPS Tools).

Драйвер для вашего устройства, скорее всего, tripplite_usb.

2
ответ дан 24 July 2018 в 19:32

Другие вопросы по тегам:

Похожие вопросы: