Find the answer to your Linux question:
Results 1 to 2 of 2
Hi, I wonder how to make the xsever automatically start on login. I have tried to include 'exec startx' in the user's .bash_profile,without succes, but can on the other hand ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2007
    Posts
    2

    How to make startx run on login?


    Hi,
    I wonder how to make the xsever automatically start on login. I have tried to include 'exec startx' in the user's .bash_profile,without succes, but can on the other hand exec startx manually after login without problems. After automatically logging in the screen goes blank for a sec and falls back to the console with the common pointer and the lower half of the screen grey.
    I would appreciate a bash script to start the xserver as i am using a handheld device without keyboard and can only ssh to it.
    Any ideas?
    Help appreciated

  2. #2
    Linux Engineer
    Join Date
    Nov 2004
    Location
    home
    Posts
    796
    Generally in runlevel 5 gdm, kdm, or xdm will start up because there's a script to do it in /etc/rc.d/rc5.d or wherever the init scripts are located. For startx, make sure there's things in .xinitrc for it to run. Whatever is in .xinitrc, make sure there's something that isn't started in the background (without the & at the end) that will stay open during the whole session. The X server will exit after it runs through all the commands in .xinitrc which is why you need that. Also, if still having problems, make sure there's nothing abnormal in the log.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •