sobota 31. marca 2012

X Window, Xorg, Fluxbox

Maybe you have already noticed, while you do something, you always need to search something on the internet, have multiple CLIs to be open or so and all in the same time.
One option is to have multiple OSs, but who wants to switch to another everytime you need something.

Installation of X window is not so difficult to not to do that, what's more difficult, is adjustment your X window, at least you don't install KDE or GNOME or another heavy environment with preinstalled environment.
After basic installation of X window and window manager, you are fully able to run some GUI browser, media player. If you need to adjust window appearance, styles, desktop icons, it takes a huge time I think. But at the end, you can get very nice desktop version of system.

What I don't like at all are environments like KDE, GNOME, at least not on FreeBSD. I don't like trash I don't need, and it takes more time to remove it compared to install light envir. and install what you need. I like to have everything under control and I start always with light base and than add what I need.

1.Xorg
Xorg is window server. Bridge between hardware and what you see on display.
There is normal version and light version of Xorg. I don't know the difference but of course I'm going to install light one.
cd /usr/ports/x11/xorg-minimal/
make install clean

Config file for Xorg is in "/etc/X11/xorg.conf". Actually there is no by default. You have to create it.
I think that best practice is to make "xorg.conf" be created and than edit it.
Xorg -configure
Above will search for video devices, keyboards...and generate initial xorg.conf which you can copy to /etc/X11 directory.

I have nvidia card so first, nvidia drivers are essential.
cd /usr/ports/x11/nvidia-driver
make install clean

Nvidia.ko modul is installed to "/boot/modules" and you can load it to system by: kldload nvidia
Than you should be able to run Xorg by typing: Xorg.
Now black/gray screen appears. If you are not returned to CLI with some error messages, than everything is OK. Otherwise the only way is to read error messages and figure out with friend Google what's going on.
To shut Xorg down, use Alt+F1.

If you want to be nvidia loaded after booting put below to "/boot/loader.conf":
nvidia_load="YES"

2.Fluxbox
Ok, you have X server which can communicate with hardware but what's missing is, some software which can work with windows. Arrange them, control them...
As I said I like light systems and Fluxbox is one of the lightest window managers.
It has many options to adjust and you can create really nice work place.
cd /usr/ports/x11-wm/fluxbox/
make install clean
vi /root/.xinitrc - new file will be created, I use root account
exec startfluxbox - create this line

Now to start your window env. type into CLI: startx

You should see gray screen with bar at the bottom with clock in the bottom right corner.

3.Hints
Above steps are basic steps how to start. All further is about customizing.
For me, I need two important things at the beginning, firefox and xterm.
Installation of firefox is very simple, but with very long compilation.
cd /usr/ports/www/firefox
make install clean

cd /usr/ports/x11/xterm
make install clean

I don't like default appearance of xterm.
vi /root/.Xdefaults - new file will be created, I use root account
I have following lines:
xterm*background: black - black background
xterm*foreground: white - white foreground
xterm*faceName: luxi mono - font I prefer
xterm*faceSize: 16 - font size
xterm*selectToClipboard: true - make copy/paste to work
xterm*scrollBar: true - visible scrollbar
xterm*rightScrollBar: true - scrollbar on the right side

To find out right name for font may be really difficult, I use simple port to browse through fonts.
cd /usr/ports/x11-fonts/xfontsel
make install clean

If you want to have icons on desktop, you need another port for it.
I will write more about customizing in further time.


Žiadne komentáre:

Zverejnenie komentára