make corrections to xfce install and simplify
[ikiwiki.git] / docs / how_to_get_to_the_desktop / index.mdwn
1 # How to get a desktop on DragonFly
2
3 **This topic is wildly out of date for example the command pkg_radd is no longer used, and the pkg install command is used instead. **
4  
5  It is also mostly redundant as it covers the same ground as the "installing and configuring X" topic [in the new handbook, which is located here](/docs/newhandbook/X).  
6
7 [[!toc levels=3 ]]
8
9 ##Using the recommended package tools, pkg or dports
10
11 to install xorg
12
13 the quickest and most simple way is
14
15     #pkg install xorg
16
17 or if you have dports installed and wish to build from src
18
19     #cd /usr/dports/x11/xorg && make install clean
20
21 for most hardware, typing startx at the cmd line should start X
22
23 if there is a failure, review section 5.4 of the FreeBSD handbook or section 9 of the NetBSD handbook
24
25 unless you need or want to use NetBSD's pkgsrc, skip everything directly below (after installing xorg) and go to "Installing a Desktop Environment"
26
27 ## Dealing with pkgsrc 
28
29 ### Installing pkgsrc
30 The 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.
31
32 First choose a mirror next to you which provides a git repo containing the pkgsrc tree, you can find them on the [DragonFly mirrors page](http://www.dragonflybsd.org/mirrors/). Next copy the mirrors adress into the Makefile contained in /usr.
33
34 Now execute as root
35
36     # cd /usr && make pkgsrc-create
37
38 to initally create the pkgsrc tree.
39
40 ### Searching a package
41 Since 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
42
43     # pkg_search ruby
44
45 and 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
46
47     # pkg_search -v ruby-1.9.2pl0
48
49 and you will get the path leading to the package.
50
51 ### Installing a package
52 You 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.
53 If you want to install binaries you only have to use the pkg_radd application. For example to install the xfce4 package just do:
54
55     # pkg_radd xfce4
56
57 If 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:
58
59     # cd /usr/pkgsrc/security/openssh && bmake install clean
60
61 If you build a package by source you can also change some build options if supported by the package.
62
63     # cd /usr/pkgsrc/security/openssh && bmake show-options
64
65 You will get a list of supported options. To change them install the package by:
66
67     # bmake PKG_OPTIONS.<package_name>="-option1 option2" install clean
68
69
70 ### Removing a package
71 If you don't need a package anymore and you want to remove it just change into the packages directory and do:
72
73     # bmake deinstall
74
75
76 ### Updating packages
77 From 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:
78
79     # cd /usr && make pkgsrc-update
80     # pkg_rolling-replace -u
81
82 ## The X Window System
83 ### Installing the Server
84 The installation of the X Window System contains a few steps. We will start with the most basic one: Installing the X-Server.
85 To do so you have to execute as root
86
87     # cd /usr/pkgsrc/x11/modular-xorg-server && bmake install clean
88
89 or if you want to install it as a binary
90
91     # pkg_radd modular-xorg-server
92
93 ### Installing appropriate drivers
94 You now need some input drivers and a video driver for your video card.
95 If you want to install all input and video drivers so you can test them out install the modular-xorg-drivers package
96
97     # cd /usr/pkgsrc/meta-pkgs/modular-xorg-drivers && bmake install clean
98
99 or if you want to install them as binaries
100
101     # pkg_radd modular-xorg-drivers
102
103 If 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>
104
105 ### Other importan X related packages
106 Now we will install other important packages for X. We will need some additional libraries
107
108     # cd /usr/pkgsrc/meta-pkgs/modular-xorg-libs && bmake install clean
109
110 or if you want to install them as binaries
111
112     # pkg_radd modular-xorg-libs
113
114 Next we'll need some fonts
115
116     # cd /usr/pkgsrc/meta-pkgs/modular-xorg-fonts && bmake install clean
117
118 or if you want to install them as binaries
119
120     # pkg_radd modular-xorg-fonts
121
122 Last package we need contains some useful applications like xterm and startx
123
124     # cd /usr/pkgsrc/meta-pkgs/modular-xorg-apps && bmake install clean
125
126 or if you want to install them as binaries
127
128     # pkg_radd modular-xorg-apps
129
130 ### Configuring X
131 Since we have installed all necessary packages now we have to configure X so it works like we want it. First execute as root
132
133     # Xorg -configure
134     # cp /root/xorg.conf.new /etc/X11/xorg.conf
135
136 Now we have a basic configuration file for X.
137 As normal user now create a file named ~/.xinitrc and write exec xterm in it. Now make it executable
138
139     # chmod +x ~/.xinitrc
140
141 Now you can try to start the X server by doing
142
143     # startx
144
145 as normal user.
146 If 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 X.org documentation and the DragonFly handbook, where you may find a solution to your problem.
147
148 # Packages
149
150 ## Installing a Desktop Environment
151
152 This part will explain how to install the desktop environments Lumina,Mate, KDE and Xfce, if you prefer GNOME or a standalone windowmanager you have to read other guides or documentation.
153
154 ### Lumina
155 To install Lumina desktop 
156
157     # pkg install lumina 
158   (this will also install xorg if not already installed)  
159
160 To start 
161     $ start-lumina-desktop
162
163 from cmd line
164 or in users home dir
165
166     $ echo "/usr/local/bin/start-lumina-desktop" > .xinitrc
167
168 exec start-lumina-desktop in .xinitrc will also work
169
170 or to start xdm
171
172     # pkg install xdm
173     $ echo "/usr/local/bin/start-lumina-desktop" > .xsession
174
175 and in /etc/ttys
176 change off to on in line
177
178 ttyv8 " /usr/local.bin/xdm -nodaemon" xterm on secure
179
180 (note: putting xdm_enable="YES"  in /etc/rc.conf does not start xdm, the above does)
181
182 ###LXDE
183
184     #pkg install lxde-meta
185
186 add to /etc/rc.conf
187
188 dbus_enable="YES"
189
190 hald_enable="YES"
191
192 To start from command line with startx, add to ~/.xinitrc 
193
194 exec startlxde
195
196 ###Window Maker ( window manager ) 
197
198      #pkg install windowmaker
199
200 to start from command line with startx, add to ~/.xinitrc
201
202 exec wmaker
203
204 ### Mate
205 To install Mate simply install the mate meta-packages as root
206
207     # pkg install mate
208
209 Edit /etc/rc.conf
210
211     dbus_enable="YES"
212     hald_enable="YES"
213
214 Edit in home user .xinitrc
215
216      exec mate-session
217
218 or to start xdm
219
220     # pkg install xdm
221     $ echo "exec mate-session" > .xsession
222
223 ### KDE
224
225 KDE 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.
226 Since the KDE and QT packages are pretty huge you can save much time when using binary packages.
227 There 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.
228
229 For KDE3 simply do as root
230
231     # pkg install kde3
232
233 For KDE4
234
235     # pkg install kde4
236
237 Now that you have installed KDE we still need to start it.
238 As user edit your ~/.xinitrc and comment the exec xterm part out and add exec startkde.
239 Now 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.
240
241 Some 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 .
242
243 ### Xfce4
244
245     # pkg install xfce
246
247 To start from command line with startx, add to ~/.xinitrc 
248
249 exec startxfce4
250
251 or simply enter 
252
253     $startxfce4
254
255 # How to continue?
256 Now after you installed the basic desktop you may wish to add additional applications such as a browser like firefox
257
258     # pkg install firefox 
259