From owner-freebsd-questions Sun Jun 2 11:30:56 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id LAA02690 for questions-outgoing; Sun, 2 Jun 1996 11:30:56 -0700 (PDT) Received: from relay-2.mail.demon.net (disperse.demon.co.uk [158.152.1.77]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id LAA02680 for ; Sun, 2 Jun 1996 11:30:48 -0700 (PDT) Received: from post.demon.co.uk ([158.152.1.72]) by relay-2.mail.demon.net id ab14403; 2 Jun 96 19:30 +0100 Received: from an158.du.pipex.com ([193.130.253.158]) by relay-3.mail.demon.net id aa00236; 2 Jun 96 19:26 +0100 Received: (from fqueries@localhost) by jraynard.demon.co.uk (8.7.5/8.6.12) id OAA11429; Sun, 2 Jun 1996 14:46:55 GMT Date: Sun, 2 Jun 1996 14:46:55 GMT Message-Id: <199606021446.OAA11429@jraynard.demon.co.uk> From: James Raynard To: sahmad@interlog.com CC: questions@freebsd.org In-reply-to: <199606020325.XAA18803@gold.interlog.com> (sahmad@interlog.com) Subject: Re: FreeBSD question Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > Dear Support, I am having some difficulty with FreeBSD 2.10 in that > whenever Just a quick clarification here - this isn't a Support Desk, just a mailing list where a few people try and help out in their spare time. > I log in as root, I cannot run X-windows via the startx command. The error > I get is 'command not found'. However, when I log in as any other user and This is because the directory where the startx binary lives is not in root's path. You can fix this by editing root's .cshrc file to add /usr/X11R6/bin to the list of directories in the path entry. However, it's normally regarded as good practice not to run commands as root unless you really have to - any mistakes can be very expensive! 8-) Most people start X as themselves and then open a xterm, use the 'su' command to become root in that xterm and do everything else as themselves - the root xterm's always there if you need it. > type startx it works. I have tried going to the directory containing the > startx file/command but it doesnt work as long as I'm longed in as root. A > few other commands also fail to work when I login as root. This is despite > the fact that the files have rwx permissions for all users. Unlike MSDOS, the current directory is not searched in Unix unless it's in the path. In fact, root should *never* have the current directory in the path, as it is a potential security hole. -- James Raynard, Edinburgh, Scotland | http://freefall.freebsd.org/~jraynard/ james@jraynard.demon.co.uk | jraynard@freebsd.org