Difference between revisions of "X Window System"

From Funtoo
Jump to navigation Jump to search
 
(Undo revision 6257 by Gpohle (talk) moving to more appropriate place, Video, tt 2 code, link to make.conf)
Line 3: Line 3:
In order to use a graphical environment it's necessary to install X.Org, which is an implementation of the X Window system.  
In order to use a graphical environment it's necessary to install X.Org, which is an implementation of the X Window system.  


Before we start it's a good idea to make sure that your system is configured correctly. If you've installed your kernel using the <tt>binary</tt> USE flag, chances are that your video card is already supported.
Before we start it's a good idea to make sure that your system is configured correctly. If you've installed your kernel using the <code>binary</code> USE flag, chances are that your video card is already supported.


In order for Portage to know which video card(s) you want to support, you'll need to add a line to your <tt>make.conf</tt>.
In order for Portage to know which [[Video | video]] card(s) you want to support, you'll need to add a line to your <code>[[make.conf | make.conf]]</code>.
<console>
<console>
# ##i##nano -w /etc/portage/make.conf
# ##i##nano -w /etc/portage/make.conf
Line 12: Line 12:
</console>
</console>


In the example above we're using Intel integrated graphics drivers. Examples of valid entries include <tt>radeon</tt> for AMD Radeon cards, and <tt>nouveau</tt> or <tt>nvidia</tt> for NVIDIA cards. If you haven't yet switched to the <tt>desktop</tt> profile it's a good idea to do it now.
In the example above we're using Intel integrated graphics drivers. Examples of valid entries include <code>radeon</code> for AMD Radeon cards, and <code>nouveau</code> or <code>nvidia</code> for NVIDIA cards. If you haven't yet switched to the <code>desktop</code> profile it's a good idea to do it now.


Next comes the actual installation:
Next comes the actual installation:
Line 19: Line 19:
</console>
</console>


Now we need to test to make sure X.Org is working properly. To test it we will install twm, a simple window manager which has traditionally served as the standard window manager for X.Org. In Funtoo Linux it is included in the core X.Org meta-package <tt>x11-apps/xinit</tt>, but is not installed by default.
Now we need to test to make sure X.Org is working properly. To test it we will install twm, a simple window manager which has traditionally served as the standard window manager for X.Org. In Funtoo Linux it is included in the core X.Org meta-package <code>x11-apps/xinit</code>, but is not installed by default.


It is possible to install twm directly by merging <tt>x11-wm/twm</tt> but for the sake of this tutorial we will install the meta-package, which includes a few extra utilities which may come in handy. There are two ways to do this depending on whether you want it to be installed temporarily or permanently. If you just want it to test X.Org use the following command:
It is possible to install twm directly by merging <code>x11-wm/twm</code> but for the sake of this tutorial we will install the meta-package, which includes a few extra utilities which may come in handy. There are two ways to do this depending on whether you want it to be installed temporarily or permanently. If you just want it to test X.Org use the following command:
<console>
<console>
# ##i##USE="-minimal" emerge -1 xinit
# ##i##USE="-minimal" emerge -1 xinit
</console>
</console>


The <tt>minimal</tt> USE flag is used in some ebuilds to install the bare minimum needed to get a working system. By passing <tt>USE="-minimal"</tt> to the command line before <tt>emerge</tt>, we are telling Portage to disable the flag and install the complete package. The <tt>-1</tt> (<tt>--oneshot</tt>) following <tt>emerge</tt> tells Portage not to add the package to [[#Updating your system|<tt>world</tt>]]. This is useful when installing packages which are automatically pulled in as dependencies by other packages.
The <code>minimal</code> USE flag is used in some ebuilds to install the bare minimum needed to get a working system. By passing <code>USE="-minimal"</code> to the command line before <code>emerge</code>, we are telling Portage to disable the flag and install the complete package. The <code>-1</code> (<code>--oneshot</code>) following <code>emerge</code> tells Portage not to add the package to [[#Updating your system|<code>world</code>]]. This is useful when installing packages which are automatically pulled in as dependencies by other packages.


If you want the package installed permanently you will need to add a line to <tt>package.use</tt>:  
If you want the package installed permanently you will need to add a line to <code>package.use</code>:  
<console>
<console>
# ##i##mkdir -p /etc/portage
# ##i##mkdir -p /etc/portage
Line 34: Line 34:
</console>
</console>


Next we reinstall <tt>x11-apps/xinit</tt>:
Next we reinstall <code>x11-apps/xinit</code>:
<console>
<console>
# ##i##emerge -1N xinit
# ##i##emerge -1N xinit
Line 46: Line 46:


If everything is well, a simple GUI along with an analog clock and a terminal will appear.
If everything is well, a simple GUI along with an analog clock and a terminal will appear.
{{note|If you are on an notebook with hybrid graphics, you may get an "no screens found" error message instead}}
If this is the case you may try the following (tested on a notebook with AMD and Intel graphic chips):
<console>
# ##i##nano -w /etc/portage/make.conf
...
VIDEO_CARDS="fglrx intel"
</console>
Thereafter do
<console>
# ##i##emerge -auDN @world
</console>
to update your system so the changes take effect.
<console>
# ##i##aticonfig --initial --input=/etc/X11/xorg.conf
</console>
Set the OpenGL driver to use fglrx:
<console>
# ##i##eselect opengl set ati
</console>
Once that's done, test X.Org again:
<console>
# ##i##startx
</console>


[[Category:First Steps]]
[[Category:First Steps]]

Revision as of 22:21, October 14, 2014

X.Org

In order to use a graphical environment it's necessary to install X.Org, which is an implementation of the X Window system.

Before we start it's a good idea to make sure that your system is configured correctly. If you've installed your kernel using the binary USE flag, chances are that your video card is already supported.

In order for Portage to know which video card(s) you want to support, you'll need to add a line to your make.conf.

root # nano -w /etc/portage/make.conf
...
VIDEO_CARDS="intel"

In the example above we're using Intel integrated graphics drivers. Examples of valid entries include radeon for AMD Radeon cards, and nouveau or nvidia for NVIDIA cards. If you haven't yet switched to the desktop profile it's a good idea to do it now.

Next comes the actual installation:

root # emerge xorg-x11

Now we need to test to make sure X.Org is working properly. To test it we will install twm, a simple window manager which has traditionally served as the standard window manager for X.Org. In Funtoo Linux it is included in the core X.Org meta-package x11-apps/xinit, but is not installed by default.

It is possible to install twm directly by merging x11-wm/twm but for the sake of this tutorial we will install the meta-package, which includes a few extra utilities which may come in handy. There are two ways to do this depending on whether you want it to be installed temporarily or permanently. If you just want it to test X.Org use the following command:

root # USE="-minimal" emerge -1 xinit

The minimal USE flag is used in some ebuilds to install the bare minimum needed to get a working system. By passing USE="-minimal" to the command line before emerge, we are telling Portage to disable the flag and install the complete package. The -1 (--oneshot) following emerge tells Portage not to add the package to world. This is useful when installing packages which are automatically pulled in as dependencies by other packages.

If you want the package installed permanently you will need to add a line to package.use:

root # mkdir -p /etc/portage
root # echo x11-apps/xinit -minimal >> /etc/portage/package.use

Next we reinstall x11-apps/xinit:

root # emerge -1N xinit

Once that's done, we're able to finally test X.Org:

root # startx

If everything is well, a simple GUI along with an analog clock and a terminal will appear.