Gentoo Wiki ArchivesGentoo Wiki

Enlightenment

Desktop environments

Lightweight desktop environments

Window managers

Compositing window managers

Screenshots

edit
E17 showing some of its features.
E17 showing some of its features.

Contents

Introduction

Quote from http://enlightenment.org/

"Development Release 17 of the Enlightenment window manager represents an evolution into the next generation of desktop environments: the desktop shell. DR17 will provide integration between files and your environment in a seamless manner while encompassing a graphically rich and flexible architecture. It will not compete with GNOME or KDE, but be a completely new way of visualizing your desktop, based around the EFL which was built from the ground up for this task."

Warning: Enlightenment development has moved to SVN. The CVS doesn't have newest code anymore.
Warning: You need to emerge dev-util/subversion with the "webdav-neon" or "webdav-serf" USE flags enabled.
Warning: CVS versions are bleeding-edge, and may not compile, run, or work as you expect.
Warning: Always layman --sync enlightenment before emerging CVS versions of software.

Warning: When some changes are introduced in the code, changes to the configuration might also be required. These changes are not always backwards compatible which will result in a reset of your E17 settings, effectively destroying your ~/.e directory. You will be notified by E17 when this happens but not in advance. Keep backups of your favorite backgrounds!

Note: Thanks for all your kind offers for mirroring the Enlightenment sites. We currently have enough mirrors, but if you would like to help with our next round of expansion you can contact Andy.

There are two major versions of Enlightenment, Enlightenment 0.16 (x11-wm/enlightenment) and Enlightenment 0.17. The purpose of this article is to guide you through the emerge and maintenance of an Enlightenment 0.17 setup. You should note that E17, DR17(Development Release) and plain E are references to Enlightenment 0.17, these are commonly used in the Enlightenment community and throughout this article.

Installation

Warning: This article holds many scripts and command line examples; as a rule of thumb, do not copy/paste commands without fully understanding them, especially as root. Remember, with great power comes great responsibility.

The Enlightenment Foundation Libraries (EFL) are the backbone of the Enlightenment 0.17 desktop shell; these libraries handle window drawing, window resizing, image manipulation, theming and customization.

Preparing

The Enlightenment ebuilds are part of Vapier's Dev Overlay so the first thing you should do is add the enlightenment overlay through layman. You will also need to install cvs in order for Vapier's Dev Overlay to show up(as enlightenment) and later to fetch the files from the CVS repository.

Warning: The default layman storage directory is /usr/portage/local/layman. You can change this setting and others in /etc/layman/layman.cfg; if you do, remember your specific paths throughout this article.
$ layman --fetch
$ layman --add enlightenment
# Then do this if you haven't already:
$ echo "source /usr/portage/local/layman/make.conf" >> /etc/make.conf  

Once the overlay is added you need to use the appropriate package.keywords. There are two package.keywords supplied with the enlightenment overlay; one for "live" CVS ebuilds[1] and one for CVS snapshot ebuilds [2] .

The easiest way to use these is to have a /etc/portage/package.keywords directory instead of the one regular file. Then symlink the appropriate package.keywords to /etc/portage/package.keywords/,

$ mv /etc/portage/package.keywords /etc/portage/my.keywords
$ mkdir /etc/portage/package.keywords
$ mv /etc/portage/my.keywords /etc/portage/package.keywords
$ ln -s /usr/portage/local/layman/enlightenment/scripts/package.keywords.livecvs /etc/portage/package.keywords/

You can, if you must, cat the entries from the package.keywords to your /etc/portage/package.keywords/my.keywords file,

$ cat /usr/portage/local/layman/enlightenment/scripts/package.keywords.livecvs >> /etc/portage/package.keywords/my.keywords

but this is not recommended, since it would force you to manually maintain it when the overlay changes.

Emerging

Before you start your emerge of E17 you should check that everything is in order with the --pretend and --verbose options.

# emerge -pv e
Note: Make sure the "X" and "png" and "jpeg" USE-flag are enabled in all enlightenment ebuilds.

Check that the ebuilds have the USE-flags you prefer enabled. If you feel that they do not, refer to the USE-flags FAQ for instructions on USE-flag handling. At this step it's also a good idea to double check that the ebuilds are ending with -9999 if you are using the LiveCVS package.keywords entries or -0.9.9.* if you are using the snapshot package.keywords entries, and said ebuilds should be emerged from overlay "/usr/portage/local/layman/enlightenment", if they are not, review the Preparing chapter again and look for typos and errors in your /etc/portage/package.keywords.

When you are satisfied with the results of emerge -pv, it's time for the actual emerge. To be on the safe side, you should emerge with the --ask option.

# emerge -av e

If emerge didn't halt due to broken code from the CVS repository, you should have successfully emerged E17. If emerge fails, you may wait about one day for code to get fixed, and try again the same emerge command.

If any e_module emerge fails or if you are having issues while emerging in general, start by reading the Enlightenment Overlay page for possible fixes and solutions.

CVS Update

Note: Please do not update E17 every day, CVS checkouts can put a lot of strain on the CVS servers.

Note: It is strongly advised that you sync your layman overlay before you update,
$ layman --sync=enlightenment
The scripts below does this for you.

The code in CVS is in a constant state of change, and bugs that exist one day may be gone the next, or even been replaced with new ones. Because of this, you will want to occasionally update to a newer version. E17 and its dependencies that are -9999 ebuilds are not updated automatically, you need to do this yourself.

This is a simple bash script that will take care of this for you, lets call it emerge-e17.

Note: If you have enabled the dbus USE-flag on x11-wm/e you will need to add x11-libs/e_dbus to E17_EBUILDS below to include it in updates, and make sure you add it after x11-libs/ecore.

Note: For amd64 arch users the dev-libs/efreet and x11-libs/e_dbus ebuilds won't work until that keyword is added to the ebuild

File: emerge-e17
#!/bin/bash
layman --sync=enlightenment
export EMERGE_DEFAULT_OPTS="${*} --verbose"
E17_EBUILDS="dev-libs/eet x11-libs/evas
x11-libs/ecore dev-libs/embryo media-libs/edje dev-libs/efreet x11-wm/e"
emerge -1 ${E17_EBUILDS}

Save this script and make it executable:

$ chmod +x emerge-e17

The export line in this script gives you the ability to run the script with regular emerge options, for example:

$ ./emerge-e17 --pretend --verbose

You could also place it in your /usr/local/bin directory, this would make the script behave as it were any other executable.


The script below is more advanced than the previous script. It will retry failed emerges once while forcing the automake version. Save it as /usr/local/bin/e17update and make it executable. Make sure you edit _EBUILDS= to contain the ebuilds you want to emerge.

Warning: Epeg is no longer needed in this script

File: /usr/local/bin/e17update
#!/bin/sh
# This script updates your e17 installation.
# Customize the _EBUILDS variable to specify which packages to update.

## Script setup
# Select package manager, emerge or paludis:
PACKAGE_MANAGER="emerge"

# Guys stop messing with the order of the libs -_-
# Minimal -- emerge e gets you this in the wrong order
_EBUILDS=( dev-libs/eet dev-db/edb x11-libs/evas x11-libs/ecore dev-libs/efreet 
dev-libs/embryo media-libs/edje media-libs/emotion media-libs/imlib2 media-libs/epsilon x11-libs/ewl x11-libs/e_dbus x11-wm/e 
# few more usefull apps, also only add programs after this line 
# unless you know what you are doing.
#x11-libs/esmart x11-misc/entrance x11-terms/enterminus
)

# Activate this flag to speed-up your compile time (http://www.gentoo-wiki.info/TIP_Speeding_up_portage_with_tmpfs)
# (Note that you need to have alot of RAM)
_MNT_TMPFS=0
# Size of tmpfs in MB (memory is allocated only when needed).
_TMPFS_SIZE=512

_GRAY=$'\e[30;01m'
_RED=$'\e[31;01m'
_GREEN=$'\e[32;01m'
_YELLOW=$'\e[33;01m'
_BLUE=$'\e[34;01m'
_MAGENTA=$'\e[35;01m'
_CYAN=$'\e[36;01m'
_WHITE=$'\e[37;01m'
_BLACK=$'\e[38;01m'
_BOLD=$'\e[1m'
_N=$'\e[0m'


## You should not have to edit below this line.



if [ -e "/etc/init.d/functions.sh" ]; then
    . /etc/init.d/functions.sh
elif [ -e "/sbin/functions.sh" ]; then
    . /sbin/functions.sh
elif [ -e "/lib/rcscripts/sh/functions.sh" ]; then
    . /lib/rcscripts/sh/functions.sh
fi

SKIP=
while (($# > 0)); do
  case $1 in
    -s|--skip)
    if (($# > 1)); then
      SKIP=$2
      shift 1;
    fi
  ;;
  esac
  shift 1;
done;

trap "exit_hdlr $?" SIGHUP SIGINT SIGTERM SIGQUIT SIGABRT

layman --sync=enlightenment

_FAIL_FLAG="0"
_FAIL_LIST=""

# mounts tmpfs on ${WORKING_DIR} with user specificied size
function mount_tmpfs(){
	if (($_MNT_TMPFS == 0)); then return 0; fi
	if [ -z "$(mount|grep ${WORKING_DIR})" ]; then
		mount -t tmpfs tmpfs ${WORKING_DIR} -o size=${_TMPFS_SIZE}M && einfo "mounting ramdisk of size ${_TMPFS_SIZE}MB on ${WORKING_DIR}";
		if [ -z "$(mount|grep ${WORKING_DIR})" ]; then einfo "mounting of tmpfs failed...   continuing with ordinary emerge"; fi
	else
		einfo "${WORKING_DIR} was already mounted... leaving unchanged."
		_MNT_TMPFS=0    # prevent the script from unmounting it in the end
	fi
}
function umount_tmpfs(){
	if (($_MNT_TMPFS == 0)); then return 0; fi
	if [ ! -z "$(mount|grep ${WORKING_DIR})" ]; then
		einfo "unmounting tmpfs" 
		if ! umount ${WORKING_DIR}; then eerror "Failed to unmount tmpfs"; fi
	fi
}
function compile(){
	${EMERGE} ${1} && _FAIL_FLAG="1"
}
function exit_hdlr() {
	echo ""
	if (($_CNT < ${#_EBUILDS[*]})); then
		if (($_CNT > 1)); then
			einfo "Update aborted. To resume, run: ${_CYAN}$0 --skip $((_CNT-1))${_N}"
		fi
	fi
	if [ -z "$_FAIL_LIST" ]; then
		einfo "All packages successfully emerged."
	else
		eerror "The following packages failed on emerge: ${_RED}${_FAIL_LIST}${_N}"
	fi
	umount_tmpfs
	exit ${1}
}

if [ "$1" == "debug" ]; then
	DEBUG="USE=\"$USE debug\" FEATURES=\"$FEATURES nostrip\""
fi

case "${PACKAGE_MANAGER}" in
	"emerge" )
	EMERGE="/usr/bin/emerge"
	WORKING_DIR="/var/tmp/portage"
	;;
	"paludis" )
	EMERGE="/usr/bin/paludis -i"
	WORKING_DIR="/var/tmp/paludis"
	;;
esac

# use the SKIP variable to skip the first packages (e.g. SKIP=20 ./e17update.sh)
if [ ! -z "$SKIP" ]; then
	einfo "Skipping $SKIP ebuilds..."
else
	SKIP=0
fi

mount_tmpfs

_CNT=0
for package in ${_EBUILDS[*]}; do
	_FAIL_FLAG=0
	let "_CNT++"
	if (($_CNT <= $SKIP)); then continue; fi
		einfo "Compiling ${_GREEN}$package${_N} (${_YELLOW}$_CNT out of ${#_EBUILDS[*]}${_N})"
		compile ${package}
		if [ "$_FAIL_FLAG" == "0" ]; then
			ewarn "emerge of ${_YELLOW}$package${_N} failed... retrying once"
		sleep 3
		# Try with an older automake (known issue)
		E17_WANT_AUTOMAKE=1.9 compile $package
		if [ "$_FAIL_FLAG" == "0" ]; then
			eerror "emerge of ${_RED}$package${_N} failed again...     bailing out"
			if [ -x /usr/bin/beep ]; then /usr/bin/beep -r 3 -d 50; fi
			_FAIL_LIST="${_FAIL_LIST} $package"
		fi
	fi
	echo ""
	sleep 3
done

exit_hdlr 0

Make the script executable and run it:

$ chmod +x /usr/local/bin/e17update
$ /usr/local/bin/e17update

Troubleshooting

Icons

Enlightenment DR17 relies heavily on the FDO Icon Theme Specification, so in order for icons to appear in the menus, you will need to emerge the fallback icon theme, hicolor-icon-theme. You can then emerge icon themes like the Tango Icon Theme or the Gnome Icon Theme.

You can change the Icon Theme in the Settings dialog.

GTK+ Beautification

GTK+ applications do not use the Enlightenment Foundation Libraries, and are therefore not affected by the theme set by E17. This results in GTK+ applications being displayed with a crude default GTK+ theme, which is not designed to be aesthetically pleasing.

There are two ways to address this problem.

The gtk-chtheme Approach

This approach is the simplest and the safest one. Simply emerge the x11-themes/gtk-chtheme ebuild

$ emerge -av x11-themes/gtk-chtheme

Then run gtk-chtheme (don't forget to commit your changes with the Apply button).

Nevertheless, you won't be able to change the icon theme, so it could be worthy to have a look to the following approaches.

The ~/.gtkrc-2.0 Approach

Create the file ~/.gtkrc-2.0 using the template below.

File: ~/.gtkrc-2.0
 gtk-font-name = "Bitstream Vera Sans 13"
 gtk-theme-name = "Clearlooks"
 gtk-icon-theme-name = "Tango" 

Note: The default GNOME theme is Clearlooks, which is a part of x11-themes/gtk-engines

The contents of the file is self explanatory. gtk-font-name="" should contain your preferd Font, ending with the font size as the template demonstrates, gtk-theme-name="" should contain the name of your preferred GTK+ theme. The last line, gtk-icon-theme-name="", specifies what icon theme GTK+ should use.

To see what GTK+ themes you have installed, a simple:

$ ls -l /usr/share/themes

will show you exactly that. There are a lot of GTK+ themes to choose from in portage, also referred to as GTK+ Engines.

And to see what Icon themes you have installed,

$ ls -l /usr/share/icons

or look in the E17 menu, Configuration -> Appearance -> Icon Theme.

Gnome-Look is a good resource for icon themes.

Miscellaneous

Key-binding Backup

Warning: The syntax or output of enlightenment_remote may change over time so use this script with care.

Because of the upstream sent resets it's a good idea to backup you keybindings from time to time. The E17 configuration is stored in binary format so it's not as simple as copying a file from the ~/.e directory. We use the enlightenment_remote and simple scripting to do this.

Save this as e17-keybinding-helper.py and make it executable

File: e17-keybinding-helper.py

#!/usr/bin/python

from sys import argv, exit # import "argv" (which has the command line arguments) and "exit" from the "sys" module.
from os import system # import the "system" function from the "os" module. This function executes commands.
if len(argv) == 1:
    exit('You must specify at least one command line argument. Try %s --help' %argv[0])
elif argv[1] == '-h' or '--help'.startswith(argv[1]):
    print 'This is a helper script for managing keybindings in e17.\n'
    print '%-40s delete all keybindings listed in FILE'  %(argv[0] + ' del FILE')
    print '%-40s add all keybindings listed in FILE' %(argv[0] + ' add FILE')
    print '%-40s save the keybindings to FILE, by copying the output of the command "enlightenment_remote -binding-key-list" to FILE\n' % (argv[0] + ' save FILE')
    print 'For the "del" and "add" commands, FILE should be in the same format of the file created by the "save" command; for convenience, blank lines in FILE are ignored'
elif argv[1] in ('add', 'del'):
    bindingsf = file(argv[2]) # open file named argv[2] in the default mode of "read"
    bindingsf.readline() # Read the first line and do nothing with it, thus discarding it
    import re # import "re" module (for regular expressions)
    delim = re.compile('\\s*\\w+=') #now delim is the compiled regular expression from "\\s*\\w+=". This pattern matches 0 or more whitespace characters followed by 1 or more alphanumeric characters followed by a "=". This delimits the relevant fields in the output of enlightenment_remote -binding-key-list
    relevantlines = [line for line in bindingsf if line != '' and not line.isspace() and 'REPLY <- END' not in line]
    for fields in [delim.split(line) for line in relevantlines]:
        fields[0] = ' ' # Replace first field - which is garbage - with a space
        command = 'enlightenment_remote -binding-key-' + argv[1] + ' '.join(fields).replace('|','\\|')
        print command,
        ret = system(command)
        if ret != 0:
            exit ("Error. Command returned %d. Exitting. " %ret)
    print "%d keybindings processed" %len(relevantlines)
elif argv[1] == 'save':
    system('[ -e "%s" ] && echo File "%s" exists. I refuse to overwrite. ||\
enlightenment_remote -binding-key-list > %s' %(argv[2], argv[2], argv[2]))
else:
    exit('Unrecognized argument %s. Try %s --help' %(argv[1], argv[0]))

To create a backup file of your keybindings:

$ e17-keybinding-helper.py save keybinding-e17.backup


To delete the current E17 keybindings:

$ e17-keybinding-helper.py save tempfile
$ e17-keybinding-helper.py del tempfile
$ rm tempfile

To add your keybindings from your backup file:

$ e17-keybinding-helper.py add keybinding-e17.backup

Links

Concerns or Compliments? Please use the Discussion section.

Retrieved from "http://www.gentoo-wiki.info/Enlightenment_DR17"

Last modified: Sat, 27 Sep 2008 19:44:00 +1000 Hits: 228,086

Created by NickStallman.net, Luxury Homes Australia
Real estate agents should list their apartments, townhouses and units in Australia.