Open up the terminal configuration file, /etc/ttys, in a text editor such as ee:
# ee /etc/ttys
Use the arrow keys to move down to the line beginning with ttyv8; press Enter to create a blank line below it, and add a new line enabling KDM, the KDE Display Manager:
ttyv6 "/usr/libexec/getty Pc" cons25 on secure
ttyv7 "/usr/libexec/getty Pc" cons25 on secure
ttyv8 "/usr/X11R6/bin/xdm -nodaemon" xterm off secure
ttyv9 "/usr/local/bin/kdm -nodaemon" xterm on secure
# Serial terminals
Then press Escape and press Enter, and then press Enter again to save your changes and exit. Finally, reboot your computer by typing shutdown -r now. When your computer reboots, instead of the text login prompt, you should see a graphical login screen

