1

Upgraded ubuntu 13.04 to 13.10, the "settings" button with shutdown/settings/login/logout is missing from the taskbar. It was the button that used to be next to the time/calender button, left right side. Can it be configured or loaded?

3
  • Is it permanently absent? Did you try rebooting your computer?
    – To Do
    Oct 31, 2013 at 13:39
  • After multiple reboots no success. I also did many updates. Still nothing. I ignored and used my PC after a day it just magically appeared? Go figure.
    – nine11
    Nov 1, 2013 at 6:55
  • By the way, why not upgrade to 14.04 ? It's LTS after all, and should have bugs like these fixed Oct 4, 2014 at 9:10

2 Answers 2

1

Like, Chih Ho mentioned this is a bug. I'd like to offer a work-arounds here. It may be useful for others in future as well, and I had a lot of fun while pondering this question, so might as well post this "solution".

So, you know how you can shutdown computer through bash, right? Well, it's also possible to log-out of the GUI through bash by entering gnome-session-quit (and don't worry about the whole gnome-session thing, it works regardless). What if you could make a script that brings up a terminal window and asks you to choose log-out or quit ? Well, here it is.

Before we even begin writing the script, open the file manager, go to Edit drop-down menu -> preferences -> Behavior, and check "Run executable text files when they are opened." That will actually let you run a script from the Desktop.

enter image description here

Now for the script itself. Open the terminal (Ctrl+Alt+T), and type nano ~/Desktop/Logout_Script.sh . In this case I'm using nano text editor to create Logout_Script.sh on desktop, but that's a formality - you can choose whatever text editor you like.

Here's the body of the script itself:

#!/bin/bash
xterm -hold -e " echo  'Enter your password to shutdown, Ctrl+C to logout instead'; sudo shutdown -P +10 || gnome-session-quit --logout  "

Let's see what is actually going on here. xterm -hold -e " " will open xterm window and hold it, and execute whatever set of command you place in between the quotation marks. In this case it will open xterm window and hold it, and echo a prompt for you to enter password to shutdown, or if you want to cancel to press Ctrl+C. What comes next is the actual shutdown command, which will ask you for password. The logical or (||) will evaluate if shutdown exits successfully or not. If you press Ctr+C at this stage, this will cancel shutdown, and execute next command , which is gnome-session-quit. That in turn, should bring up a transparent log-out prompt. Once you done writing, remember to modify the permissions of the script, so you can actually execute it. That is,

sudo chmod 755 ~/Destop/Logout_Script.sh

So here's the xterm window that pops-up when I hit enter on the script(excuse the bright colors):

enter image description here

Note, I mentioned that xterm -hold -e will hold xterm window until closed. That is, it will hold until you graphically close it, by pressing on the red x in the upper right corner, but if you plan to log out or shut down it won't be necessary, so we can ignore that. But what if you opened window, entered password, the system went for shutdown, and then half way you decided to cancel it? Then the window would hang around, and you would have to kill it graphically. Why? Because shutdown command exited sucessfully, so logical or would not execute gnome-session-quit part of the script. Also, in the script I wrote sudo shutdown -P +10, which will shutdown computer within 10 minutes, but if you want immediate shutdown, you may want to write now instead of +10 .

And one more thing: pay attention to the sequence of -hold and -e. If you place -e first, it will give you error, so to actually hold the window -hold has to be first.

Why write such script? Just to substitute for the missing indicator, I guess. Certainly, on laptops (not sure about desktops) there's power-button what actually gives you the transparent menu with logout-shutdown-suspend choices, but this way it's more fun.

Hope this helps to you or anybody else. If anybody wants to improve this script, please do so, just let me know what you changed - I wanna learn ,too :)

Some sources:

0

It looks like you hit this very bug: https://bugs.launchpad.net/ubuntu/+source/indicator-datetime/+bug/1239710 Please see if the fix there works for you.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .