Difference between pages "Install/BootLoader" and "Xfce"

< Install(Difference between pages)
(New School (UEFI))
 
m (update table to responsive)
 
Line 1: Line 1:
<noinclude>
+
== About Xfce ==
{{InstallPart|boot loader configuration}}
+
</noinclude>
+
=== Installing a Bootloader ===
+
  
These install instructions show you how to use GRUB to boot using BIOS (old-school) or UEFI (new-school).
+
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.
  
==== Old School (BIOS) ====
+
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.
  
If you're using the BIOS to boot, setting up GRUB, the bootloader, is pretty easy.
+
Another priority of Xfce is adhereance to standards, specifically those defined at [http://freedesktop.org/ freedesktop.org]. [http://www.xfce.org/about/ About XFCE]
  
To use this recommended boot method, first emerge <code>boot-update</code>. This will also cause <code>grub-2</code> to be merged, since it is a dependency of <code>boot-update</code>.
+
== Installation ==
  
<console>
+
Before emerging Xfce you need to:
(chroot) # ##i##emerge boot-update
+
</console>
+
  
Then, edit <code>/etc/boot.conf</code> and specify "<code>Funtoo Linux genkernel</code>" as the <code>default</code> setting at the top of the file, replacing <code>"Funtoo Linux"</code>.
+
* 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:
  
<code>/etc/boot.conf</code> should now look like this:
+
{{console|body=###i## eselect profile add funtoo/1.0/linux-gnu/mix-ins/xfce}}
  
<pre>
+
* Verify that you have [[Funtoo_Linux_First_Steps#X.Org|X.Org Server]] configured properly.
boot {
+
generate grub
+
default "Funtoo Linux genkernel"
+
timeout 3
+
}
+
  
"Funtoo Linux" {
+
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:
kernel bzImage[-v]
+
}
+
  
"Funtoo Linux genkernel" {
+
{{console|body=###i## emerge xfce4-meta}}
kernel kernel[-v]
+
initrd initramfs[-v]
+
params += real_root=auto
+
}  
+
  
"Funtoo Linux better-initramfs" {
+
== Running Xfce ==
kernel vmlinuz[-v]
+
initrd /initramfs.cpio.gz
+
}
+
</pre>
+
  
Please read <code>man boot.conf</code> for further details.
+
There are several different ways to start Xfce:
  
===== Running grub-install and boot-update =====
+
* Editing the {{c|.xinitrc}} file in your user's home directory and using {{c|startx}} 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.
  
Finally, we will need to actually install the GRUB boot loader to your disk, and also run <code>boot-update</code> which will generate your boot loader configuration file:
+
=== .xinitrc ===
  
<console>
+
The most common way to start the environment is to configure {{c|~/.xinitrc}} to launch an Xfce session. The proper way to launch Xfce from the terminal is by using {{c|startxfce4}} combined with {{c|ck-launch-session}}.
(chroot) # ##i##grub-install --no-floppy /dev/sda
+
(chroot) # ##i##boot-update
+
</console>
+
  
Now you need to update your boot loader configuration file:
+
{{console|body=$##i## echo "exec startxfce4 --with-ck-launch" > ~/.xinitrc}}
<console>
+
(chroot) # ##i##boot-update
+
</console>
+
You only need to run <code>grub-install</code> when you first install Funtoo Linux, but you need to re-run <code>boot-update</code> every time you modify your <code>/etc/boot.conf</code> file, so your changes are applied on next boot.
+
  
==== New School (UEFI) ====
+
Note that {{c|--with-ck-launch}} (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 {{c|default}} runlevel, executing the following command as root:
  
If you're using UEFI to boot, setting up the boot loader is a bit more complicated for now, but this process will be improving soon. Perform the following steps.
+
{{console|body=
 +
###i## rc-update add consolekit default
 +
###i## rc
 +
}}
  
===== Emerging GRUB =====
+
Finally, to start the graphical environment, run {{c|startx}} from a login shell:
 +
{{console|body=$##i## startx}}
  
You will still use GRUB as a boot loader, but before emerging grub, you will need to enable EFI booting. To do this,
+
== Display Manager ==
add the following line to <code>/etc/make.conf</code>:
+
  
<pre>
+
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:
  
For 64-bit systems:
+
* XDM ({{c|x11-apps/xdm}}): X.Org's standard display manager.
  
GRUB_PLATFORMS="efi-64"
+
* LightDM ({{c|x11-misc/lightdm}}): A lightweight, but highly configurable display manager.
  
For 32-bit systems, i.e. Intel Atom devices:
+
* SLiM ({{c|x11-misc/slim}}): Simple Login Manager -- a lightweight display manager. Not very configurable.
  
GRUB_PLATFORMS="efi-32"
+
Any of these would make a fine choice. After you've chosen which display manager to use, install it:
  
</pre>
+
{{console|body=###i## emerge lightdm}}
  
Then, <code>emerge boot-update</code>. You will notice <code>grub</code> and <code>efibootmgr</code> getting pulled in as dependencies. This is expected and good:
+
All that's left to do now is to add the name of the display manager to {{c|/etc/conf.d/xdm}}, add the {{c|xdm}} service to the {{c|default}} runlevel, and start the service:
  
<console>
+
<pre>
(chroot) # ##i##emerge boot-update
+
DISPLAYMANAGER="lightdm"
</console>
+
</pre>
  
===== Installing GRUB =====
+
{{console|body=
 +
###i## rc-update add xdm default
 +
###i## /etc/init.d/xdm start}}
  
Now, for the magic of getting everything in place for booting. You should copy your kernel and initramfs (if you have one -- you will if you are following the default install) to <tt>/boot</tt>. GRUB will boot those. But how do we get UEFI to boot GRUB? Well, we need to run the following command (for 32bit simply set it as efi-32):
+
==Power Group==
  
<console>
+
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:
(chroot) # ##i##grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id="Funtoo Linux [GRUB]" --recheck /dev/sda
+
</console>
+
This command will simply install all the stuff to <tt>/boot/EFI</tt> and <tt>/boot/grub</tt> that your system needs to boot. In particular, the <tt>/boot/EFI/grub/grubx64.efi</tt> file will be created. This is the GRUB boot image that UEFI will load and start.
+
  
A more detailed explanation of the flags used in the above command:
+
{{console|body=
* <code>--target=x86_64-efi</code>: Tells GRUB that we want to install it in a way that allows it to boot in UEFI
+
###i## gpasswd -a <username> power
* <code>--efi-directory=/boot</code>: All GRUB UEFI files will be installed in ''/boot''
+
* <code>--bootloader-id="Funtoo Linux [GRUB]"</code>: This flag is not necessary for GRUB to boot. However, it allows you to change the text of the boot option in the UEFI BIOS. The stuff in the quotes can be set to anything that you would like.
+
* <code>--recheck</code>: If a device map already exists on the disk or partition that GRUB is being installed on, it will be removed.
+
* <code>/dev/sda</code>:The device that we are installing GRUB on.
+
 
+
===== Configuring GRUB =====
+
 
+
OK, now UEFI has the GRUB image it needs to boot. But we still need to configure GRUB itself so it finds and boots your kernel and initramfs. This is done by performing the following steps. Since boot-update doesn't yet support UEFI, we will use boot-update, but then edit our <code>/boot/grub/grub.cfg</code> to support UEFI booting.
+
 
+
First, you will need to edit <code>/etc/boot.conf</code>. Format this as you would if you were booting without UEFI. If you are not sure how this should look, below is an example of what it could look like if you are booting from an unencrypted ext4 partition:
+
 
+
{{file|name=/etc/boot.conf|desc=|body=
+
boot {
+
        generate grub
+
        default "Funtoo Linux"
+
        timeout 3
+
}
+
 
+
"Funtoo Linux" {
+
        kernel vmlinuz[-v]
+
        params += rootfstype=ext4 root=/dev/sda2
+
}
+
 
}}
 
}}
  
After you have edited your <code>/etc/boot.conf</code> file, run <code>boot-update</code>. You should now have a <code>/boot/grub/grub.cfg</code> file, which you can edit using the following command:
+
If the group does not exist then execute the following and try again:
  
<console>
+
{{console|body=
# ##i##nano /boot/grub/grub.cfg
+
###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|body=###i## emerge [name of plugin]}}
  
To get your <code>/boot/grub/grub.cfg</code> to support booting with UEFI, make the following changes. Below the existing insmod lines, add the following lines.  Both of these involve adding support for the UEFI framebuffer to GRUB.:
+
{{TableStart}}
 
+
<tr class="info"><th>Name</th><th>Description</th></tr>
<pre>
+
<tr><td>xfce-extra/thunar-volman</td><td>Daemon that enforces volume-related policies</td></tr>
  insmod efi_gop
+
<tr><td>xfce-extra/thunar-vcs-plugin </td><td>Adds Subversion and GIT actions to the context menu of thunar </td></tr>
  insmod efi_uga
+
<tr><td>xfce-extra/thunar-shares-plugin</td><td>Thunar plugin to share files using Samba </td></tr>
</pre>
+
<tr><td>xfce-extra/thunar-archive-plugin</td><td>Archive plug-in for the Thunar filemanager</td></tr>
 
+
<tr><td>xfce-extra/xfce4-volumed</td><td>Daemon to control volume up/down and mute keys</td></tr>
Then, change the <code>set gfxpayload</code> line to read as follows. UEFI does not support text mode, so we will keep video initialized to the current resolution.:
+
<tr><td>xfce-extra/xfce4-screenshooter</td><td>Xfce4 screenshooter application and panel plugin</td></tr>
 
+
<tr><td>xfce-extra/xfce4-notifyd</td><td>Notification daemon for the Xfce desktop environment</td></tr>
<pre>
+
<tr><td>xfce-extra/xfce4-mixer</td><td>A volume control application (and panel plug-in) for the Xfce desktop environment</td></tr>
  set gfxpayload=keep
+
<tr><td>xfce-extra/xfce4-mount-plugin</td><td>A mount plug-in for the Xfce panel</td></tr>
</pre>
+
<tr><td>xfce-extra/xfce4-clipman-plugin</td><td>A clipboard manager plug-in for the Xfce panel</td></tr>
 +
<tr><td>xfce-extra/xfce4-battery-plugin</td><td>A battery monitor panel plugin for the Xfce desktop environment</td></tr>
 +
{{TableEnd}}
  
You can now save your changes by pressing <code>Control-X</code> and answering <code>y</code> when asked if you want to save the modified buffer. When prompted for a filename, hit Enter to use the existing filename.
+
[[Category:Desktop]]
 +
[[Category:First Steps]]
 +
[[Category:Official Documentation]]

Latest revision as of 21:22, January 21, 2015

About Xfce

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.

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.

Another priority of Xfce is adhereance to standards, specifically those defined at freedesktop.org. About XFCE

Installation

Before emerging Xfce you need to:

# eselect profile add funtoo/1.0/linux-gnu/mix-ins/xfce


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:

# emerge xfce4-meta


Running Xfce

There are several different ways to start Xfce:

  • Editing the .xinitrc file in your user's home directory and using startx 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 ~/.xinitrc to launch an Xfce session. The proper way to launch Xfce from the terminal is by using startxfce4 combined with ck-launch-session.

$ echo "exec startxfce4 --with-ck-launch" > ~/.xinitrc


Note that --with-ck-launch (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 default runlevel, executing the following command as root:

# rc-update add consolekit default
# rc


Finally, to start the graphical environment, run startx from a login shell:

$ startx


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 (x11-apps/xdm): X.Org's standard display manager.
  • LightDM (x11-misc/lightdm): A lightweight, but highly configurable display manager.
  • SLiM (x11-misc/slim): 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:

# emerge lightdm


All that's left to do now is to add the name of the display manager to /etc/conf.d/xdm, add the xdm service to the default runlevel, and start the service:

DISPLAYMANAGER="lightdm"
# rc-update add xdm default
# /etc/init.d/xdm start


Power Group

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:

# gpasswd -a <username> power


If the group does not exist then execute the following and try again:

# groupadd power


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

# emerge [name of plugin]


NameDescription
xfce-extra/thunar-volmanDaemon that enforces volume-related policies
xfce-extra/thunar-vcs-plugin Adds Subversion and GIT actions to the context menu of thunar
xfce-extra/thunar-shares-pluginThunar plugin to share files using Samba
xfce-extra/thunar-archive-pluginArchive plug-in for the Thunar filemanager
xfce-extra/xfce4-volumedDaemon to control volume up/down and mute keys
xfce-extra/xfce4-screenshooterXfce4 screenshooter application and panel plugin
xfce-extra/xfce4-notifydNotification daemon for the Xfce desktop environment
xfce-extra/xfce4-mixerA volume control application (and panel plug-in) for the Xfce desktop environment
xfce-extra/xfce4-mount-pluginA mount plug-in for the Xfce panel
xfce-extra/xfce4-clipman-pluginA clipboard manager plug-in for the Xfce panel
xfce-extra/xfce4-battery-pluginA battery monitor panel plugin for the Xfce desktop environment