installing gnome desktop and gnome display manager on ... · installing gnome desktop and gnome...

10
Installing Gnome Desktop and Gnome Display Manager on OpenBSD 4.7 Installing Gnome in OpenBSD 4.7 Notice This document is aimed at people willing to install the official Gnome package on a fresh and default install of OpenBSD 4.7. While several other documents exist, I didn’t find one with all the necessary steps. I somehow managed to make it work, so I would like to share this experience with you, if it can make you avoid some hassles. This document tries to be as precise and accurate as possible. However it may not be perfect, and it is of course possible that it does not work in your configuration. It worked with mine, but your comments, corrections and suggestions are welcome, and this document will be updated accordingly. Gnome 2.28.2 "about screen" on OpenBSD 4.7 Let’s go ! After a fresh default install of OpenBSD 4.7, open a terminal. First, make sure that you are in your home directory : It should display /home/your_user_name/. If not, cd to your home directory.

Upload: phamquynh

Post on 07-Mar-2019

282 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Installing Gnome Desktop and Gnome Display Manager on ... · Installing Gnome Desktop and Gnome Display Manager on OpenBSD 4.7 Installing Gnome in OpenBSD 4.7 Notice This document

Installing Gnome Desktop and Gnome Display Manager onOpenBSD 4.7

Installing Gnome in OpenBSD 4.7

Notice

This document is aimed at people willing to install the official Gnome package on afresh and default install of OpenBSD 4.7. While several other documents exist, Ididn’t find one with all the necessary steps. I somehow managed to make it work,so I would like to share this experience with you, if it can make you avoid somehassles. This document tries to be as precise and accurate as possible. However itmay not be perfect, and it is of course possible that it does not work in yourconfiguration. It worked with mine, but your comments, corrections and suggestionsare welcome, and this document will be updated accordingly.

Gnome 2.28.2 "about screen" on OpenBSD 4.7

Let’s go !

After a fresh default install of OpenBSD 4.7, open a terminal.

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

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

Page 2: Installing Gnome Desktop and Gnome Display Manager on ... · Installing Gnome Desktop and Gnome Display Manager on OpenBSD 4.7 Installing Gnome in OpenBSD 4.7 Notice This document

Then become root :

OpenBSD xterm

Note: I advise you create a cache for thedownloaded packages (specify a location withsufficient free space, 2 GB would not be too much)for easy and fast re-installation in case somethinggoes wrong. To create the cache directory, type the

following command :

1 mkdir /path_to_your_pkg_cache

You can install the nano text editor for a convenient editing of config files (optionalstep, you can use vi if you prefer) and set the nowrap mode to avoid automaticcreation of new lines:

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

2 echo "set nowrap" > /root/.nanorc4 echo "set nowrap" > .nanorcNote: If you are new to OpenBSD, the pkg_add command is used to install a package intoyour system. Its most useful arguments are -v, -vv, -vvv, -vvvv, -vvvvv whichrepresent the verbosity level of the command output; -i which enables theinteractive mode; the path to the package comes last.

Let met also explain briefly the uname command. In the previous pkg_add line, Iused uname -r and uname -m. The first will output the version of OpenBSD (4.7 inmy case) and the second the architecture (amd64 in my case).

For more detailed informations about these commands, do not hesitate to use theman command with the command name in argument.

You can use another URL for the pkg_add line, if you find that another mirror isfaster.

Now we should set the PKG_PATH environment variable so that the pkg_addcommand knows where to search for the packages and to save us from typing thefull mirror URL at each command. This is done in the .profile file located in yourhome directory :

Append the following lines :

1 PGK_PATH=http://ftp.openbsd.org/pub/OpenBSD/$(uname -r)/packages/$(uname -m)/

Page 3: Installing Gnome Desktop and Gnome Display Manager on ... · Installing Gnome Desktop and Gnome Display Manager on OpenBSD 4.7 Installing Gnome in OpenBSD 4.7 Notice This document

2 ALT_PKG_PATH=http://ftp.chg.ru/pub/OpenBSD/$(uname -r)/packages/$(uname -m)/

3 PGK_CACHE=/path_to_your_pkg_cache/

4 export PKG_PATH ALT_PKG_PATH PKG_CACHE

Note: Take care to specify two different and fast mirrors if you don’t want to wait twodays at each pkg_add command…

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

Let’s do the same for the root account :

Append the following lines :

1 PGK_PATH=http://ftp.openbsd.org/pub/OpenBSD/$(uname -r)/packages/$(uname -m)/

2 ALT_PKG_PATH=http://ftp.chg.ru/pub/OpenBSD/$(uname -r)/packages/$(uname -m)/

3 PGK_CACHE=/path_to_your_pkg_cache/

4 export PKG_PATH ALT_PKG_PATH PKG_CACHE

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

In addition, you may type the 8 previous lines directly in the terminal if you don’twant to restart now, so that the environment variables are updated. You can checkby typing the following commands :

Checking the environment variables

Note: Following the suggestion of Peter Ljung in his comment, please note that it is notcompulsory to add the version number and the file extension of the package in yourpkg_add lines. I always specify the full package path because my connection is slowand this way pkg_add does not have to search for the correct version number.When you don’t add the version number, pkg_add will download the full packagelisting, which can consume a lot of time if you are on a slow connection. But forexample, the following pkg_add lines are also valid if you want to install nano:

If PKG_PATH is not yet set:

Page 4: Installing Gnome Desktop and Gnome Display Manager on ... · Installing Gnome Desktop and Gnome Display Manager on OpenBSD 4.7 Installing Gnome in OpenBSD 4.7 Notice This document

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

if PKG_PATH is already set, you can simply type :

I guess that you now feel the interest of setting PKG_PATH, don’t you ?

If you want to know the full package filename, just go to the packages root pathand note the full filename of the package. In my case I have to go tohttp://ftp.openbsd.org/pub/OpenBSD/4.7/packages/amd64/. You have to go tothe right packages root path related to your architecture and OpenBSD version.

The environment is now ready for Gnome. Here is the command to install Gnomeitself :

1 pkg_add -i -vv gnome-session-2.28.0p7.tgz

Then wait possibly few hours if you are on a slow connection like me…

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

1 pkg_add -i -vv gdm-2.20.10p10.tgz

Append the following lines in /etc/rc.local:

1 if [ -x /usr/local/sbin/gdm ]; then2 echo -n ' gdm'; (sleep 5; /usr/local/sbin/gdm)&

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

You probably want to start Gnome Desktop automatically at startup and use theGnome login screen. If yes, type the following commands:

1 echo "exec gnome-session" > /root/.xinitrc4 echo "exec gnome-session" > .xinitrc

Page 5: Installing Gnome Desktop and Gnome Display Manager on ... · Installing Gnome Desktop and Gnome Display Manager on OpenBSD 4.7 Installing Gnome in OpenBSD 4.7 Notice This document

Gnome login screen

Note: At this point, if you restart, you should be able to see at least the Gnome loginscreen. But don’t restart now.There are still some missing important packages to install : metacity, gnome-paneland nautilus. Without them, you will not be able to do much things but watchingthe default Gnome wallpaper (except if you like empty screens)…

So let’s install the missing packages.

Note: If some choice between libraries are to be made, just choose the first one by typing 0validated by Enter.

2 pkg_add -i -vv metacity-2.28.0p0.tgz

3 pkg_add -i -vv gnome-panel-2.28.0p6.tgz

4 pkg_add -i -vv nautilus-2.28.4p0.tgz

You can now try to start Gnome by restarting or typing:

(you don’t need to be root).If the FVWM window manager is still displaying instead of Gnome Desktop, trythe following :

Append the following lines :

Note: Be sure to select Gnome Desktop at the Gnome login screen, and to set it as thedefault one when asked ! If you missed it, you still can do it in the Gnome loginscreen by going in the menu Actions > Configure login manager… and checkingand choosing the default session in the General tab. If you cannot use yourkeyboard in the Gnome login screen, see the Troubleshooting section.

Page 6: Installing Gnome Desktop and Gnome Display Manager on ... · Installing Gnome Desktop and Gnome Display Manager on OpenBSD 4.7 Installing Gnome in OpenBSD 4.7 Notice This document

Configure the login manager

Choosing the default session

At this point, Gnome should be able to start. However you don’t even have thegnome-terminal package installed, which is not very convenient…More, maybe the keyboard will not work and no title bars will be displayed, that is

Page 7: Installing Gnome Desktop and Gnome Display Manager on ... · Installing Gnome Desktop and Gnome Display Manager on OpenBSD 4.7 Installing Gnome in OpenBSD 4.7 Notice This document

kind of an issue if you aim to produce a usable computer…So I strongly advice you install the following packages to solve these issues.

Note: You can still use the Gnome failsafe terminal from the Gnome login screen if youcan’t get access to Xterminal.

Starting Gnome failsafe terminal

Installation of useful packages :

2 pkg_add -i -vv gnome-terminal-2.28.2p0.tgz

3 pkg_add -i -vv gnome-control-center-2.28.1p1.tgz

4 pkg_add -i -vv gnome-menus-2.28.0.1p4.tgz

5 pkg_add -i -vv gnome-settings-daemon-2.28.1p1.tgz

6 pkg_add -i -vv gnome-themes-2.28.1p0.tgz

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

8 pkg_add -i -vv gnome-utils-2.28.1p0.tgz

Note: The PKG_PATH environment variable may not be set if you type this line from theGnome failsafe console, so you can type the 8 lines concerning PKG_PATH before,or just type the full mirror url if unlike me you like to waste your time.

Gnome Desktop is now installed and running along with Gnome Window

Page 8: Installing Gnome Desktop and Gnome Display Manager on ... · Installing Gnome Desktop and Gnome Display Manager on OpenBSD 4.7 Installing Gnome in OpenBSD 4.7 Notice This document

Manager on the most secure OS available. Nice, isn’t it ?

Finally you can customize your Gnome desktop, for example you may want tochange the screen resolution, and use it as an OpenBSD workstation or whateveruse you can find.

Some screenshot of Gnome Desktop 2.28 running on OpenBSD 4.7 for the pleasure :

Gnome System preferences menu

Page 9: Installing Gnome Desktop and Gnome Display Manager on ... · Installing Gnome Desktop and Gnome Display Manager on OpenBSD 4.7 Installing Gnome in OpenBSD 4.7 Notice This document

Gnome Applications menu

Troubleshooting and FAQ

Q : My keyboard does not respond in the Gnome login screen, I can’t type myusername and password !

A : It happened to me also. In the Gnome login screen, simply choose Actions >Remote login via XDMCP, then click Cancel once the remote login screen is loaded,you will return to the Gnome login screen and hopefully the keyboard will work !(Or at least it worked for me)

Q : Why is your xterm window more beautiful than mine ?

A : Because I took the screenshot in a Gnome Desktop session. But is it important ?

Q : Why do you install Gnome on OpenBSD in the first place ?

A : And why not ? OpenBSD is the perfect candidate for a workstation machine :secure, stable, not bloated with 3000 widgets. Of course one wouldn’t work on aworskstation if it is not a minimum beautiful and convenient. Gnome is here tocorrect this problem. I have nothing against FVWM for a terminal station, but Idefinitely prefer Gnome as a workstation user interface.

Q : Do you plan to make a similar tutorial for KDE ?

A : No, I don’t plan to use KDE in its current version, not because it is bad (it’sgood actually) but simply because I prefer Gnome.

Q : How to install OpenBSD ?

A : Get the iso, then just burn the install47.iso file to a CDR, reboot and press Entera few times. Here it is, you just installed OpenBSD !

Q : Is your document also valid for FreeBSD or NetBSD ?

A : I don’t know. Most probably not. But you can try and tell me your findings.

Finally

Here it is, this is the end of this document and I hope it will help someone as muchas it would have helped me if I found it when I needed it !

Page 10: Installing Gnome Desktop and Gnome Display Manager on ... · Installing Gnome Desktop and Gnome Display Manager on OpenBSD 4.7 Installing Gnome in OpenBSD 4.7 Notice This document

Regards,

Gabriel Hautclocq