From owner-freebsd-newbies Fri Apr 17 13:00:49 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA16160 for freebsd-newbies-outgoing; Fri, 17 Apr 1998 13:00:49 -0700 (PDT) (envelope-from owner-freebsd-newbies@FreeBSD.ORG) Received: from whistle.com (s205m131.whistle.com [207.76.205.131]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id UAA16140 for ; Fri, 17 Apr 1998 20:00:34 GMT (envelope-from dhw@whistle.com) Received: (from smap@localhost) by whistle.com (8.7.5/8.6.12) id MAA24836 for ; Fri, 17 Apr 1998 12:59:55 -0700 (PDT) Received: from pau-amma.whistle.com(207.76.205.64) by whistle.com via smap (V1.3) id sma024834; Fri Apr 17 12:59:53 1998 Received: (from dhw@localhost) by pau-amma.whistle.com (8.8.7/8.8.7) id MAA12044 for freebsd-newbies@FreeBSD.ORG; Fri, 17 Apr 1998 12:59:53 -0700 (PDT) (envelope-from dhw) Date: Fri, 17 Apr 1998 12:59:53 -0700 (PDT) From: David Wolfskill Message-Id: <199804171959.MAA12044@pau-amma.whistle.com> To: freebsd-newbies@FreeBSD.ORG Subject: Re: Running X Sender: owner-freebsd-newbies@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Date: Fri, 17 Apr 1998 14:28:27 -0500 (CDT) >From: "Matthew D. Fuller" >/usr/X11R6/bin probably isn't in your path.... Another approach to determining whether or not a given program is likely to be found if you try to execute it (and if so, where it is), is to use the csh (and tcsh -- maybe others) "shell built-in" command "which": pau-amma[2]% which startx xinit X which /usr/X11R6/bin/startx /usr/X11R6/bin/xinit /usr/X11R6/bin/X which: shell built-in command. pau-amma[3]% For folks of sufficient;y twisted mindsets, it's also possible to use the output of "which" as the input of something else: pau-amma[3]% file `!!` file `which startx xinit X which` /usr/X11R6/bin/startx: Bourne shell script text /usr/X11R6/bin/xinit: FreeBSD/i386 compact demand paged dynamically linked executable /usr/X11R6/bin/X: symbolic link to /usr/X11R6/bin/XF86_S3V which:: can't stat `which:' (No such file or directory). shell: can't stat `shell' (No such file or directory). built-in: can't stat `built-in' (No such file or directory). command.: can't stat `command.' (No such file or directory). pau-amma[4]% (Sometimes, it's useful to know when a given program's whimpers & complaints are safe to ignore....) Now that you know that startx is a script, "less `which startx`" will let you take a look at it (assuming, of course, that it's in your path, and that "less" is also in your path -- you could use "more" rather than "less"... but we don't need to go into that right now...). For sh (& similar shells, I believe), there's a command that has similar functionality, called "type". (And if you're running one of those shells, there's a "which" Perl script in /usr/bin, though this seems to be a FreeBSDism, so don't rely on it if you happen to be using some other platform.) Hope that helps folks figure things out a little better, david -- David Wolfskill dhw@whistle.com (650) 577-7158 pager: (650) 401-0168 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-newbies" in the body of the message