Difference between pages "Xfce" and "Hostname"

(Difference between pages)
(remove manual addition of files, these automatically installed by sys-apps/accountservice, sys-apps/upower and sys-auth/consolekit respectively.)
 
(Hosts case)
 
Line 1: Line 1:
== About Xfce ==
+
w.i.p
 
+
==Introduction==
Xfce is a lightweight desktop environment for UNIX-like operating systems. It aims to be fast and low on system resources, while still being visually appealing and user friendly.
+
A hostname is a unique name created to identify a machine on a network. In computer networking, a hostname  is a label that is assigned to a device connected to a computer network and that is used to identify the device in various forms of electronic communication such as the World Wide Web, e-mail or Usenet. Hostnames may be simple names consisting of a single word or phrase, or they may be structured.
 
+
==Configuration==
Xfce embodies the traditional UNIX philosophy of modularity and re-usability. It consists of a number of components that provide the full functionality one can expect of a modern desktop environment. They are packaged separately and you can pick among the available packages to create the optimal personal working environment.
+
In Funtoo Linux <code>/etc/conf.d/hostname</code> is the only configuration file for setting a hostname. In OpenRC framework <code>/etc/conf.d/foo</code> is the configuration file for a corresponding Init script <code>/etc/init.d/foo</code>. With the case of hostname, default value in <code>/etc/conf.d/hostname</code> is set to ''localhost'', means when system boots and OpenRC's <code>/etc/init.d/hostname</code> script started a hostname getting only ''localhost'' name. How it looks?  In your shell promt this will look in following way, an example for root:
 
+
Another priority of Xfce is adhereance to standards, specifically those defined at [http://freedesktop.org/ freedesktop.org]. [http://www.xfce.org/about/ About XFCE]
+
 
+
== Installation ==
+
 
+
Before emerging Xfce you need to:
+
 
+
* Check that you have enabled the USE flags necessary for a XFCE desktop environment. [[Funtoo_Linux_First_Steps#Changing_profile|Set your profile to "xfce" via mix-ins]], as follows:
+
 
+
 
<console>
 
<console>
# ##i## eselect profile add funtoo/1.0/linux-gnu/mix-ins/xfce
+
localhost ~ # ##i## Hello :)
 
</console>
 
</console>
 
+
Let's play a bit with a configuration. Open <code>/etc/conf.d/hostname</code> with your favorite editor and set a hostname of your choice. Below, I will use a real examples  from one of my working test boxes.
* Verify that you have [[Funtoo_Linux_First_Steps#X.Org|X.Org Server]] configured properly.
+
 
+
We are now ready to install Xfce. Install the meta-package, which pulls in all of the components you need for a minimal Xfce installation:
+
 
+
 
<console>
 
<console>
# ##i##emerge xfce4-meta
+
localhost ~ # ##i## nano /etc/conf.d/hostname
 
</console>
 
</console>
 
+
Let's set it to hostname="oleg-stable.host.funtoo.org". Save the file and restart  a hostname service:
== Running Xfce ==
+
 
+
There are several different ways to start Xfce:
+
 
+
* Editing the <tt>.xinitrc</tt> file in your user's home directory and using <tt>startx</tt> from a text console.
+
* Using a display manager (e.g. SLiM, GDM, and KDM).
+
* Configuring your shell profile to automatically start Xfce upon a successful login.
+
 
+
=== .xinitrc ===
+
 
+
The most common way to start the environment is to configure <tt>~/.xinitrc</tt> to launch an Xfce session. The proper way to launch Xfce from the terminal is by using <tt>startxfce4</tt> combined with <tt>ck-launch-session</tt>.
+
 
+
 
<console>
 
<console>
$ ##i##echo "exec startxfce4 --with-ck-launch" > ~/.xinitrc
+
localhost ~ # ##i## service hostname restart
 
</console>
 
</console>
 
+
Now, let's examine our changes, after a restarting a hostname
Note that <tt>--with-ck-launch</tt> (from ConsoleKit) is required by Xfce for important tasks such as shutting down, suspending, and automatically mounting removable storage media. Some applications will not work properly without it. Therefore we need to add ConsoleKit to the <tt>default</tt> runlevel, executing the following command as root:
+
 
+
 
<console>
 
<console>
# ##i##rc-update add consolekit default
+
oleg-stable ~ # ##i## Hello :)
 
</console>
 
</console>
 
+
== Diving deeper==
Finally, to start the graphical environment, run <tt>startx</tt> from a login shell:
+
Notice, that in above output we seeing a shortened hostname and not a FQDN (Fully Qualified Domain Name). Don't be frustrated. This is  how  default bash promt <code>PS1</code> set. To get nice promts, please, consult http://www.ibm.com/developerworks/library/l-tip-prompt/ <-- this one should be on Funtoo wiki :)
 +
Another way to test our settings is using a '''hostname''' command. Here we will show only  some of it's features. Let's try to execute '''hostname''' command:
 
<console>
 
<console>
$ ##i##startx
+
oleg-stable ~ # ##i## hostname
 +
oleg-stable.host.funtoo.org
 
</console>
 
</console>
 
+
Now we see our fully qualified domain name hostname just how we configured it in <code>/etc/conf.d/hostname</code> in above paragraph. To get a short hostname we need to set '''-s ''' (short) argument to hostname command.  
== Display Manager ==
+
 
+
A display manager is a program that manages sessions and acts as a login screen. Here's a short list of a few of the display managers available in Funtoo:
+
 
+
* XDM (<tt>x11-apps/xdm</tt>): X.Org's standard display manager.
+
 
+
* LightDM (<tt>x11-misc/lightdm</tt>): A lightweight, but highly configurable display manager.
+
 
+
* SLiM (<tt>x11-misc/slim</tt>): Simple Login Manager -- a lightweight display manager. Not very configurable.
+
 
+
Any of these would make a fine choice. After you've chosen which display manager to use, install it:
+
 
+
 
<console>
 
<console>
# ##i##emerge lightdm
+
oleg-stable ~ # ##i## hostname -s
 +
oleg-stable
 
</console>
 
</console>
 
+
Good! Hostname offers more then just displaying a system host name but can also set one. Let's try:
All that's left to do now is to add the name of the display manager to <tt>/etc/conf.d/xdm</tt>, add the <tt>xdm</tt> service to the <tt>default</tt> runlevel, and start the service:
+
 
+
<pre>
+
DISPLAYMANAGER="lightdm"
+
</pre>
+
 
+
 
<console>
 
<console>
# ##i##rc-update add xdm default
+
oleg-stable ~ # ##i## hostname foo.bar.baz
# ##i##/etc/init.d/xdm start
+
oleg-stable ~ # ##i## hostname
 +
foo.bar.baz
 
</console>
 
</console>
 +
As you can see, we changed a hostname on-the-fly. This is not recommended way.
 +
{{fancywarning|Please, notice that using '''hostname''' command to configure will work temporary for a current session and will be reverted back to a value set in <code>/etc/conf.d/hostname</code> file with next system restart.}}
  
==Power Group==
+
Now that we got a brief description of a hostname and basic configuration steps its time to reflect another important case, which is directly related to a Funtoo Linux hostname generation, a hosts.
 
+
If you wish to be able to shutdown/reboot/suspend/hibernate using xfce4-logout-session then you will need to add yourself or the user to the power group by:
+
 
+
<console>
+
# ##i##gpasswd -a <username> power
+
</console>
+
 
+
If the group does not exist then execute the following and try again:
+
 
+
<console>
+
# ##i##groupadd power
+
</console>
+
 
+
== Plugins for Thunar and XFCE ==
+
There are a lot of plugins available for Thunar and XFCE. Here is a table that contains the name of the plugin and a description of what it does. To install one of the plugins, run
+
<console>###i## emerge [name of plugin]</console>
+
 
+
{| class="wikitable" style="margin: 1em auto;" width=80%
+
! width="30%" | Name
+
! width="70%" | Description
+
|-
+
| style="text-align: center;" | xfce-extra/thunar-volman
+
| style="text-align: center;" | Daemon that enforces volume-related policies
+
|-
+
| style="text-align: center;" | xfce-extra/thunar-vcs-plugin
+
| style="text-align: center;" | Adds Subversion and GIT actions to the context menu of thunar
+
|-
+
| style="text-align: center;" | xfce-extra/thunar-shares-plugin
+
| style="text-align: center;" | Thunar plugin to share files using Samba
+
|-
+
| style="text-align: center;" | xfce-extra/thunar-archive-plugin
+
| style="text-align: center;" | Archive plug-in for the Thunar filemanager
+
|-
+
| style="text-align: center;" | xfce-extra/xfce4-volumed
+
| style="text-align: center;" | Daemon to control volume up/down and mute keys
+
|-
+
| style="text-align: center;" | xfce-extra/xfce4-screenshooter
+
| style="text-align: center;" | Xfce4 screenshooter application and panel plugin
+
|-
+
| style="text-align: center;" |  xfce-extra/xfce4-notifyd
+
| style="text-align: center;" | Notification daemon for the Xfce desktop environment
+
|-
+
| style="text-align: center;" | xfce-extra/xfce4-mixer
+
| style="text-align: center;" | A volume control application (and panel plug-in) for the Xfce desktop environment
+
|-
+
| style="text-align: center;" | xfce-extra/xfce4-mount-plugin
+
| style="text-align: center;" | A mount plug-in for the Xfce panel
+
|-
+
| style="text-align: center;" | xfce-extra/xfce4-clipman-plugin
+
| style="text-align: center;" | A clipboard manager plug-in for the Xfce panel
+
|-
+
| style="text-align: center;" | xfce-extra/xfce4-battery-plugin
+
| style="text-align: center;" | A battery monitor panel plugin for the Xfce desktop environment
+
|}
+
  
[[Category:Desktop]]
+
==Hosts case==
[[Category:First Steps]]
+
As per man page <code>hosts</code> stands for static table lookup for hostnames and it's configuration file is <code>/etc/hosts</code>.
[[Category:Official Documentation]]
+

Revision as of 16:38, February 20, 2015

w.i.p

Introduction

A hostname is a unique name created to identify a machine on a network. In computer networking, a hostname is a label that is assigned to a device connected to a computer network and that is used to identify the device in various forms of electronic communication such as the World Wide Web, e-mail or Usenet. Hostnames may be simple names consisting of a single word or phrase, or they may be structured.

Configuration

In Funtoo Linux /etc/conf.d/hostname is the only configuration file for setting a hostname. In OpenRC framework /etc/conf.d/foo is the configuration file for a corresponding Init script /etc/init.d/foo. With the case of hostname, default value in /etc/conf.d/hostname is set to localhost, means when system boots and OpenRC's /etc/init.d/hostname script started a hostname getting only localhost name. How it looks? In your shell promt this will look in following way, an example for root:

localhost ~ #  Hello :)

Let's play a bit with a configuration. Open /etc/conf.d/hostname with your favorite editor and set a hostname of your choice. Below, I will use a real examples from one of my working test boxes.

localhost ~ #  nano /etc/conf.d/hostname

Let's set it to hostname="oleg-stable.host.funtoo.org". Save the file and restart a hostname service:

localhost ~ #  service hostname restart

Now, let's examine our changes, after a restarting a hostname

oleg-stable ~ #  Hello :)

Diving deeper

Notice, that in above output we seeing a shortened hostname and not a FQDN (Fully Qualified Domain Name). Don't be frustrated. This is how default bash promt PS1 set. To get nice promts, please, consult http://www.ibm.com/developerworks/library/l-tip-prompt/ <-- this one should be on Funtoo wiki :) Another way to test our settings is using a hostname command. Here we will show only some of it's features. Let's try to execute hostname command:

oleg-stable ~ #  hostname
oleg-stable.host.funtoo.org

Now we see our fully qualified domain name hostname just how we configured it in /etc/conf.d/hostname in above paragraph. To get a short hostname we need to set -s (short) argument to hostname command.

oleg-stable ~ #  hostname -s
oleg-stable

Good! Hostname offers more then just displaying a system host name but can also set one. Let's try:

oleg-stable ~ #  hostname foo.bar.baz
oleg-stable ~ #  hostname 
foo.bar.baz

As you can see, we changed a hostname on-the-fly. This is not recommended way.

Warning

Please, notice that using hostname command to configure will work temporary for a current session and will be reverted back to a value set in /etc/conf.d/hostname file with next system restart.

Now that we got a brief description of a hostname and basic configuration steps its time to reflect another important case, which is directly related to a Funtoo Linux hostname generation, a hosts.

Hosts case

As per man page hosts stands for static table lookup for hostnames and it's configuration file is /etc/hosts.