Sunday, September 2, 2018

Install the following four packages via apt-get for #1 the other three can be installed in synaptic once it is installed.

1. synaptic

2. alacarte (menu editing the easy way)

3. cairo dock (so you look like a human instead of a caveman working from the command line all the time).

4. shutter (screen shots)

5. Go to preferences->Default applications for LXSession
Click on "Autostart" button.
Type in "/usr/bin/cairo-dock -o" next to the "+Add" button.
Click the "+Add" button.
Type in "/usr/bin/shutter" next to the "+Add" button.
Click the "+Add" button.
Close the "LXSession configuration" window.

6. add a session shutdown option to the menu using "alacarte" see above. I added this to "accessories" sub-menu.

6. Now you can add the same shortcut to cairo-dock by simply dragging from menu and dropping where you wish in dock. This can fail but it will create a dummy empty launcher in the dock that can be modified as follows:

Pay particular attention to the final three text fields they should contain as follows:

Launcher's name: "Logout"

Image's name or path: "/usr/share/icons/Lubuntu/panel/24/system-shutdown-panel-restart.svg"

Command to launch on click: "/usr/bin/lxsession-logout"

7. Remove abiword it sucks.

8. Remove gnumeric it sucks.

9. If you need gksu functionality.....

When you run a GUI program with pkexec you should pass some environment variables to the program. Here is the command (all in one line):
pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS gedit /etc/fstab

If you intend to use pkexec regularly, then it is useful to add the following alias in your ~/.bashrc:
alias gksu=’pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS’

Of course the usual caveats for running gui software as root apply.... as in not recommended.