Advertisement

freeBSD newbie-simple questions

Started by February 05, 2005 06:52 PM
21 comments, last by romanMagyar 19 years, 8 months ago
Hi guys, I'm new to this whole Unix thing, so I've never encountered anything quite like freeBSD. I've got some of the basic command-line commands down, but I'd like to work with a GUI. How exactly do you access X window? I've tried entering startx, xinit and nothing seems to work (it says command not found). Any help would be much appreciated.
Well, do you have X installed, for one?
Advertisement
If X is installed, then the typical command to start it is "startx"
I think I do...During the installation process, it asked if I want Windows X, so I simply selected the "Install All" option...maybe I screwed up somewhere. Gonna have to play around with it...
Okay, type 'ls -a' in your home directory. Is there a file called .xinitrc, and if so, what does it say? (Type 'less .xinitrc' to read it.)

startx is a wrapper for another program called xinit, and xinit reads this file from your home directory, which tells it what programs to load, including your window manager. If there is no .xinitrc file, you will have to make one to load your desktop environment. And we'll be glad to help you out with that.
Yeah, I typed ls -a in my home directory and it didn't say .xinitrc...So, I put the CD with freeBSD and selected the option "Post-installation." I selected all the programs to install, waited a few minutes and saw that the computer rebooted itself. I shut it down and now absolutely nothing comes up. I guess I totally screwed up the hard drive... Also, when I login in, I type in "root". Is that alright? I was never asked to create a login in name, just a password. Also, I shut the computer off with the on/off button on my computer, or is there a command to enter that shuts the computer off?
Advertisement
Use the handbook, it'll expain everything for you.

Clicky

Pretty much comes down to, cd-ing to /usr/ports/x11/xorg, make install clean. Then picking your window manager of choice. The handbook will explain it all for you pretty nicely. Any other questions feel free to ask. Handbook explains it all pretty well.
"Knowledge is of two kinds. We know a subject ourselves, or we know where we can find information upon it." - Samuel Johnson
[continued from poster above]

Assuming you have istalled the Ports collection, that is. If you haven't got any data you want to keep, I suggest you start over with a new installation and follow the handbook closely.
¨@_
You can login as root to do installatin and stuff, but you should never login asa root to do normal usage ... you can log in as you (kmcafee in my case), and then you can use the "su" command to get superuser priveleges whenever you need them (to do this you must set yourself up as a member of the "wheel" group (see handbook).

basically, when I install free BSD I - install everything ... like you did, including ports. I set the root password. I install the port for the bash shell (cause I have more experience with bash than csh), then a make a kmcafee user that is a member of the wheel group.

immediatly after the primary reboot, I log in as root to make sure it works ... then i logout, then I login as kmcafee to make sure that works, and then i use su from kmcafee to make sure that works. If it does (and it always does if I didn't forget to make him a member of wheel) then I am set to go.

Now for xwindows. As the root user (cause this is installation stuff). When you installed all, xwindows was installed, but not configured. you have to go to the post installation area to configure xwindows (pick things like supported resolutions and refresh rates, etc). Then you have to go to post installation to configure your default desktop/window manager - which means picking between gnome, kde, etc ... if you dont do this startx will give you a mostly useless primative system that only a master unix sys admin could ever use. Note: To pick gnome, kde etc ... you should also have installed gnome / kde, etc from the ports or pacakges. I personally like kde, but you can use anything you want.

The key here is that all configuring your window manager does is edit the .xinitrc file and some other .x??? file I can't remember. These files go in each user's home directory (copy them from the root users home directory to your other users home directory if you want to do what I recommend - not run as root all the time). These are just text files with 1 line telling x windows which window manager command to run at startup ...
FreeBSD would be REALLY hard to setup and use if you don't have access to the online handbook (like if you are installing it on your only compuer :). With access to the online handbook, it is just a simple matter of very slowly and carefully reading the section of the handbook that interests you. The handbook is very good, very detailed and very clear - if you take the time to read it very carefully (and are fairly computer literate). Whenever I install FreeBSD I have another computer with an open web browser to the handbook (http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/index.html - but the most dependable link is just to go to www.freebsd.org and click on Handbook).

This topic is closed to new replies.

Advertisement