6

I never need my user name to be shown on the desktop as I am the only one to use my computer. I'd prefer if there would be something like a shutdown icon instead of the user name to open the session menu. How to achieve this in XUbuntu 11.10?

1

2 Answers 2

4

You can remove the session menu and add an item called 'Action Button' instead. Per default, it will display the usual xfce log-out menu (same as the main menu item).

If this is too pristine, you can add a custom launcher and add the various commands supported by xfce4-session-logout: (excerpt from xfce4-session-logout --help)

  -l, --logout             Log out without displaying the logout dialog
  -h, --halt               Halt without displaying the logout dialog
  -r, --reboot             Reboot without displaying the logout dialog
  -s, --suspend            Suspend without displaying the logout dialog
  --hibernate              Hibernate without displaying the logout dialog
  -f, --fast               Log out quickly; don't save the session

N.b.: This is from xubuntu 11.04, should still work in 11.10.

1
  • Not the exactly correct answer but a practical solution. So I vote up. Thanks.
    – Ivan
    Sep 27, 2011 at 21:43
1

Since Xubuntu 14.04, the Session Menu has been removed from panel by default and replaced by a log out button in the Whisker Menu.

The session menu can be easily restored by adding "Action Buttons" to the panel; however, that doesn't have any option to hide just the user name. Hence the alternative menu.

Setup alternative menu

From step 3 onwards, the "Launcher" window shall remain open.

  1. Right-click on panel, then select Panel > Add New Items...

  2. In "Add New Items" window, select and click Launcher - Add. An empty launcher will be added to the panel. Then, press Esc key or click Close button to close the window.

  3. Right-click on the launcher (shown with default icon) and select Properties. In "Launcher" window, there are only two buttons enabled by default.

    How to create Launcher - Part A

  4. To begin with, click on the lower icon to add the first new empty item. In "Edit Launcher" window, fill in the following details for the first launcher.

    +----------+----------------------------------------------+
    |    Name: | Lock Screen                                  |
    |          +----------------------------------------------+
    | Comment: | Run xflock4 to lock this session             |
    |          +----------------------------------------------+
    | Command: | xflock4                                      |
    |          +----------------------------------------------+
    |    Icon: | (click "No icon" and select                  |
    |          | `system-shutdown-panel` from "Status Icons") |
    +----------+----------------------------------------------+
    
  5. Click OK to confirm.

  6. Returning to "Edit Launcher" window, click Save to add the first launcher to the panel. The previously selected icon will now appear as single button in the panel.

    How to create Launcher - Part B

  7. To add the second launcher, click again on the same icon in "Launcher" window and fill in the following details similarly for the second launcher.

    +----------+----------------------------------------------+
    |    Name: | Log Out...                                   |
    |          +----------------------------------------------+
    | Comment: | Log Out of the Xfce Desktop                  |
    |          +----------------------------------------------+
    | Command: | xfce4-session-logout                         |
    |          +----------------------------------------------+
    |    Icon: | (leave this empty as "No icon")              |
    +----------+----------------------------------------------+
    
  8. Click Save to add the second launcher. The launcher will now show an arrow button beside the first launcher; click the arrow button to show the second and subsequent launchers.

    How to create Launcher - Part C

  9. Repeat step 7 and 8 with the following details for other launchers.

    +----------+----------------------------------------------+
    |    Name: | Switch user                                  |
    |          +----------------------------------------------+
    | Comment: | Run dm-tool to return to greeter             |
    |          +----------------------------------------------+
    | Command: | dm-tool switch-to-greeter                    |
    +----------+----------------------------------------------+
    
    +----------+----------------------------------------------+
    |    Name: | Suspend                                      |
    |          +----------------------------------------------+
    | Comment: | Suspend without displaying dialog            |
    |          +----------------------------------------------+
    | Command: | xfce4-session-logout --suspend               |
    +----------+----------------------------------------------+
    
    +----------+----------------------------------------------+
    |    Name: | Shut Down                                    |
    |          +----------------------------------------------+
    | Comment: | Halt without displaying dialog               |
    |          +----------------------------------------------+
    | Command: | xfce4-session-logout --halt                  |
    +----------+----------------------------------------------+
    
  10. Rearrange the launchers by clicking the top two icon buttons, so that the launchers will be listed in the following order.

    +-------------+
    | Lock Screen |
    | Switch User |
    | Suspend     |
    | Shut Down   |
    | Log Out...  |
    +-------------+
    
  11. Click Advanced, then select Disable tooltips and Arrow button position: Inside Button.

  12. Finally, click Close button to finish.

    How to create Launcher - Part D

The Launcher will now appear and behave similar to the Session Menu, except for the arrow button is seen inside button and no separators. Another difference is, Launcher will always allow "Switch User" menu regardless of single or multiuser host system. This action doesn't switch directly to other user but returns to login screen (Same behaviour as "Switch Users" in Whisker Menu).

Setup caveats

Above steps are not perfect. There are trivial issues when using launchers, but these can be improved by workarounds.

Session Menu using Launcher appears ugly, with uneven spacing and icon.

Xubuntu by default show images on buttons and in menus. User can disable the option "Show images in menus" in Appearance > Settings > Menus and Buttons. This will hide the icon in the menu all together, which includes application menu, context menu and panel menu.

Else try to add other icons for the remaining launchers to make spacing equal, but the menu will appear unnatural due to wide spacing.

Except for "Log Out..." launcher, other actions will not display any confirmation dialog.

Unlike Action Buttons, Launcher has no obvious way to show the confirmation dialog. This may be solved by assigning command each action with helper dialog in Zenity or configuring relevant key in GSettings, if any. I couldn't find any straightforward solution in this matter.

Trivial issues using Launcher

Overall, I didn't find any serious caveats while using the Session Menu that has been created using Launcher. The substitute menu works as expected and could be improved by modifying the command to change the behaviour.

Tested setup in Xubuntu 14.04 (Xfce 4.10) and Xubuntu 16.04 (Xfce 4.12). Screenshots were taken using Xfce Screenshot and Shutter, arranged and color to alpha in GIMP, then added annotation using built-in editor in Shutter.

TL;DR The Session menu has no such option to hide the user name. Use "Launcher" in Xfce panel to create the Session Menu without the user name.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.