Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 25

Thread: Start Lubuntu GUI from command line

  1. #11
    Join Date
    Apr 2012
    Beans
    7,256

    Re: Start Lubuntu GUI from command line

    It sounds like you don't want (or need) lightdm at all - once you've figured out the lxsession starting issues you should be able to disable (or remove) lightdm altogether and just boot to a CLI and start the lxsession from there. You should be able to wrap that in a ~/.xsession or ~/.xinitrc so that you can do so with plain 'startx' if you prefer.

  2. #12
    Join Date
    Feb 2008
    Beans
    34

    Re: Start Lubuntu GUI from command line

    No lightdm service is not running for sure.
    I would be happy to debug the problem if you or someone else helps me how to do it. So far, googling for 2 days got me no where.
    "echo $DISPLAY" returns me nothing but then again this might be normal when you are on the text mode. I don't know that much.



    Quote Originally Posted by steeldriver View Post
    AFAIK SysV-style runlevels are not relevant in Ubuntu

    I would focus on finding out why lxsession says it can't open the display - is lightdm perhaps still running? if so you will need to kill it first e.g. (after logging in at one of the CLI virtual terminals as your normal user)

    Code:
    sudo service lightdm stop
    
    lxsession -s LXDE -e LXDE
    life is short, but sweet for certain...

  3. #13
    Join Date
    Feb 2008
    Beans
    34

    Re: Start Lubuntu GUI from command line

    You sound good. Would you like to give me hand to debug the lxsession problem?

    Quote Originally Posted by steeldriver View Post
    It sounds like you don't want (or need) lightdm at all - once you've figured out the lxsession starting issues you should be able to disable (or remove) lightdm altogether and just boot to a CLI and start the lxsession from there. You should be able to wrap that in a ~/.xsession or ~/.xinitrc so that you can do so with plain 'startx' if you prefer.
    life is short, but sweet for certain...

  4. #14
    Join Date
    May 2007
    Location
    NY's first capital
    Beans
    2,868
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Start Lubuntu GUI from command line

    Install --without a recommends causes some missing packages such as policykit. I have a post on here related to a webdt tablet.
    Sorry I'm mobile so it's difficult for me to offer a link.

    EDIT: Here is the link, pardon the whining
    Last edited by volkswagner; May 8th, 2014 at 08:25 PM.
    Nothing is ever easy, but if it is difficult you must be doing it wrong.

  5. #15
    Join Date
    Apr 2012
    Beans
    7,256

    Re: Start Lubuntu GUI from command line

    OK so I've installed lubuntu-core --no-install-recommends in a trusty VM and can confirm what you're seeing

    trusty-startlxde.png

    I also found that there seems to be a bit of a disconnect about the recommends - lxsession only suggests lxde-common (which is the package containing startlxde) whereas doing rdepends on lxde-common says lxsession depends on it. That's by-the-bye since after installing lxde-common (again with no-install-recommends) startlxde gives the same error...

    EDIT: HOWEVER startx DOES WORK FOR ME, starting a plain LXDE session initially, but starting what I believe to be a Lubuntu session after I created a ~/.xsession file containing just

    Code:
    lxsession -s Lubuntu -e LXDE
    trusty-lubuntu-core.PNG

    So let's go back to using

    Code:
    startx
    and see if we can figure out why that's not working for you
    Last edited by steeldriver; May 9th, 2014 at 01:28 AM. Reason: corrected lxsession switch (from -x to -e)

  6. #16
    Join Date
    Feb 2008
    Beans
    34

    Re: Start Lubuntu GUI from command line

    Okay, I installed "lxde-common".
    Now "startx" works nice, just for the plain LXDE environment though.
    Then I create the file "~/.xsession" containing only the command "lxsession -s Lubuntu -x LXDE" still loads the plain LXDE session, not the Lubuntu one just like yours.
    I am using root user to manage the server, so I thought if I use a non-root user maybe it would work but things get worse when I do that.
    "xinit: connection to X server lost" is what I get for a non-root user.
    So, I stick with the root user, which I normally use anyway.

    I am gonna do a fresh vm install and try it again.


    Quote Originally Posted by steeldriver View Post
    OK so I've installed lubuntu-core --no-install-recommends in a trusty VM and can confirm what you're seeing

    trusty-startlxde.png

    I also found that there seems to be a bit of a disconnect about the recommends - lxsession only suggests lxde-common (which is the package containing startlxde) whereas doing rdepends on lxde-common says lxsession depends on it. That's by-the-bye since after installing lxde-common (again with no-install-recommends) startlxde gives the same error...

    EDIT: HOWEVER startx DOES WORK FOR ME, starting a plain LXDE session initially, but starting what I believe to be a Lubuntu session after I created a ~/.xsession file containing just

    Code:
    lxsession -s Lubuntu -x LXDE
    trusty-lubuntu-core.PNG

    So let's go back to using

    Code:
    startx
    and see if we can figure out why that's not working for you
    life is short, but sweet for certain...

  7. #17
    Join Date
    Apr 2012
    Beans
    7,256

    Re: Start Lubuntu GUI from command line

    apologies, the ~/.xsession contents should have read

    Code:
    lxsession -s Lubuntu -e LXDE

  8. #18
    Join Date
    Feb 2008
    Beans
    34

    Re: Start Lubuntu GUI from command line

    @steeldriver and all, thank you soooooo much.

    Here is the wrap up....
    After installing the server 14.04
    Code:
    apt-get install lxde-common --no-install-recommends
    apt-get install lubuntu-core --no-install-recommends
    Create the file ~/.xsession
    Code:
    touch ~/.xsession
    with the only content of this command.
    Code:
    lxsession -s Lubuntu -e LXDE
    Change run level to text mode and reboot.

    Now,
    startx - takes me to Lubuntu environment, already logged in.
    Logout - back to the command line.

    Works great.
    Thank you guys, appreciated...
    life is short, but sweet for certain...

  9. #19
    Join Date
    Apr 2012
    Beans
    7,256

    Re: Start Lubuntu GUI from command line

    Great! happy to help

  10. #20
    Join Date
    Jul 2014
    Beans
    79

    Re: Start Lubuntu GUI from command line

    Quote Originally Posted by hgurol View Post
    @steeldriver and all, thank you soooooo much.

    Here is the wrap up....
    After installing the server 14.04
    Code:
    apt-get install lxde-common --no-install-recommends
    apt-get install lubuntu-core --no-install-recommends
    Create the file ~/.xsession
    Code:
    touch ~/.xsession
    with the only content of this command.
    Code:
    lxsession -s Lubuntu -e LXDE
    Change run level to text mode and reboot.

    Now,
    startx - takes me to Lubuntu environment, already logged in.
    Logout - back to the command line.

    Works great.
    Thank you guys, appreciated...
    I know this is an older thread, but I am hoping someone can help me. I am trying to do exactly what you are describing. I have a freshly installed ubuntu 14.04 and have installed lxde-common and ubuntu-core just as you have explained. When I use startx I get the same error as steeldriver shows in his first photo. So now I am trying to create the file ~/.xsession. I am not sure what touch is that your putting in front of it, I assume it is some kind of text editor, but when I run touch~/.xsession the command does not do anything, just goes to the next line where I can enter a new command. I entered your next command in the command line,lxsession -s Lubuntu -e LXDE, which I don't think I am supposed to do and it gives me an error. My question is how do you create the file ~/.xsession. I am very new at this, so could you go into slightly more detail by any chance, thank you for any help that you can provide.

Page 2 of 3 FirstFirst 123 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •