I'm trying to achieve two things that I can not get to work because I don't know how to correctly start an lxsession in Lubuntu 14.04.2.
I boot to the command line with the following line GRUB_CMDLINE_LINUX_DEFAULT="nomdmonddf nomdmonisw text"
in /etc/default/grub
.
First scenario: Start Lubuntu to command line interface. Starting the desktop environment when I need to from the terminal, locally (not working properly).
Second scenario: Start Lubuntu to command line interface. Remotely login to the desktop environment via ssh x forwarding (not working properly).
For the first scenario I have tried several things. First method is to make a file ~/.xsession
with contents: lxsession -s Lubuntu -e LXDE
. Then from the terminal (after logging in to my main user account) I run startx
which brings me to the desktop already logged in. The problem is that I suddenly need to authenticate for simple tasks like mounting a usb drive trough the file manager or rebooting. Another method seems to work properly. I deleted the ~/.xsession
file and ran startx &
from the terminal. Then I run sudo service lightdm start
. This brings me to the desktop login screen. After logging in I can mount and reboot without authenticating which is the default behavior when booting straight to the GUI.
The problem with that method is that it doesn't work in the second scenario. When I login trough ssh and run startx
and/or sudo service lightdm start
, the desktop is started at the monitor connected to my Lubuntu machine. Not in the X11 environment of my ssh client. When I run lxsession -s Lubuntu -e LXDE
I get the full desktop environment on my ssh client, which is what I'm after. But it's even more broken than before. I don't see any connected USB drives, the shutdown in my task bar and logout button on the start menu don't bring up the quit_manager and clicking on "devices" in the file manager gives me the error: "Operation not supported".
Hence the question: How to start lxsession from command line with proper user priviliges? I want to mimic the default behavior when booting straight to the GUI by omitting the 'text' option in grub.