Difference between pages "Zero Configuration Networking" and "GNOME First Steps"

(Difference between pages)
(Link-local Addresses)
 
 
Line 1: Line 1:
Zero Configuration Networking, also called Zeroconf or [[wikipedia:Bonjour_(software)|Bonjour]]  ([http://developer.apple.com/softwarelicensing/agreements/bonjour.html Apple's trademark] for their Zero Configuration Networking implementation) is a suite of related technologies that allow networked devices to interoperate on a local network without requiring explicit configuration.
+
== What is GNOME? ==
 +
"GNOME 3 is an easy and elegant way to use your computer. It is designed to put you in control and bring freedom to everybody. GNOME 3 is developed by the GNOME community, a diverse, international group of contributors that is supported by an independent, non-profit foundation." [http://gnome.org GNOME]
  
== Requirements ==
+
== Prerequisites ==
  
Zero Configuration Networking requires the following things to operate:
+
Before installing GNOME, ensure that the [[X Window System]] has been installed.
  
* A valid IP address, obtained either by:
+
{{fancywarning|1=
** Static assignment
+
Please note that Linux kernel 3.13.* has some serious incompatibility with various graphics drivers. If you like to use <tt>gentoo-sources</tt> or <tt>vanilla-sources</tt>, please use a 3.12.* kernel. This is of particular importance if you plan to run GNOME, and want to use NVIDIA (commercial or nouveau) or ATI (ati-drivers) graphics drivers.}}
** DHCP
+
** Link-local Addressing (part of Zero Configuration Networking)
+
* A means to address other devices by name, provided either by:
+
** DNS
+
** multicast DNS (mDNS -- part of Zero Configuration Networking)
+
  
== Service Discovery ==
+
== Preparing to emerge ==
  
On top of this, Zero Configuration Networking also provides a means to discover what services are available on each device. This is something that is provided exclusively by Zero Configuration Networking and is called Zeroconf Service Discovery.
+
To get your system ready to emerge gnome, it is recommended that you first set the gnome profile mix-in. To accomplish this, do the following:
 
+
== Configuration ==
+
 
+
In order to get these sort of networking services running, some configuration needs to happen initially.
+
 
+
== Link-local Addresses ==
+
 
+
{{Fancynote|It's only necessary to use link-local addressing if you have no other means of obtaining a valid IP address on your LAN. Typically, this is the case if you are setting up a small or ad-hoc network where no DHCP server has been configured.}}
+
 
+
To use link-local addressing, first set up the proper routes:
+
 
<console>
 
<console>
###i## route add default dev eth0 metric 99
+
##r### ##b## eselect profile list
###i## route add -net 169.254.0.0 netmask 255.255.0.0 dev eth0 metric 99
+
##g##Currently available mix-ins profiles: 
 +
  [11]  funtoo/1.0/linux-gnu/mix-ins/audio 
 +
  [12]  funtoo/1.0/linux-gnu/mix-ins/console-extras 
 +
  [13]  funtoo/1.0/linux-gnu/mix-ins/dvd 
 +
  [14]  funtoo/1.0/linux-gnu/mix-ins/gnome 
 +
  [15]  funtoo/1.0/linux-gnu/mix-ins/kde 
 +
  [16]  funtoo/1.0/linux-gnu/mix-ins/mate 
 +
  [17]  funtoo/1.0/linux-gnu/mix-ins/media 
 +
  [18]  funtoo/1.0/linux-gnu/mix-ins/print 
 +
  [19]  funtoo/1.0/linux-gnu/mix-ins/python3-only
 +
  [20]  funtoo/1.0/linux-gnu/mix-ins/rhel5-compat
 +
  [21]  funtoo/1.0/linux-gnu/mix-ins/server-db 
 +
  [22]  funtoo/1.0/linux-gnu/mix-ins/server-mail
 +
  [23]  funtoo/1.0/linux-gnu/mix-ins/server-web
 +
  [24]  funtoo/1.0/linux-gnu/mix-ins/X
 +
  [25]  funtoo/1.0/linux-gnu/mix-ins/xfce
 +
  [26]  funtoo/1.0/linux-gnu/mix-ins/vmware-guest
 +
  [27]  funtoo/1.0/linux-gnu/mix-ins/hardened
 
</console>
 
</console>
 
+
After seeing a list of available profiles, we want to add in the appropriate number for the gnome mix-in. To do this, run the following:
Then, use <tt>avahi-autoipd</tt> to discover a valid link-local IP address:
+
 
<console>
 
<console>
###i## /usr/sbin/avahi-autoipd --daemonize --syslog --wait eth0
+
##r### ##b##eselect profile add 14
 
</console>
 
</console>
  
Once a valid link-local IP address is found, eth0 will now have a <tt>169.254.x.x</tt> address that can be used to communicate on the local LAN.
+
By enabling the gnome mix-in, various USE and other settings will be optimized to provide you with a pain-free GNOME installation experience.
  
As an alternative, you can have dhcpcd built with <code>USE="zeroconf"</code>, and it will provide a link local address if no DHCP server is found.
+
== Emerging ==
 +
You are provided with two packages that will pull in this desktop environment:
 +
* ''gnome'' -- This is the "whole shabang" - pulls in a range of applications made for the gnome desktop environment including a few games, an archive manager, a system monitor, a web browser, a terminal, etc.
 +
* ''gnome-light''
  
== Multicast DNS ==
+
To emerge ''gnome-light'' run the following command
 
+
Multicast DNS, or mDNS, is a means by which individual machines can broadcast their DNS information to machines on the local LAN so that a DNS server is not required to address local devices by name. The ".local" domain is typically used for multicast DNS, so your laptop might be addressable by pinging "mylaptop.local", for example. mDNS is not necessary if you have some other means of addressing machines by name, such as unicast (regular) DNS. But many LANs do not have their own DNS server configured, in which case mDNS can be very handy.
+
 
+
=== .local Hostname Suffix ===
+
 
+
If you want to configure your Funtoo Linux system to be addressable on your LAN using a <tt>myhostname.local</tt> address, first ensure that you set your system's hostname in <tt>/etc/conf.d/hostname</tt>, and use ''only'' the non-qualified name, so don't add a <tt>.local</tt> yourself. Multicast DNS will automatically use that suffix. Here is a sample <tt>/etc/conf.d/hostname</tt> for a machine on my network that I can ping from other machines as <tt>antec.local</tt>:
+
 
+
{{File
+
|/etc/conf.d/hostname|<pre>
+
hostname="antec"
+
</pre>}}
+
 
+
== Receiving mDNS ==
+
 
+
The ebuild "nss-mdns" provides the necessary functionality for your Funtoo/Gentoo Linux machine to receive mDNS broadcasts, so that it can do things like ping mybox.local, or ssh mylaptop.local.
+
 
+
From the [http://0pointer.de/lennart/projects/nss-mdns/#overview nss-mdns] home page:
+
 
+
''nss-mdns is a plugin for the GNU Name Service Switch (NSS) functionality of the GNU C Library (glibc) providing host name resolution via Multicast DNS (aka Zeroconf, aka Apple Rendezvous, aka Apple Bonjour), effectively allowing name resolution by common Unix/Linux programs in the ad-hoc mDNS domain .local.
+
 
+
''nss-mdns provides client functionality only, which means that you have to run a mDNS responder daemon seperately from nss-mdns if you want to register the local host name via mDNS. I recommend Avahi.
+
 
+
''nss-mdns is very lightweight (9 KByte stripped binary .so compiled with -DNDEBUG=1 -Os on i386, gcc 4.0), has no dependencies besides the glibc and requires only minimal configuration.
+
 
+
''By default nss-mdns tries to contact a running avahi-daemon for resolving host names and addresses and making use of its superior record cacheing. Optionally nss-mdns can be compiled with a mini mDNS stack that can be used to resolve host names without a local Avahi installation. Both Avahi support and this mini mDNS stack are optional, however at least one of them needs to be enabled. If both are enabled a connection to Avahi is tried first, and if that fails the mini mDNS stack is used.
+
 
<console>
 
<console>
###i## emerge -av nss-mdns
+
# ##i## emerge --ask gnome-light
 
</console>
 
</console>
  
Set up multicast route:
+
To emerge ''gnome'' run the following command
 
<console>
 
<console>
###i## route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0
+
# ##i## emerge --ask gnome
 
</console>
 
</console>
  
Note: Adding <code>multicast="yes"</code> in <code>/etc/conf.d/netif.foo</code> (replace foo with your actual network interface name) will set up the multicast route automatically at startup.
+
== Initial Startup ==
  
Now, it's necessary to modify <tt>/etc/nsswitch.conf</tt> so that your system will use multicast DNS for hostname lookup. In the example, we use the <tt>mdns_minimal</tt> and <tt>mdns</tt> words, which enable multicast DNS for IPv4 and IPv6. If you only want to enable IPv4-based multicast DNS, which is recommended for IPv4-only networks, use <tt>mdns4_minimal</tt> and <tt>mdns4</tt> instead. This will improve hostname lookup performance.
+
Typically, you will want to use <tt>gdm</tt>, the GNOME display manager, to log in to GNOME. This will allow you to log in graphically, rather than using the text console.
{{File
+
|/etc/nsswitch.conf|<pre>
+
hosts:      files mdns_minimal [NOTFOUND=return] dns mdns
+
</pre>}}
+
  
== Sending Multicast DNS ==
+
To enable gdm, edit <tt>/etc/conf.d/xdm</tt> and set <tt>DISPLAYMANAGER</tt> to <tt>gdm</tt> instead of <tt>xdm</tt>. Then, perform the following steps to add <tt>xdm</tt> to the default runlevel, and have it start automatically from now on when your system starts:
 
+
Avahi-daemon handles the task of '''sending''' multicast DNS broadcasts, as well as service discovery broadcasts, on your local LAN. If you want other devices to be able to reach your Funtoo/Gentoo Linux machine via multicast DNS, and Zeroconf Service Discovery, you'll want to enable avahi-daemon. This will also improve the efficiency of performing multicast DNS lookups locally.
+
  
 
<console>
 
<console>
###i## rc-update add avahi-daemon default
+
# ##i##rc-update add xdm default
###i## rc
+
# ##i##rc
 
</console>
 
</console>
  
Test:
+
== Automatically Starting Applications at Login ==
<console>
+
###i## ping daniel-pc.local
+
PING daniel-pc.local (10.0.1.11) 56(84) bytes of data.
+
64 bytes from Daniel-PC.local (10.0.1.11): icmp_req=1 ttl=128 time=3.73 ms
+
64 bytes from Daniel-PC.local (10.0.1.11): icmp_req=2 ttl=128 time=0.905 ms
+
64 bytes from Daniel-PC.local (10.0.1.11): icmp_req=3 ttl=128 time=0.922 ms
+
64 bytes from Daniel-PC.local (10.0.1.11): icmp_req=4 ttl=128 time=0.827 ms
+
</console>
+
  
== Service Discovery ==
+
When using an old-fashioned <tt>.xinitrc</tt>, starting up applications when X starts is relatively easy. When using GDM, this can still be accomplished, by using the <tt>~/.xprofile</tt> file. Here's my sample <tt>.xprofile</tt> to start <tt>xflux</tt> to dim the screen at night:
  
Get a list of services on the LAN:
+
<pre>
<console>
+
xflux -z 87107
###i## avahi-browse -ac
+
</pre>
</console>
+
  
== Resources ==
+
Remember to add a <tt>&</tt> at the end of any command that doesn't return to the shell prompt after running.
  
* [http://developer.apple.com/library/mac/#qa/qa2004/qa1357.html Apple Technical Q&A QA1357]
 
* [http://en.gentoo-wiki.com/wiki/Avahi Gentoo Wiki Avahi]
 
* [http://www.ibiblio.org/pub/linux/docs/HOWTO/other-formats/html_single/Multicast-HOWTO.html#toc2 Multicast over TCP/IP HOWTO]
 
* [http://sitka.triumf.ca/pub/linux/multicast-FAQ Linux Multicast FAQ]
 
* [http://www.multicastdns.org/ multicastdns.org]
 
  
+
[[Category:Desktop Environments]]
[[Category:HOWTO]]
+
[[Category:First Steps]]
[[Category:Networking]]
+
[[Category:Official Documentation]]

Revision as of 00:20, March 13, 2014

What is GNOME?

"GNOME 3 is an easy and elegant way to use your computer. It is designed to put you in control and bring freedom to everybody. GNOME 3 is developed by the GNOME community, a diverse, international group of contributors that is supported by an independent, non-profit foundation." GNOME

Prerequisites

Before installing GNOME, ensure that the X Window System has been installed.

Warning

Please note that Linux kernel 3.13.* has some serious incompatibility with various graphics drivers. If you like to use gentoo-sources or vanilla-sources, please use a 3.12.* kernel. This is of particular importance if you plan to run GNOME, and want to use NVIDIA (commercial or nouveau) or ATI (ati-drivers) graphics drivers.

Preparing to emerge

To get your system ready to emerge gnome, it is recommended that you first set the gnome profile mix-in. To accomplish this, do the following:

#  eselect profile list
Currently available mix-ins profiles:  
  [11]  funtoo/1.0/linux-gnu/mix-ins/audio  
  [12]  funtoo/1.0/linux-gnu/mix-ins/console-extras  
  [13]  funtoo/1.0/linux-gnu/mix-ins/dvd  
  [14]  funtoo/1.0/linux-gnu/mix-ins/gnome  
  [15]  funtoo/1.0/linux-gnu/mix-ins/kde  
  [16]  funtoo/1.0/linux-gnu/mix-ins/mate  
  [17]  funtoo/1.0/linux-gnu/mix-ins/media  
  [18]  funtoo/1.0/linux-gnu/mix-ins/print  
  [19]  funtoo/1.0/linux-gnu/mix-ins/python3-only 
  [20]  funtoo/1.0/linux-gnu/mix-ins/rhel5-compat 
  [21]  funtoo/1.0/linux-gnu/mix-ins/server-db  
  [22]  funtoo/1.0/linux-gnu/mix-ins/server-mail 
  [23]  funtoo/1.0/linux-gnu/mix-ins/server-web
  [24]  funtoo/1.0/linux-gnu/mix-ins/X 
  [25]  funtoo/1.0/linux-gnu/mix-ins/xfce 
  [26]  funtoo/1.0/linux-gnu/mix-ins/vmware-guest 
  [27]  funtoo/1.0/linux-gnu/mix-ins/hardened

After seeing a list of available profiles, we want to add in the appropriate number for the gnome mix-in. To do this, run the following:

# eselect profile add 14

By enabling the gnome mix-in, various USE and other settings will be optimized to provide you with a pain-free GNOME installation experience.

Emerging

You are provided with two packages that will pull in this desktop environment:

  • gnome -- This is the "whole shabang" - pulls in a range of applications made for the gnome desktop environment including a few games, an archive manager, a system monitor, a web browser, a terminal, etc.
  • gnome-light

To emerge gnome-light run the following command

#  emerge --ask gnome-light

To emerge gnome run the following command

#  emerge --ask gnome

Initial Startup

Typically, you will want to use gdm, the GNOME display manager, to log in to GNOME. This will allow you to log in graphically, rather than using the text console.

To enable gdm, edit /etc/conf.d/xdm and set DISPLAYMANAGER to gdm instead of xdm. Then, perform the following steps to add xdm to the default runlevel, and have it start automatically from now on when your system starts:

# rc-update add xdm default
# rc

Automatically Starting Applications at Login

When using an old-fashioned .xinitrc, starting up applications when X starts is relatively easy. When using GDM, this can still be accomplished, by using the ~/.xprofile file. Here's my sample .xprofile to start xflux to dim the screen at night:

xflux -z 87107

Remember to add a & at the end of any command that doesn't return to the shell prompt after running.