File:  [NetBSD Developer Wiki] / wikisrc / pkgsrc / how_to_install_modular_xorg.mdwn
Revision 1.3: download - view: text, annotated - select for diffs
Sun May 12 18:23:51 2019 UTC (4 years, 4 months ago) by maya
Branches: MAIN
CVS tags: HEAD
Rewrite. Refer to meta-pkgs/modular-xorg. Following this guide will
result in too few drivers being installed. Let's advise the easy option
that only requires more compilation time.

Add some documentation about ~/.Xresources and ~/.xinitrc, which
are the go-to way to configure Xorg now.

X -configure should not be needed.


[[!toc levels=2]]

#  No X installed

Assuming you have just made a clean install of NetBSD and you have not installed the X11 sets, you should do the following: 

##  /etc/mk.conf

Edit your /etc/mk.conf and add the following line: 

##  Install xorg

Provided that your pkgsrc tree lies in `/usr/pkgsrc`, type: 
    # cd /usr/pkgsrc/meta-pkgs/modular-xorg
    # make install

##  Configure Xorg

Usually no configuration is necessary. To start X you use:

    $ startx

## Additional configuration

Additional adjustments can be made in ~/.xinitrc and ~/.Xresources.
For example, you may want to use a different terminal emulator font, such as pkgsrc/fonts/overpass.

## ~/.Xresources

To do so, we can add this line to ~/.Xresources:

    *font: xft:overpass mono:size=12

For this to take effect, we must do merge it into the database.

    $ xrdb -merge ~/.Xresources

To do this at every X startup, we can add it to ~/.xinitrc.

<!-- XXX refer to further documentation on .xinitrc -->

## ~/.xinitrc

An example ~/.xinitrc to run a window manager and configure keyboard layout:

    xrdb merge ~/.Xresources				# respect ~/.Xresources configuration

    setxkbmap -option grp:alt_shift_toggle us,il	# two keyboard options, US keyboard and IL,
    							# with alt+shift as a toggle option
    openbox						# run your favourite window manager.

CVSweb for NetBSD wikisrc <> software: FreeBSD-CVSweb