Originally Posted by narin1975
why the graphical components can add security risk to the system?
There's a few ways to approach such a question:
0. The first would be to look for the reason
one would want a graphical server in the first place. Often this stems from a lack of basic Linux knowledge (let's leave out the sheer lazy, the criminally irresponsible and those who actually know what they're doing). Basic familiarity (sure some tasks may require a GUI) with "doing things the Linux way" gained by reading and practicing alleviates the need for a GUI in the first place.
1. Secondly one of the basic rules tells you to only install what software you need right now
. Practically speaking this minimizes time spent on maintenance (having to configure users and software, check for security fixes, etc, etc.) and it minimizes exposure. Simply put if the network port isn't accessible it can't be accessed, if the process isn't running it can not be subverted and if the software isn't installed then no user can fsck it up
2. The third one is to look at the effect of having and running a graphical server. In its simplest incarnation the "graphical interface components" you talk of require an Xserver, its extensions, low level functionality, graphical and other libraries and drivers, a font server, a Window Manager (WM) and X-capable utilities. If you perform a standard installation of a mainstream Linux distribution you get on top of that a complete Desktop Environment (DE) including a graphical Display Manager (DM), File Manager (FM), multi-media and other utilities plus their supporting binaries and libraries. Apart from the expanded footprint such an installation offers, running the Xserver itself poses problems in the way its drivers (ab)use memory and manipulates devices ('man ioctl') to get things to work, a DM may listen to the network for connections, a WM or FM may come with "features" that can be abused (say autorun settings). And that's just the tip of the iceberg.