18

I am using Ubuntu 13.10 32-bit. I am using terminal mode to test a Window Manager.

I know I can use Ctrl+Alt+F1 to go to terminal mode from the GUI mode. But there is still graphical desktop running in background.

Is there a command to move from CLI to GUI mode so that I can access that GUI?

1
  • 5
    use Ctrl+Alt+F7 to return.
    – sourav c.
    Jan 11, 2014 at 4:30

5 Answers 5

22

You can either:

Press Ctrl+Alt+F7 *

Or

Run the command startx


If your desktop environment is using Wayland

Press Ctrl+Alt+F8 instead.


* From the 17.10 Release Notes:

  • GDM has replaced LightDM as the default display manager. The login screen now uses virtual terminal 1 instead of virtual terminal 7.

Also see Why is my GDM at a different TTY than my desktop environment? for more about the origin of this change.

2
  • I wish this would have been selected as the answer! This has come in handy so many times... it's eerie. Thank you for posting this answer (although it's fairly old).
    – DPS
    Jul 9, 2019 at 22:02
  • I use Lubuntu 20 04 and startx is not found. Ctrl alt F7 brings me to another tty window with Plymouth Boot Screen [ok]
    – Timo
    Jan 12, 2021 at 18:48
5

To check your default display manager (DM):

cat /etc/X11/default-display-manager

To check if the display manager is running:

ps cax | grep display_manager

e.g.: if it's lightdm:

ps cax | grep lightdm

(you can then follow up with echo $? command, an output 0(zero) indicate its running or otherwise.)

To start a DM:

sudo start display_manager

e.g.:

sudo start lightdm

To stop a DM:

sudo stop display_manager

e.g.:

sudo stop lightdm

To restart a DM:

sudo restart display_manager

e.g.:

sudo restart lightdm
1
  • I use Lubuntu 20_04 and there is no start cmd. I have sddm. With service sddm start I have to authenticate as root, entering my password and get a denial.service sddm status shows inactive. What else can I do to start sddm from tty?
    – Timo
    Jan 12, 2021 at 18:54
4

Try this command on virtual console,

sudo service $(cat /etc/X11/default-display-manager | awk '{print substr($1,11)}' ) restart
2
  • I'd like to know more about this- how does it work? Could you edit your answer to break down the different parts of this line? Aug 23, 2015 at 7:25
  • @MichaelHoffmann create a chat room and ping me from that. I'll explain.. Aug 23, 2015 at 8:43
0

the best way to test window manager safely is to use Xephyr. see man pages for more details.

I assume you use gnome-terminal here.

  1. start Xephyr
    $ Xephyr :1
  2. Ctrl+Shitf+T open a new tab
    $ export DISPLAY=:1
    $ type_your_window_manager_command_here

Now you can play with your window manager in the Xephyr window.

0

You can use sudo chvt 1 if you normally do Ctrl+Alt+F1.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .