Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to automate a lab of computers running Fedora 17 (Gnome). I need to write a script that logs out the current local user on the system and logs in as a different user. The systems are currently using gdm. How can I login local users to a graphical interface via an SSH connection?

share|improve this question
up vote 0 down vote accepted

This won't interact with gdm, but you can login to the machines over SSH and invoke the startx command - it switches to a new tty and logs in the user.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.