5

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.

muru
  • 207,228

2 Answers2

10

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.

muru
  • 207,228
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
muru
  • 207,228
Oli
  • 299,380