Install Gnome Desktop and Gnome Display Manager on OpenBSD 4.8



Installing Gnome in OpenBSD 4.8 OpenBSD default window manager







Now open: Gnome 2.30 about window on OpenBSD 4.8






OpenBSD 4.8 Memory usage






OpenBSD just uses about 70 MB of RAM with Gnome. After a fresh default install of OpenBSD 4.8 open a terminal (xterm by default).


First, make sure that you are in your home directory :


$ pwd       It should display /home/your_user_name/. If not, cd to your home directory.


Then become root :



$ cd ~your_user_name

$ su
OpenBSD xterm





To create the cache directory, type the following command :


# mkdir /path_to_your_pkg_cache


Then set and export the PKG_CACHE environment variable :


# export PKG_CACHE=/path_to_your_pkg_cache/


You can install the nano text editor for a convenient editing of config files and set the nowrap mode to avoid automatic creation of new lines:


# pkg_add http://ftp.openbsd.org/pub/OpenBSD/$(uname -r)/packages/$(uname -m)/nano-2.2.4.tgz



# echo 'set nowrap' > /root/.nanorc

# exit

$ echo 'set nowrap' > .nanorc



After that type:


$ nano .profile


Append/modify the following lines :


PKG_PATH=http://ftp.openbsd.org/pub/OpenBSD/$(uname -r)/packages/$(uname -m)/ ALT_PKG_PATH=http://ftp.chg.ru/pub/OpenBSD/$(uname -r)/packages/$(uname -m)/ PKG_CACHE=/path_to_your_pkg_cache/ export PKG_PATH ALT_PKG_PATH PKG_CACHE


CTRL+X, Yes, Enter will save the file and close nano.


Let's do the same for the root account :


$ su# nano /root/.profile


Append/modify the following lines :


PKG_PATH=http://ftp.openbsd.org/pub/OpenBSD/$(uname -r)/packages/$(uname -m)/ ALT_PKG_PATH=http://ftp.chg.ru/pub/OpenBSD/$(uname -r)/packages/$(uname -m)/ PKG_CACHE=/path_to_your_pkg_cache/ export PKG_PATH ALT_PKG_PATH PKG_CACHE


CTRL+X, Yes, Enter will save the file and close nano.



Reboot :

# reboot



After reboot, you can check by typing the following commands :


$ echo $PKG_PATH



$ echo $ALT_PKG_PATH

$ echo $PKG_CACHE

$ su

# echo $PKG_PATH

# echo $ALT_PKG_PATH

# echo $PKG_CACHE



Checking the environment variables





For example, the following pkg_add lines are also valid if you want to install nano. If PKG_PATH is not yet set:


# pkg_add http://ftp.openbsd.org/pub/OpenBSD/$(uname -r)/packages/$(uname -m)/nano If PKG_PATH is already set, you can simply type:


# pkg_add nano


Here is the command to install Gnome itself :


# pkg_add -i -vv gnome-session-2.30.2p3.tgz


Then wait possibly few hours if you are on a slow connection like me... Or a few minutes if you have a fast Internet connection. At this point, your $PKG_CACHE directory should contain at least the following packages:


Installed packages after the installation of gnome-session





Done ? Let's continue with the installation of the Gnome Display Manager (gdm):


# pkg_add -i -vv gdm-2.20.11p1.tgz


Installed packages after the installation of GDM






Next, we have to edit a configuration file that will start GDM after a successful boot.



# nano /etc/rc.local


Append/modify the following lines in /etc/rc.local: if [ -x /usr/local/sbin/gdm ]; then echo -n ' gdm'; (sleep 5; /usr/local/sbin/gdm) & fi CTRL+X,


Yes, Enter will save the file and close nano. You probably want to start Gnome Desktop automatically at startup and use the Gnome login screen. If yes, type the following commands:



# echo 'exec gnome-session' > /root/.xinitrc



# chmod +x /root/.xinitrc

# exit

$ echo 'exec gnome-session' > .xinitrc

$ chmod +x .xinitrc



Gnome login screen






$ su



# pkg_add -i -vv metacity-2.30.1p1.tgz

# pkg_add -i -vv gnome-panel-2.30.2p2.tgz

# pkg_add -i -vv nautilus-2.30.1p2.tgz



# nano /etc/rc.conf.local


Append/modify the following lines :


xdm_flags=NO gnome_enable=YES gdm_enable=YES If you want, you can now start Gnome by rebooting or typing: $ startx (you don't need to be root)


Configuring the login manager






Choosing the default session






Starting Gnome failsafe terminal






Installation of useful packages :



$ su



# pkg_add -i -vv gnome-terminal-2.30.2p0.tgz

# pkg_add -i -vv gnome-control-center-2.30.1p0.tgz

# pkg_add -i -vv gnome-menus-2.30.2p0.tgz

# pkg_add -i -vv gnome-settings-daemon-2.30.2p1.tgz

# pkg_add -i -vv gnome-themes-2.30.2.tgz

# pkg_add -i -vv gnome-themes-extras-2.22.0p8.tgz

# pkg_add -i -vv gnome-utils-2.30.0p0.tgz

# pkg_add -i -vv gnome-applets2-2.30.0p2.tgz

# pkg_add -i -vv gnome-system-monitor-2.28.1p3.tgz

# pkg_add -i -vv gnome-nettool-2.30.0p0.tgz[/bash]



Finally, reboot and enjoy your Gnome ! # reboot Gnome 2.30 system menu