Difference between pages "Set Up Chrony For Accurate System Time" and "X Window System"

(Difference between pages)
 
(Created page with "=== 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 t...")
 
Line 1: Line 1:
=== Accurate System Time (NTP) ===
+
=== X.Org ===
  
It's important that your Funtoo Linux system has an accurate clock. NTP (network time protocol) can ensure your clock is accurate at all time.
+
In order to use a graphical environment it's necessary to install X.Org, which is an implementation of the X Window system.  
  
The recommended NTP client/server is '''{{Package|net-misc/chrony}}'''.
+
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.
  
 +
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>.
 
<console>
 
<console>
###i## emerge chrony
+
# ##i##nano -w /etc/portage/make.conf
###i## rc-update add chronyd default
+
...
 +
VIDEO_CARDS="intel"
 
</console>
 
</console>
  
Use something like the following for your <code>/etc/chrony/chrony.conf</code>:
+
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.
  
<pre>
+
Next comes the actual installation:
server time.apple.com
+
<console>
maxupdateskew 100
+
# ##i##emerge xorg-x11
driftfile /etc/chrony/chrony.drift
+
</console>
keyfile /etc/chrony/chrony.keys
+
commandkey 1
+
dumponexit
+
dumpdir /var/log/chrony
+
initstepslew 10 time.apple.com
+
logdir /var/log/chrony
+
log measurements statistics tracking
+
logchange 0.5
+
mailonchange me@emailprovider.com 0.5
+
rtcfile /etc/chrony/chrony.rtc
+
rtconutc
+
sched_priority 1
+
lock_all
+
</pre>
+
  
Chronyd can then be started immediately by running <code>rc</code> to start all new services:
+
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.
  
 +
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:
 
<console>
 
<console>
###i## rc
+
# ##i##USE="-minimal" emerge -1 xinit
 
</console>
 
</console>
  
Because Funtoo Linux starts network daemons without waiting for an Internet connection to become available, and because chrony will attempt to synchronize the clock over the Internet when it first starts, you must manually configure chronyd to be dependent on whatever method you use to enable your outbound network connectivity. For example, if using <code>dhcpcd</code>, add the following to <code>/etc/conf.d/chronyd</code>:
+
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.
  
<pre>
+
If you want the package installed permanently you will need to add a line to <tt>package.use</tt>:
rc_need=dhcpcd
+
<console>
</pre>
+
# ##i##mkdir -p /etc/portage
 +
# ##i##echo x11-apps/xinit -minimal >> /etc/portage/package.use
 +
</console>
 +
 
 +
Next we reinstall <tt>x11-apps/xinit</tt>:
 +
<console>
 +
# ##i##emerge -1N xinit
 +
</console>
 +
 
 +
Once that's done, we're able to finally test X.Org:
 +
 
 +
<console>
 +
# ##i##startx
 +
</console>
  
You should notice a marked improvement in your system clock's accuracy. If your system time was off by a significant amount, <code>chronyd</code> will gradually correct your clock while the system runs.
+
If everything is well, a simple GUI along with an analog clock and a terminal will appear.
  
[[Category:System]]
+
[[Category:First Steps]]
[[Category:Official Documentation]]
+

Revision as of 05:27, November 22, 2013

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.

# 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:

# 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:

# 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:

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

Next we reinstall x11-apps/xinit:

# emerge -1N xinit

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

# startx

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