Restart login manager

You have a problem with Salix? Post here and we'll do what we can to help.
Post Reply
bradnag
Posts: 23
Joined: 1. Nov 2022, 23:38

Restart login manager

Post by bradnag »

Hi Folks,

I ssh into remote salix and I log out my X. How can I restart from command line. I do not know what the default login manager is and in /etc/rc.d I can't see any service lighdm, xdm, gdm etc.

Thanks a lot!
User avatar
gapan
Salix Wizard
Posts: 6238
Joined: 6. Jun 2009, 17:40

Re: Restart login manager

Post by gapan »

Hi, I'm not really sure I understand what you want to do. Do you want to to restart the login manager? Why? Or do you want to restart (reboot) the system? Or do you want to restart xfce?
Image
Image
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: Restart login manager

Post by mimosa »

Maybe

Code: Select all

init 4
bradnag
Posts: 23
Joined: 1. Nov 2022, 23:38

Re: Restart login manager

Post by bradnag »

gapan wrote: 8. Jan 2023, 20:01 Hi, I'm not really sure I understand what you want to do. Do you want to to restart the login manager? Why? Or do you want to restart (reboot) the system? Or do you want to restart xfce?
login manager
User avatar
gapan
Salix Wizard
Posts: 6238
Joined: 6. Jun 2009, 17:40

Re: Restart login manager

Post by gapan »

Lightdm is restarted as soon as you exit xfce. There's no need to do anything else.
Image
Image
bradnag
Posts: 23
Joined: 1. Nov 2022, 23:38

Re: Restart login manager

Post by bradnag »

Right! Unfortunately I can't recall the exact circumstances. Right now the question is silly but back then it was a issue. I think I needed to start X, my user account because I had a VNC server (vino) on X' startup. While the X login prompt was available locally I was not able to enter credentials (due to ssh).
I tried startx but startx is not allowed for console users as you know, I should have redirect :X perhaps but I did not know how.

My Desktop Environment is XFCE v.4.16

So the questions are:
- what is default login manager (maybe lightdm)
- how to stop/start/restart the lightdm service from CLI/ssh (/etc/rc.d/?)
- how to log into X the user account from CLI (ssh)

So in a nutshell the main question would be: how to login a user account into X from a ssh terminal?
User avatar
gapan
Salix Wizard
Posts: 6238
Joined: 6. Jun 2009, 17:40

Re: Restart login manager

Post by gapan »

The login manager that is used in salix 15.0 is lightdm.

But it doesn't work like you think it does. First, you can't start an X session from within ssh, at least that's not the normal way of doing things. What you could do, is start a VNC server from within your ssh session and then connect using a VNC client.

Or, if you're already logged in your PC and you want to connect to that session, then run x11vnc as your VNC server and connect with a VNC client.

Note that it would be preferable to encrypt your VNC session through SSH. Do a web search for "VNC ssh tunnel".

Otherwise, it is possible to configure lightdm for connecting remotely with XDMCP and you could log in from there. But since you're already connecting through SSH, I'd say that the VNC-through-SSH option is the easiest.
Image
Image
bradnag
Posts: 23
Joined: 1. Nov 2022, 23:38

Re: Restart login manager

Post by bradnag »

correct.
long time ago i used a script to start X11vnc as service at boot which worked. Forward unencrypted traffic to ssh tunnel as well. Anyhow I am not login into X so this option fall.
I could start xtigervnc server from ssh but was not a issue of connection. I understand there is no way to start X from ssh. I am not familiar with XDMCP,
The easiest option would be automatic login (I did with gnome but not tried lightdm), wouldn't? I mean when rebooting is not an issue.

Thanks a lot!
User avatar
gapan
Salix Wizard
Posts: 6238
Joined: 6. Jun 2009, 17:40

Re: Restart login manager

Post by gapan »

Yes, you can enable automatic login with lightdm and then use an x11vnc server to connect to the running session.
Image
Image
Post Reply