Tag Info

Hot answers tagged

17

Creating custom keyboard shortcuts: For 11.04: To add a new shortcut open System -> Preferences -> Keyboard Shortcuts and press Add: In the opening window type in your custom command name and the command you want to run (e.g. gnome-session-save --logout to logout immediately). Press on the Shortcut line of your new shortcut and press the key ...


14

Here's a easy way to do that using SysVInit. Instructions: Create the start and the stop script of your application. Put it on some directory, in our example is: Start Script: /usr/local/bin/myapp-start.sh Stop Script: /usr/local/bin/myapp-stop.sh Each one will provide the instructions to run/stop the app. For instance the myapp-start.sh content can be ...


14

To end all user processes and be sent back to the login screen, you can use: kill -9 -1 Don't run it as root though, for reasons discussed here.


10

This can be done using the gnome-session-quit command. It needs the --force option to suppress the confirmation dialog that would appear without it. Unlike applications run from an X terminal emulator, ending a session from a TTY requires you to append the DISPLAY variable to indicate which X display is running the session. Hence: DISPLAY=:0 ...


9

When I have this problem, I simply Ctrl + Alt + F2 into a terminal, log in, and type killall -u [username] gnome-session This will basically kill all of your processes and log you out. If you want to logout all users at the same time in this manner, then you leave out the -u [username] part. I guess you could create a new keyboard shortcut that runs ...


8

You could restart the desktop manager, which is similar to restarting X. On Ubuntu 11.10: sudo service lightdm restart On earlier versions: sudo service gdm restart If that fails or you are on a very old system, try: sudo /etc/init.d/gdm restart One of these should take you back to the login screen. Be aware that you will not be prompted, so save ...


8

If .bash_profile exists, then Bash will not read .bash_login (or .profile). This annoying feature is described in some versions of the Bash manual, but not all. .bash_profile and .bash_loginare analogous, so I recommend you put your commands in .bash_profile, because it's is commonly used and .bash_login is relatively unknown. Also consider putting your ...


6

I don't know of any place where this is plumbed through to the GUI. sudo pkill -u <username> is really the simple way to do it, followed by sudo pkill -KILL -u <username> a bit later if it doesn't all shut down like it should. If the "non-technical" user in question isn't capable of remembering that, a script to prompt for a username ...


6

Sadly this is a known bug in (probably) consolekit LP #838792 The workaround for the time is sudo reboot sudo shutdown now -P


5

It seems that the latest update added an "options" menu on the keyboard preferences-->layouts that lets me activate the "control-alt-delete" shortcut like before. Or it might have always been there and i missed it.


5

To execute a script upon logout: Add the following line: session-cleanup-script=/path/to/script in /etc/lightdm/lightdm.conf file. You have to restart lightdm in order that this change to take effect. To do this go in tty1 using Ctrl+Alt+F1, login with your username and password and run the following command: sudo service lightdm restart To execute a ...


5

Your system was likely not attacked. Teamviewer starts with the system by default (annoying I know, but true anyway) in the latest version I've tried. The solution is to check both startup programs, and the following locations: /home/rolandixor/.config/autostart /usr/share/autostart for an entry for Teamviewer, and if it exists, to remove it. You were ...


5

Open a terminal (ctrl + alt + T) or use a TTY (ctrl + alt + F1.) Then you have to login using administrative account or root. sudo shutdown -P now


5

gnome-session-quit --no-prompt will log you out of an existing Unity session, without a prompt.


4

This is the step by step procedure of gnome_save_yourself method. Let's do a test. Save following code as ~/Desktop/execute_script_on_shutdown.sh (From http://www.linuxquestions.org/questions/linux-desktop-74/gnome-run-script-on-logout-724453/#post3560301) #!/usr/bin/env python #Author: Seamus Phelan #This program runs a custom command/script ...


4

If you get this: (Clean Install, added gnome-panel, gnome-shell, and gnome-system-tools) What actually works is pressing Ctrl+Alt+Del and then choosing Log out.


4

In Ubuntu 11.10 you could write a script containing #/bin/bash gnome-session-quit --logout --no-prompt make it executable with chmod +x script-name, then set a global shortcut to execute this script in Gnome Control Center -> Keyboard. In previous Ubuntu versions there was gnome-session-save --logout.


3

It is called a beta for something. This has happened to me as well several times (11.10 beta 1). You could search on Launchpad if this bug has already been reported (it'd surprise me if it hasn't been reported yet), and if it hasn't been reported yet, you could report it yourself. To logout, reboot, shutdown, ... you can just press the power button of your ...


3

This should solve your problem: https://www.grendelman.net/wp/policykit-adventures/


3

Press ALT-F2 and type r or unity --replace or compiz --replace


3

The graphical Grub menu does not appear to be compatible with your video card. So let's switch to a text menu instead. Open the terminal with Ctrl+Alt+T Paste the below, and enter your password when asked: sudo sed -i -e 's/#GRUB_TERMINAL/GRUB_TERMINAL/g' /etc/default/grub Then type sudo update-grub Reboot and hopefully you get a text menu instead of the ...


3

The ACPID way Overview There are numerous ways of fixing this issue. If you look through the web you will find suggestions on installing power managers used in other desktop environments (DEs) like xfce4-power-manager or gnome-settings-daemon. However, as an LXDE user you are probably striving for a lightweight solution. One lightweight way to display a ...


3

I don't know if it would be exactly the same case, but this happened to me because somehow I corrupted the .Xautority file in my home. I think it's something related with remote access to the X server. Log into a tty (Control+Alt+F6) and after typing your username and password: sudo rm -v .Xauthority Then restart lightdm with: sudo service lightdm ...


3

sudo apt-get install indicator-datetime indicator-messages indicator-power indicator-session or sudo apt-get install --reinstall indicator-datetime indicator-messages indicator-power indicator-session or sudo dpkg-reconfigure indicator-datetime indicator-messages indicator-power indicator-session If none of these solve it then please provide more ...


3

No need to remove cairo-dock from start-up applications, find cairo-dock.desktop file ~/.config/autostart and add this code,X-GNOME-Autostart-Delay=20 Steps to solve easily (tested in Ubuntu 14.04) run gedit without root click open file menu and press Ctrl+H open file ~/.config/autostart/cairo-dock.desktop add this X-GNOME-Autostart-Delay=20 save and ...


3

I'm not entirely sure what you're trying to do but the reason the sudo command is failing is because you have started the X server as pandya and are not exporting pandya's environment variables that allow you to communicate with the running Gnome session. So, this will allow you to kill your Gnome session: sudo -E -u pandya gnome-session-quit From man ...


3

From what I gather you're simply trying to return to your user account after gaining access to root. Try typing exit in terminal. Or you can simply press CTRL+D.


2

You can stop the daemon using a bash script which executes at logout Add the following line in lightdm.conf session-cleanup-script=<path-to-logout-bash-script> lightdm.conf can be found at /etc/init/lightdm.conf or /etc/lightdm/lightdm.conf This might do the job


2

If you're using D-Bus in your application, you could listen for the SessionOver signal on the org.gnome.SessionManager interface. With C++ Qt5, your code would look something like this: QDBusConnection dbus = QDBusConnection::sessionBus(); dbus.connect("org.gnome.SessionManager", "", "org.gnome.SessionManager", "SessionOver", this, ...



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