How to start Pantheon from the command line

13,872

Solution 1

The typical route to starting X from the command line (TTY) is to use .xinitrc and/or startx.

First, find out which command starts the Pantheon session. Look in /usr/share/xsessions for a .desktop file named after Pantheon, and check the Exec line in that file:

$ grep Exec -R /usr/share/xsessions/pantheon.desktop
Exec=gnome-session --session=pantheon

For a one-time run, you can do:

startx /usr/bin/gnome-session --session=pantheon

For a long-term setting, use .xinitrc. Usually, you wouldn't have an .xinitrc present. So, create one containing:

#! /bin/sh
exec /usr/bin/gnome-session --session=pantheon

Then run startx.

Check the Arch Wiki article on .xinitrc to see how to make more a full-fledged one.

Solution 2

Sounds like you're missing a desktop manager to start X. LightDM is the most common these days. Easy to install:

sudo apt install lightdm

Then you can reboot (and it'll load up automatically) or you can start it there and then if it doesn't already do this after install:

sudo service lightdm start
Share:
13,872

Related videos on Youtube

patciamor
Author by

patciamor

Updated on September 18, 2022

Comments

  • patciamor
    patciamor over 1 year

    Long story as to why I've chosen to go this route, but I've installed Ubuntu Trusty without a desktop, and then installed pantheon, pantheon-shell, pantheon-greeter and elementary-desktop packages.

    The question is: how do I now start the desktop from the command line?

    Many thanks.

  • Sergiy Kolodyazhnyy
    Sergiy Kolodyazhnyy almost 9 years
    Nice answer. I don't understand why it hasn't been upvoted more