From owner-freebsd-newbies Fri Feb 22 13:44:45 2002 Delivered-To: freebsd-newbies@freebsd.org Received: from bunny.dislocatedbrain.com (hill-d-193.resnet.purdue.edu [128.211.207.193]) by hub.freebsd.org (Postfix) with ESMTP id C73F737B419; Fri, 22 Feb 2002 13:44:23 -0800 (PST) Received: from bunny.dislocatedbrain.com (localhost [127.0.0.1]) by bunny.dislocatedbrain.com (Postfix) with ESMTP id 671C266B; Fri, 22 Feb 2002 16:44:05 -0500 (EST) Date: Fri, 22 Feb 2002 16:44:05 -0500 From: Sumanth Peddamatham To: Aniruddha Bohra Cc: freebsd-newbies@freebsd.org, freebsd-questions@freebsd.org Subject: Re: Starting X for non root users Message-ID: <20020222164405.A5970@bunny.dislocatedbrain.com> References: Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit In-Reply-To: ; from bohra@cs.rutgers.edu on Fri, Feb 08, 2002 at 02:37:26 -0500 X-Mailer: Balsa 1.3.1 Lines: 69 Sender: owner-freebsd-newbies@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On 2002.02.08 02:37 Aniruddha Bohra wrote: > > Hello > I have been trying to get X to work for non root users but > have > failed on FreeBSD 4.4. > > In any case Xwrapper does not work even for root, but startx > works(so > there is nothing wrong with the X configuration). > > Xwrapper just starts a gray screen and sits there. > > xdm/kdm both show the initial screen, take login and passwd > if login is incorrect, they say login failed > however, if correct login is provided, the server restarts. > > Any ideas about how to do it? > > Thanks > Aniruddha hi aniruddha, ok, it is my understanding that you can not run X as a non root user. i read somewhere that it's something they are going to fix in a later rev. i've spent many a sleepless night trying to figure that one out and the closest i've gotten was a mad-crazy sudo hack, but then again, X was still running as root. anyways, my current setup uses XDM which atleast sets my login environment as non-root. i think the problem you are having with xdm/kdm is that you don't have the proper lines in your ~/.xsession file. i run Gnome, and here's my .xsession file: <---snip---> xmodmap -e "pointer = 1 2 3 6 7 4 5" imwheel -p -b '76' gnome-session <---/snip---> (you can ignore the modmap and imwheel stuff. they are there to get my scroller and side buttons on my intellimouse explorer to work.) the command to start KDE is 'startkde'. all you have to do is create a file ~/.xsession with the line 'startkde' in it and you should be ready to go. the reason the X server just reboots after login is because it runs the local login scripts, akin to your 'startup folder' on winxx, if there isn't anything in them, it assumes you're done using X and it politely restarts for the next user to login. (that's why the server 'restarts' when you quit KDE or Gnome. it's not any magic on KDE or Gnome's part, they are simply local programs and when you 'logout', they just save the current session and exit.) so, the bare minimum that you need in your ~/.xsession file is a windowmanager so that you have a running process to let X know you're still using it. it may seem a little confusing because when you start KDE or Gnome or 'X' from the root command prompt by typing in 'startx', what you are doing is running a start-up script (in fact, crack it open and take a look, it's an interesting read) that looks for your custom initializations and cleverly starts X by using 'xinit'. however, it \doesn't\ look at your ~/.xsession file, it instead looks at your ~/.xinitrc file. most desktop environments (KDE/Gnome/Blah) set this file up for you and, if i understand correctly, it's format is identical to your .xsession file that xdm calls on startup. take a look and see if you have a .xinitrc file and see what's inside. if it looks safe, just cp it to .xsession and try logging in using xdm. if you still have problems, let me know. sumanth p. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-newbies" in the body of the message