Entrance is the Enlightenment Display Manager. And like Enlightenment, it takes beauty and customization to levels never seen before. It allows users to log in and out of the different Xsession types available on the system.
$ sudo edb_gtk_ed /etc/entrance_config.db
$ entrance -T -t mynewtheme
/entrance/pointer pointer.png
man 3 strftime
/entrance/system/reboot 1 /entrance/system/halt 1
$ sudo cp myusername.eet /usr/share/entrance/users/
$ sudo cp myusername.jpg /usr/share/entrance/users/
/entrance/users/0/name myusername /entrance/users/0/icon default.eet /entrance/users/0/session Enlightenment
eval `ssh-agent` exec /usr/bin/enlightenment
$ chmod +x ~/.xsession
/entrance/auth 1
/entrance/engine software
$ cd $ mkdir mytheme $ cd mytheme $ mkdir images $ vim cg # cg contains the following info #!/bin/sh -e if [ -f ./mytheme.eet ]; then rm -f mytheme.eet fi edje_cc -v -id ./image mytheme.edc mytheme.eet if [ -f ./mytheme.eet ]; then edje mytheme.eet fi $ chmod +x cg $ vim mytheme.edc # your favorite editor will suffice here // This is the contents of your basic theme. images { } collections { group { name, "Main"; parts { part { name, "bg"; type, RECT; mouse_events, 0; description { state, "default" 0.0; visible, 1; rel1 { relative, 0.0 0.0; offset, 0 0; } rel2 { relative, 1.0 1.0; offset, 0 0; } color, 0 0 0 255; } } part { name, "entrance.entry.user"; type, TEXT; mouse_events, 0; description { state, "default" 0.0; rel1 { relative, 0.5 1.0; offset, -100 -71; to, "bg"; } rel2 { relative, 0.5 1.0; offset, 100 -36; to, "bg"; } color, 255 255 255 255; text { text, ""; font, "Vera"; size, 20; fit, 0 0; align, 0.5 0.5; } } } part { name, "entrance.entry.pass"; type, TEXT; mouse_events, 0; description { state, "default" 0.0; visible, 1; rel1 { relative, 0.5 1.0; offset, -100 -35; to, "bg"; } rel2 { relative, 0.5 1.0; offset, 100 -5; to, "bg"; } color, 255 255 255 255; text { text, ""; font, "Vera"; size, 20; fit, 0 0; align, 0.5 0.5; } } } } programs { program { name, "authed"; signal, "entrance,user,auth,success"; source, ""; action, SIGNAL_EMIT "entrance,user,auth,success,done" ""; } } } }
If everything worked ok, you should get something like Example1. So what's worth taking notice of? The group "Main" is what entrance loads and fills the screen with.
Edje Parts
$ cd $ mkdir mysecondtheme $ cd mysecondtheme $ mkdir images $ vim cg # cg contains the following info #!/bin/sh -e if [ -f ./mysecondtheme.eet ]; then rm -f mysecondtheme.eet fi edje_cc -v -id ./image mysecondtheme.edc mysecondtheme.eet if [ -f ./mysecondtheme.eet ]; then edje mysecondtheme.eet fi $ chmod +x cg $ vim mysecondtheme.edc # your favorite editor will suffice here images { } collections { group { name, "Main"; parts { part { name, "bg"; type, RECT; mouse_events, 0; description { state, "default" 0.0; visible, 1; rel1 { relative, 0.0 0.0; offset, 0 0; } rel2 { relative, 1.0 1.0; offset, 0 0; } color, 0 0 0 255; } } part { name, "BottomBar"; type, RECT; mouse_events, 1; description { state, "default" 0.0; visible, 1; rel1 { relative, 0.0 1.0; offset, 0 -50; } rel2 { relative, 1.0 1.0; offset, 0 0; } color, 100 100 100 96; } } part { name, "entrance.entry.user"; type, TEXT; mouse_events, 0; description { state, "default" 0.0; rel1 { relative, 0.5 1.0; offset, -100 -71; to, "bg"; } rel2 { relative, 0.5 1.0; offset, 100 -36; to, "bg"; } color, 255 255 255 255; text { text, ""; font, "Vera"; size, 20; fit, 0 0; align, 0.5 0.5; } } } part { name, "entrance.entry.pass"; type, TEXT; mouse_events, 0; description { state, "default" 0.0; visible, 1; rel1 { relative, 0.5 1.0; offset, -100 -35; to, "bg"; } rel2 { relative, 0.5 1.0; offset, 100 -5; to, "bg"; } color, 255 255 255 255; text { text, ""; font, "Vera"; size, 20; fit, 0 0; align, 0.5 0.5; } } } part { name, "entrance.hostname"; type, TEXT; mouse_events, 0; description { state, "default" 0.0; visible, 1; rel1 { relative, 0.5 0.0; offset, -200 -35; to, "entrance.entry.user"; } rel2 { relative, 0.5 0.0; offset, 200 -5; to, "entrance.entry.user"; } color, 255 255 255 255; text { text, ""; font, "Vera"; size, 20; fit, 0 0; align, 0.5 0.5; } } } part { name, "entrance.date"; type, TEXT; mouse_events, 0; description { state, "default" 0.0; visible, 1; rel1 { relative, 1.0 1.0; offset, -300 -25; to, "bg"; } rel2 { relative, 1.0 1.0; offset, -10 -10; to, "bg"; } color, 255 255 255 255; text { text, ""; font, "Vera"; size, 10; fit, 0 0; align, 1.0 0.5; } } } part { name, "entrance.time"; type, TEXT; mouse_events, 0; description { state, "default" 0.0; visible, 1; rel1 { relative, 1.0 1.0; offset, -300 -40; to, "bg"; } rel2 { relative, 1.0 1.0; offset, -10 -25; to, "bg"; } color, 255 255 255 255; text { text, ""; font, "Vera"; size, 10; fit, 0 0; align, 1.0 0.5; } } } part { name, "EntranceError"; type, TEXT; mouse_events, 0; #define ERROR(sname, sdescription) \ description { state, sname 0.0; visible, 1; \ rel1 { relative, 0.0 1.0; offset, 5 -35; to, "bg"; } \ rel2 { relative, 1.0 1.0; offset, -5 -5; to, "bg"; } \ color, 255 255 255 255; \ text { text, sdescription; \ font, "Vera"; size, 20; fit, 0 0; align, 1.0 0.5; } } ERROR("default", ""); ERROR("userfail", "Unknown User"); ERROR("passfail", "Authentication Failed"); } part { name, "entrance.xsessions.list"; type, RECT; mouse_events, 1; dragable { x, 1 1 0; y, 1 1 0; } description { state, "default" 0.0; visible, 1; rel1 { relative, 1.0 0.5; offset, -205 -180; } rel2 { relative, 1.0 0.5; offset, -25 180; } color, 255 255 255 64; } } part { name, "SessionLabel"; type, TEXT; mouse_events, 0; effect, SOFT_SHADOW; description { state, "default" 0.0; visible, 1; rel1 { relative, 0.0 0.0; offset, 0 -30; to, "entrance.xsessions.list"; } rel2 { relative, 1.0 0.0; offset, 0 -5; to, "entrance.xsessions.list"; } color, 255 255 255 255; color3, 0 0 0 192; text { text, "Sessions"; font, "Vera"; size, 10; fit, 0 0; align, 0.5 0.5; } } } part { name, "entrance.users.list"; type, RECT; mouse_events, 1; dragable { x, 1 1 0; y, 1 1 0; } description { state, "default" 0.0; visible, 1; rel1 { relative, 0.0 0.25; offset, 100 -25; } rel2 { relative, 0.0 0.25; offset, 210 25; } color, 255 255 255 64; } } part { name, "UsersLabel"; type, TEXT; mouse_events, 0; effect, SOFT_SHADOW; description { state, "default" 0.0; visible, 1; rel1 { relative, 0.0 0.0; offset, 0 -30; to, "entrance.users.list"; } rel2 { relative, 1.0 0.0; offset, 0 -5; to, "entrance.users.list"; } color, 255 255 255 255; color3, 0 0 0 192; text { text, "Users"; font, "Vera"; size, 10; fit, 0 0; align, 0.5 0.5; } } } part { name, "entrance.users.avatar"; type, RECT; mouse_events, 1; description { state, "default" 0.0; visible, 1; rel1 { relative, 0.0 0.5; offset, 100 -50; } rel2 { relative, 0.0 0.5; offset, 300 50; } color, 100 100 100 0; } } part { name, "entrance.xsessions.selected"; type, RECT; mouse_events, 1; description { state, "default" 0.0; visible, 1; rel1 { relative, 0.0 1.0; offset, 0 -45; } rel2 { relative, 0.0 1.0; offset, 200 -5; } color, 100 100 100 0; } } } programs { program { name, "authed"; signal, "entrance,user,auth,success"; source, ""; action, SIGNAL_EMIT "entrance,user,auth,success,done" ""; } program { name, "errorreset"; signal, ""; source, ""; action, STATE_SET "default" 0.0; target, "EntranceError"; in, 2.0 0.0; } #define ERROR_PROGRAM(pstate, psignal) \ program { name, pstate; signal, psignal; source, ""; \ action, STATE_SET pstate 0.0; target, "EntranceError"; \ after, "errorreset"; } ERROR_PROGRAM("userfail", "entrance,user,fail"); ERROR_PROGRAM("passfail", "entrance,user,auth,fail"); } } group { name, "Session"; parts { part { name, "entrance.xsession.icon"; type, RECT; mouse_events, 1; description { state, "default" 0.0; visible, 1; rel1 { relative, 0.0 0.0; offset, 2 2; } rel2 { relative, 0.0 0.0; offset, 34 34; } color, 255 255 255 0; } } part { name, "entrance.xsession.title"; type, TEXT; mouse_events, 1; effect, SOFT_SHADOW; description { state, "default" 0.0; visible, 1; rel1 { relative, 1.0 0.5; offset, 2 -17; to, "entrance.xsession.icon"; } rel2 { relative, 1.0 0.5; offset, 150 17; to, "entrance.xsession.icon"; } color, 100 100 100 192; color3, 255 255 255 255; text { text, "Doesn't Matter"; font, "Vera"; size, 13; align, 0.0 0.5; fit, 0 0; } } } } programs { program { name, "SessionIconClicked"; signal, "mouse,clicked,1"; source, "entrance.xsession.icon"; action, SIGNAL_EMIT "entrance,xsession,selected" ""; } program { name, "SessionTitleClicked"; signal, "mouse,clicked,1"; source, "entrance.xsession.title"; action, SIGNAL_EMIT "entrance,xsession,selected" ""; } } } }
Entrance will use the "Session" group as a template and fill in the different parts with system specific session information.
Edje Parts
Now lets focus our attention back to the "Main" group.
Edje Parts
You have to have some sort of idea of what you want your login screen to look like to go any further. My idea coming into Example 3 was
So I hit the web and found a high resolution photo that a friend had taken, and I had my background. I've always been very impressed by the themes Tokyo comes up with, and I pieced together the borders from his e16 theme "Presence" in The Gimp. Gathering images was a lengthy process, but after digging around in other themes long enough I was ready to begin.
Using the template file above, I started working on the theme part by part, testing it as I went along.
$ ./cg $ sudo cp mynewtheme.eet /usr/share/entrance/themes/ $ entrance -T -t mynewtheme
What follows the main edc for Example3, titled "Headlights". A short divx4 capture(poor quality) is available here. A screenshot of this theme doesn't do it justice, the animation present has to be captured by video. The complete source code and images are available, and the reader is encouraged to disect this source code.
/*************************************************************************** * Corey Donohoe<atmos@atmos.org> * Theme: taillights * * Borders by Tokyo : tokyo.cored.org * Various images by Rephorm: www.rephorm.com * Background by Roy Wagner : www.cozmo85.net * Various images by Raster : www.rasterman.com **************************************************************************/ #define DEBUG 0 /** * include our image { } block elsewhere */ #include "images/images.edc" collections { group { name, "Main"; parts { /** provides: * EntranceDate * EntranceTime * bottom_bar */ #include "parts/bg.edc" /** provides: * error_string * error_string_clip */ #include "parts/error_string.edc" /** * provides: * EntranceSessionList * session_list_border * session_list_clip */ #include "parts/session_list_area.edc" /** * provides: * EntranceUserList * user_list_border * user_list_clip */ #include "parts/user_list_area.edc" /** * provides: * EntranceSession * session_clip * session_description */ #include "parts/entrance_session.edc" /** * provides: * power_button * power_button_description */ #include "parts/power_button.edc" /** * provides: * restart_button * restart_button_description */ #include "parts/restart_button.edc" /** * provides: * EntranceFace * EntranceUserEntry * EntrancePassEntry * EntranceHostname * login_border * login_area_clip */ #include "parts/login_area.edc" #if DEBUG #include "parts/debug.edc" #endif /** * provides: * confirmation_reboot_clip * confirmation_reboot_yes * confirmation_reboot_no * * confirmation_halt_clip * confirmation_halt_yes * confirmation_halt_no * */ #include "parts/confirmation_dialog.edc" } programs { program { name, "authed"; signal, "entrance,user,auth,success"; source, ""; action, SIGNAL_EMIT "entrance,user,auth,success,done" ""; } #if DEBUG #include "programs/debug_programs.edc" #endif /** * emit signals to entrance related to the system, AFTER the user * clicks "Yes" on the confirmation dialog * Also handle showing/hiding of the confirmation dialogs * * EntranceSystemHalt * EntranceSystemReboot * */ #include "programs/confirmation_dialog_programs.edc" /** * handle EntranceSessionList callbacks: * minimize, show, etc */ #include "programs/session_list_area_programs.edc" /** * handle EntranceUserList callbacks: * minimize, show, etc */ #include "programs/user_list_area_programs.edc" /** * catch signals from entrance, related to the login area * * EntranceUserAuth * EntranceUserFail * EntranceUserAuthFail * * UserSelected * UserUnSelected */ #include "programs/login_area_programs.edc" /** * provide mouse effects to the power button */ #include "programs/power_button_programs.edc" /** * provide mouse effects to the restart button */ #include "programs/restart_button_programs.edc" /** * catch signals from entrance, related to the error messages * * EntranceUserAuth * EntranceUserFail * EntranceUserAuthFail */ #include "programs/error_string_programs.edc" /** * macro defined to make the fade effect on all the windows easy to * maintain */ #include "programs/effects_programs.edc" /** * enable user auto save of the sessions they select */ #include "programs/session_save_dialog_programs.edc" } } /** * Session Group */ group { name, "Session"; parts { /** * provides the EntranceSessionIcon and EntranceSessionTitle parts */ #include "parts/session_group.edc" } programs { /** * emit the following signals to entrance, * SessionSelected and * SessionUnSelected */ #include "programs/session_group_programs.edc" } } group { name, "User"; parts { /** * provides the EntranceUserIcon and EntranceUserName parts */ #include "parts/user_group.edc" } programs { /** * emit the following signals to entrance, * UserSelected and * UserUnSelected */ #include "programs/user_group_programs.edc" } } }
Perhaps it's just me, but this edc reads a lot smoother than the first two. Perhaps because we can see the different components of the Edje at a much higher level, or perhaps because this one has comments describing what each of the include operations are doing.
Somethings to perhaps keep in mind as you're writing themes might be
If you found this theme tutorial useful or useless please let me known.
Entrance relies on a lot of libraries most notably
There is no need to reinvent the wheel all the time.
1. You need Edb from cvs cvs co e17/libs/edb cd e17/libs/edb ./autogen.sh ./configure make sudo make install cd 2. You need eet from cvs cvs co e17/libs/edb cd e17/libs/edb ./autogen.sh ./configure make sudo make install cd 3. You need Evas from cvs cvs co e17/libs/evas cd e17/libs/evas ./autogen.sh make sudo make install cd 4. You need Ecore from cvs cvs co e17/libs/ecore cd e17/libs/ecore ./autogen.sh make sudo make install cd 5. You need Edje from cvs cvs co e17/libs/edje cd e17/libs/edje ./autogen.sh make sudo make install cd 6. You need Esmart from cvs cvs co e17/proto/esmart cd e17/proto/esmart ./autogen.sh make sudo make install cd 7. You need entrance from cvs cvs co e17/apps/entrance cd e17/apps/entrance ./autogen.sh make sudo make install cd