Hot answers tagged

6

I think what you want is xfce4-session-logout (online manpage). Excerpt from the manpage (reformatted, filtered): The xfce4-session-logout command allows you to programmatically logout from your Xfce session. It requests the session manager to display the logout confirmation screen, or, if given one of the command-line options below, ...


3

Introduction The script bellow monitors all or user-defined application for presence, and if that presence is found - the system will be prevented from shutting down via graphical dialog ( the shutdown via command line won't be affected , as this is task applied by system administrators who know what they're doing). There are 3 options: -a Monitor any ...


2

For me, both poweroff nor reboot needs a password on Ubuntu 16.04 . However, for this to occur, I had to create a user account called "foo", for example, and then ssh to localhost as either that user or as myself. When I do this, I do need to authenticate myself. It seems to recognize another user is logged in. For example, I get this message: User ...


1

Ok, I guess I found a work around. You need to right click on the panel and add a shutdown applet from the list available online


1

This is not the exact solution to your problem, but rather a workaround. As an added bonus, using this workaround, you can shut down in one click instead of three. Setting up a Shutdown shortcut on your desktop is easy, but first you must change the security of the executable, because in a fresh install, it requires the root password to be used. Open ...


1

I had the same problem after upgrading from 15.10 to 16.04: Closing the lid did not do anything Manually suspending with the menu item in the system tray resulted in a half suspended state with the only way out to reset the system. I solved these issues by upgrading the kernel to 4.4.8 (after this suspend from menu worked for me) Adding the line ...


1

The script bellow uses two calls to dbus and one while loop to poll for the percentage. Very simple and effective setup. Run this when you want to shutdown the laptop once it is charged #!/bin/bash get_percentage() { qdbus org.gnome.SettingsDaemon.Power \ /org/gnome/SettingsDaemon/Power \ org.gnome.SettingsDaemon.Power.Percentage } ...


1

Try this python script. It borrows from Saving work automatically when battery is low #!/usr/bin/env python import subprocess import dbus sys_bus = dbus.SystemBus() ck_srv = sys_bus.get_object('org.freedesktop.ConsoleKit', '/org/freedesktop/ConsoleKit/Manager') ck_iface = dbus.Interface(ck_srv, ...


1

Try sudo swapoff -a && systemctl poweroffas a workaround for now. There is a potential fix in Xenial-proposed in the systemd 229-4ubuntu5 package. Go to your System Settings->Software and Updates->Developer Options tab click the box next to Pre-release (xenial-proposed). enter your root pwd, Refresh the cache. Updates tab use "display updates ...


1

The setting only affects the logged in user. To set it system wide you need to edit the file /etc/systemd/logind.conf and modify the line: "#HandleLidSwitch=suspend" to HandleLidSwitch=ignore Then either reboot or use: sudo restart systemd-logind or sudo systemctl restart systemd-logind.service For the newer systemd.


1

Improperly shutting down your computer can cause some harmful effects for your software. Though newer operating systems are better equipped to handle an improper shut down, there are still negative effects associated with it. Computers should be shut down improperly only when there are no other options available, such as in the case of a your computer ...



Only top voted, non community-wiki answers of a minimum length are eligible