Manually starting X: virtual terminal switching issue
- Vous devez vous identifier ou créer un compte pour écrire des commentaires
My desktop is configured to boot to a text-console. From there, when I want a GUI, I start X Windows by typing in VT1:
sudo lightdm
The GUI starts in VT7 but I remain with the black screen in VT1 so I must switch to VT7 manually with: Ctrl-Alt-F7
Now I am in VT7 and I see the greeter and I login. Then the screen goes black and I am back in VT1 so I must switch back to VT7 with: Ctrl-Alt-F7
Now I am logged in and I see my desktop and I remain in VT7 unless I logout.
If I logout from the XFCE menu the screen goes black and I am back in VT1 The greeter remains in VT7 until I stop the process in VT1
If I shutdown from the XFCE menu the machine shuts down and powers off.
My situation works, but I would like to fix it so I don't have to switch back with Ctrl-Alt-F7. This is more of a challenge than a necessity so please don't tell me just change to boot to GUI. In the past, I don't remember which distro(s), I could type in startx and the GUI would start and I would automatically be in the correct VT with the GUI
I wrote something to that effect here.
https://trisquel.info/en/forum/open-gui-command-line#comment-95254
Check if it applies to your situation.
Thanks. my /etc/default/grub file is the same except I have:
GRUB_CMDLINE_LINUX_DEFAULT="text"
GRUB_CMDLINE_LINUX=""
Instead of what is in the image you posted:
#GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX="text"
I'm not sure what the difference is?
Also, I don't know what the systemctl commands are for and I don't have that program installed by default.
My system does boot to a text console and VT7 is blank (lightdm and X are not running)
Try using:
sudo service lightdm start
Instead of:
sudo lightdm
I *guess* you're experiencing this problem because you invoke lightdm
directly in the current TTY, so lightdm thinks it must assume/take the
current TTY. In turn, the X server is usually started after lightdm,
and, on most .deb based distributions, the X server usually assumes that
you want TTY 7 to be graphical environment.
So, in your case, since you're invoking lightdm directly, lightdm is
taking you back and forth every time it operates successfully.
Other than this guess, I don't really know what could be happening,
since I only guessed this based on what I have experienced in the past,
and on some basic Bash process operations. This means I don't know how
to configure neither lightdm nor X.
Thanks for the suggestion. I had not heard of the service program.
I tried the "service lightdm start" and it loaded lightdm. When I choose a window manager and enter my password, the screen goes black and takes me back to the login screen. I tried a few window managers and it does the same thing with each.
After stopping this command with Ctrl-C I check the process list with ps -ef |grep lightdm and I see many processes (maybe 10) Some of these processes seem to be duplicates of other ones.
In general, I probably want to stick with systemd rather than SysV since this distribution is designed with systemd.
Trisquel 6 and 7 use Upstart (only small parts of systemd are installed, not the init). Trisquel will almost certainly use systemd.
To type less (it does the exact same thing as 'sudo service lightdm start'):
$ sudo start lightdm
How is:
sudo start lightdm
different than:
sudo lightdm
The first command uses the init script (which may launch other services in dependence, monitor the process, etc.) to start LightDM. The second command directly executes the LightDM binary. So the difference is what is in /etc/init.d/lightdm (the init script).
To have 'startx' working, you probably need to write "things" in ~/.xinitrc. Maybe that will do: https://wiki.debian.org/Xinitrc
You may need to 'update-alternatives' your "x-window-manager" though.
You can read https://wiki.ubuntu.com/CustomXSession too.
- Vous devez vous identifier ou créer un compte pour écrire des commentaires