This page is crap.
[ikiwiki.git] / docs / how_to_get_to_the_desktop / index.mdwn
38e8bbbb 1# How to get a desktop on DragonFly
42289f91 3This topic is wildly out of date. It is also mostly redundant as it covers the same ground as the "installing and configuring X" topic [here](/docs/newhandbook/X).
38e8bbbb 4
5[[!toc levels=3 ]]
7## Prerequisites
8To get to the desktop you need a working internet connection to download pkgsrc and the packages themselves.
10## Dealing with pkgsrc
12### Installing pkgsrc
13The basic pkgsrc tools are already provided with every DragonFly default installation, but you still have to download the pkgsrc tree to build and install packages.
15First choose a mirror next to you which provides a git repo containing the pkgsrc tree, you can find them on the [DragonFly mirrors page]( Next copy the mirrors adress into the Makefile contained in /usr.
17Now execute as root
f31b07b2 18
d0f4eeeb 19 # cd /usr && make pkgsrc-create
f31b07b2 20
38e8bbbb 21to initally create the pkgsrc tree.
f31b07b2 22
23### Searching a package
24Since there are many different packages in the pkgsrc tree you can use a small tool to find the one you are looking for in a short time. For example if you are looking for the ruby package just do
e44eb63c 25
d0f4eeeb 26 # pkg_search ruby
e44eb63c 27
f31b07b2 28and you will get a list of packages containing ruby in their name. If you want to install the ruby-1.9.2pl0 package now, just do
e44eb63c 29
30 # pkg_search -v ruby-1.9.2pl0
f31b07b2 32and you will get the path leading to the package.
34### Installing a package
35You got two possibilities to install a package. The first one is to install it from source and the second one is to install prebuild binaries. Depending on your cpu and the size of the package its faster installing binaries, but if you want to change some build options you have to install it by source.
36If you want to install binaries you only have to use the pkg_radd application. For example to install the xfce4 package just do:
e44eb63c 37
38 # pkg_radd xfce4
f31b07b2 40If you want to install something by source you have to change into the packages directory contained in the pkgsrc tree and execute bmake install clean:
e44eb63c 41
42 # cd /usr/pkgsrc/security/openssh && bmake install clean
f31b07b2 44If you build a package by source you can also change some build options if supported by the package.
e44eb63c 45
46 # cd /usr/pkgsrc/security/openssh && bmake show-options
f31b07b2 48You will get a list of supported options. To change them install the package by:
e44eb63c 49
50 # bmake PKG_OPTIONS.<package_name>="-option1 option2" install clean
f31b07b2 52
53### Removing a package
54If you don't need a package anymore and you want to remove it just change into the packages directory and do:
e44eb63c 55
56 # bmake deinstall
f31b07b2 58
59### Updating packages
60From time to time you should update your packages, since there will be newer versions with bugfixes or new functionality. There are several methods to update packages but the best one is to use pkg_rolling-replace. You can install it with pkgsrc. After you've done that you'll only have to:
e44eb63c 61
62 # cd /usr && make pkgsrc-update
63 # pkg_rolling-replace -u
f31b07b2 64
65## The X Window System
66### Installing the Server
d0f4eeeb 67The installation of the X Window System contains a few steps. We will start with the most basic one: Installing the X-Server.
68To do so you have to execute as root
e44eb63c 69
70 # cd /usr/pkgsrc/x11/modular-xorg-server && bmake install clean
d0f4eeeb 72or if you want to install it as a binary
e44eb63c 73
74 # pkg_radd modular-xorg-server
d0f4eeeb 75
f31b07b2 76### Installing appropriate drivers
d0f4eeeb 77You now need some input drivers and a video driver for your video card.
78If you want to install all input and video drivers so you can test them out install the modular-xorg-drivers package
f2fa9e29 79
80 # cd /usr/pkgsrc/meta-pkgs/modular-xorg-drivers && bmake install clean
d0f4eeeb 82or if you want to install them as binaries
f2fa9e29 83
84 # pkg_radd modular-xorg-drivers
d0f4eeeb 85
86If you know which drivers you need install them on your own needs. They can be found in /usr/pkgsrc/x11/ and are named xf86-<video or input>-<driver name>
f31b07b2 88### Other importan X related packages
d0f4eeeb 89Now we will install other important packages for X. We will need some additional libraries
f2fa9e29 90
91 # cd /usr/pkgsrc/meta-pkgs/modular-xorg-libs && bmake install clean
d0f4eeeb 93or if you want to install them as binaries
f2fa9e29 94
95 # pkg_radd modular-xorg-libs
d0f4eeeb 96
97Next we'll need some fonts
f2fa9e29 98
99 # cd /usr/pkgsrc/meta-pkgs/modular-xorg-fonts && bmake install clean
d0f4eeeb 101or if you want to install them as binaries
f2fa9e29 102
103 # pkg_radd modular-xorg-fonts
d0f4eeeb 104
105Last package we need contains some useful applications like xterm and startx
f2fa9e29 106
107 # cd /usr/pkgsrc/meta-pkgs/modular-xorg-apps && bmake install clean
d0f4eeeb 109or if you want to install them as binaries
f2fa9e29 110
111 # pkg_radd modular-xorg-apps
d0f4eeeb 112
f31b07b2 113### Configuring X
d0f4eeeb 114Since we have installed all necessary packages now we have to configure X so it works like we want it. First execute as root
f2fa9e29 115
116 # Xorg -configure
117 # cp /root/ /etc/X11/xorg.conf
d0f4eeeb 119Now we have a basic configuration file for X.
120As normal user now create a file named ~/.xinitrc and write exec xterm in it. Now make it executable
f2fa9e29 121
122 # chmod +x ~/.xinitrc
d0f4eeeb 124Now you can try to start the X server by doing
f2fa9e29 125
126 # startx
d0f4eeeb 128as normal user.
129If everything works well you should see a white terminal and should be able to mover your mouse. Click into the terminal and test you keyboard layout. Now type exit into the terminal and you will return to TTY. If everything worked well you can continue with installing a desktop environment, if not you have to manually edit /etc/X11/xorg.conf . Also check the documentation and the DragonFly handbook, where you may find a solution to your problem.
f31b07b2 131## Installing a Desktop Environment
d0f4eeeb 132
133This part will explain how to install the desktop environments KDE and Xfce, if you prefer GNOME or a standalone windowmanager you have to read other guides or documentation.
f31b07b2 134### KDE
d0f4eeeb 135KDE stands for K Desktop Environment, its a modern desktop environment, based on Nokia's QT-Framework, with many nice applications. If your computer has less than 1Gb RAM you should better install Xfce4 described later in this guide.
136Since the KDE and QT packages are pretty huge you can save much time when using binary packages.
137There are 2 different KDE meta-packages available: KDE3 and KDE4 . KDE3 is the older, but more stable release while KDE4 has many new features but also new bugs. So it's on you to decide which one you want to install.
138For KDE3 simply do as root
f2fa9e29 139
140 # pkg_radd kde3
d0f4eeeb 142For KDE4
f2fa9e29 143
144 # pkg_radd kde4
d0f4eeeb 145
146Now that you have installed KDE we still need to start it.
147As user edit your ~/.xinitrc and comment the exec xterm part out and add exec startkde.
148Now start it with executing startx as user. If everything works well you should see a standard KDE desktop, you now can explore ist or read documentation to see what you can do with it.
150Some users may prefer a graphical log in, KDE provides it's own display manager for them: kdm. It looks better than the X display manager xdm and provides more options. To start it at boot time simply change your ttyv8 line in /etc/ttys to ttyv8 “/usr/pkg/bin/kdm -nodaemon” xterm on secure .
f31b07b2 152### Xfce4
d0f4eeeb 153Xfce is a lightweight desktop environment using the GTK+ toolkit (like GNOME) it has less applications than KDE but if your computer isn't that good it's the better choice.
154To install Xfce4 simply install the xfce4 and xfce4- meta-packages as root
f2fa9e29 155
156 # pkg_radd xfce4 && pkg_radd xfce4-extras
d0f4eeeb 157or if you want to compile them yourself
f2fa9e29 158
159 # cd /usr/pkgsrc/meta-pkgs/xfce4 && bmake install clean
160 # cd /usr/pkgsrc/meta-pkgs/xfce4-extras && bmake install clean
d0f4eeeb 162To test if it works edit your ~/.xinitrc as user, comment the exec xterm part out and add exec startxfce4.
163Since Xfce doesnt have its own display manager for a graphical login so you have to install one yourself. You could either install xdm, kdm or gdm. Gdm is the GNOME display manager and also uses the GTK+ toolkit so it's a good choice for Xfce, too.
0fc2b4c0 164Install gdm by executing
f2fa9e29 165
166 # pkg_radd gdm
d0f4eeeb 168or
f2fa9e29 169
170 # cd /usr/pkgsrc/x11/gdm && bmake install
d0f4eeeb 172To start it at boot time you can simply add gdm_enable=”YES” to your /etc/rc.conf
0fc2b4c0 173
174# How to continue?
175Now after you installed the basic desktop you may wish to add additional applications such as a browser like firefox:
177 # pkg_radd firefox
179You are fully free what to do now and pkgsrc offers a lot of desktop packages you could install. Have fun with your desktop!