My favorites | Sign in
Project Home Wiki Issues Source
Search
for
Places  
E17 Module that manage the mounting of volumes
Featured
Updated Jan 28, 2012 by d...@gurumeditation.it

E17 Places Module

Here’s my last module, it show you all the filesystem devices attached to the system with some information (total space and free space) plus the addition to unmount/eject the device. Clicking on the volume icon will open the device in the filemanager (and mount it if necessary). The module also add a new menu in the E17 main menu.

You can configure the module to automount devices (like usb keys) when attached to the system. Here you can see the menu generated in the E17 main menu:

Download

The module is in the official enlightenment SVN. To get the latest version use the command:

svn co http://svn.enlightenment.org/svn/e/trunk/E-MODULES-EXTRA/places

Todo / Bugs

  • Some usb device take too long to report free size and freeze all for some seconds.
  • Now the module open thunar by default, need a way to select you filemanager.
  • Menu has no icon If no module loaded on the desktop, fixme.
Comment by matteo.b...@gmail.com, Nov 9, 2008

Hi, configure file give me am error: "checking for EDJE... configure: error: Package requirements (edje >= 0.5.0) were not met:

No package 'edje' found" but edje_cc and edje_decc end edje_recc are in my path, qhat do you mean when you say edje? The source code?

Comment by davemds, Nov 10, 2008

Hi Matteo, you need to install the edje-dev package (if you installed E by packages). If you installed by compiling the source that is strange.

Comment by matteo.b...@gmail.com, Nov 10, 2008

I've compiled the svn source of E, but not completely, so i've not compiled all packages, but edje yes... I need to investigate more...

Comment by barbi...@gmail.com, Nov 28, 2008

Dave, I like those things to site at right side of my screen, so it would be better to have a right-aligned version? :-)

Comment by avi.tho...@gmail.com, Nov 28, 2008
Index: src/e_mod_places.c
===================================================================
--- src/e_mod_places.c	(revision 177)
+++ src/e_mod_places.c	(working copy)
@@ -187,7 +187,7 @@
          vol->icon = "modules/places/icon/ipod";
       else if (!strcmp(vol->fstype, "ext3"))
          vol->icon = "modules/places/icon/ext3";
-      else if (!strcmp(vol->fstype, "vfat"))
+      else if (!strcmp(vol->fstype, "vfat") || !strcmp(vol->fstype, "ntfs"))
          vol->icon = "modules/places/icon/vfat";
       else if (!strcmp(vol->fstype, "hfs") || !strcmp(vol->fstype, "hfsplus"))
          vol->icon = "modules/places/icon/hfs";
@@ -330,7 +330,12 @@
       if (vol->mount_point && !strcmp(vol->mount_point, "/")) continue;
 
       mi = e_menu_item_new(em);
-      e_menu_item_label_set(mi, vol->label);
+
+      if ((vol->label) && (vol->label[0] != '\0'))
+         e_menu_item_label_set(mi, vol->label);
+      else
+         e_menu_item_label_set(mi, ecore_file_file_get(vol->mount_point));
+
       e_menu_item_icon_edje_set(mi, theme_file, vol->icon);
       e_menu_item_callback_set(mi, _places_run_fm, (void*)vol->mount_point);
    }

Fixes two small things so that mounted volumes get the same name in the menu as in the gadget if they don't have a label, and show the MS icon for NTFS volumes. It would also be nice to be able to unmount unused partitions :)

Comment by davemds, Nov 28, 2008

barbieri: it's a good idea, if you make a right-aligned edc I will add a new entity in the configuration for set it

Comment by davemds, Nov 28, 2008

thomas: Thanks! in google svn :)

Comment by ast...@gmail.com, Dec 1, 2008

Hi davemds,

I wonder if you would mind putting some theming keywords in your module? (I edited my personal copy, but consider it for other users.) I.e., for each font or font color declaration in "e-module_places.edc" add a text_class and color_class, e.g.:

              text {
                  font: "VeraBd";
                  size: 10;
                  text: "";
                  align: 0.0 0.5;
	          text_class: "module_normal";                  
               }

and

               color: 255 255 255 255;
               color3: 0 0 0 60;
               color_class: "module_label";

That would make your module start to take on fonts, font sizes and text color defined in themes.

Thanks, Andrew

Comment by davemds, Dec 3, 2008

Yeah! It's a good idea! can you provide me a patch? i'm really busy atm.

Comment by ast...@gmail.com, Dec 6, 2008

Yes, I will do it.

Comment by ast...@gmail.com, Dec 7, 2008

Hi Dave,

I just downloaded a copy of places from the e17 svn repo and made a patch for it to include text_class and color_class. Here it is:

--- e-module-places.edc.original        2008-12-07 16:10:27.000000000 -0500
+++ e-module-places.edc 2008-12-07 16:24:20.000000000 -0500
@@ -254,12 +254,13 @@
                rel2.to: "bg";
                color: 255 255 255 255;
                color3: 0 0 0 60;
+               color_class: "module_label";
                text {
                   font: "Sans:style=Bold";
                   size: 10;
                   text: "";
                   align: 0.0 0.5;
-                  
+                  text_class: "module_normal_s";                                  
                }
             }
          }
@@ -274,11 +275,13 @@
                rel2.to: "bg";
                color: 255 255 255 255;
                color3: 0 0 0 60;
+               color_class: "module_label";
                text {
                   font: "Sans";
                   size: 10;
                   text: "";
                   align: 0.0 0.5;
+                  text_class: "module_normal";                            
                }
             }
          }
@@ -291,11 +294,13 @@
                rel2.to: "gauge_bg";
                color: 255 255 255 255;
                color3: 0 0 0 60;
+               color_class: "module_label";
                text {
                   font: "Vera";
                   text: "10%";
                   fit: 0 1;
                   align: 0.5 0.5;
+                  text_class: "module_small";                             
                }
             }
          }
Comment by ast...@gmail.com, Dec 7, 2008

oh, and module_normal_s is the "Normal styled" font class. I did this so you can keep the volume names bold and the rest as regular font.

Comment by davemds, Dec 9, 2008

Thanks astack, this will be in svn on the next commit

Comment by 12ri...@gmail.com, Dec 25, 2008

I can't mount internal volumes (not removable ones) and I look at the "/etc/PolicyKit?/PolicyKit?.conf" but it have not line <match action="org.freedesktop.hal.storage.mount-removable">. I am use Ubuntu 8.10.

Comment by n.hain...@gmail.com, Dec 29, 2008

@ matteo.brichese

I had exactly the same problem when trying to install penguins (I downloaded it from svn and tried to autogen it). Then I noticed that penguins was listed in the packages of easy_e17.sh so I "unskipped" it and it worked with easy_e17.sh

The module "places" isn't in easy_e17.sh for now but if you used this script to install e17, you can try add "places" in the packages variables at the beginning of the script and then rerun it (like ./easy_e17 --only=places). It worked for me. If you used e17-svn (ubuntu repo) to install easy_e17.sh, don't forget to use the option --srcpath=/var/cache to run the "patched" easy_e17.sh after the one from e17-svn.

So the "missing" edje is probably just a matter of path somewhere...

@ 12rithy : Did you try to add the suggested line ? Or maybe you forgot : "Also remember that hal (and places) can't mount/umont volumes listed in /etc/fstab or managed by other automounter (like autofs). " ? You should give more details on the kind of volumes you can't mount to get help.

Comment by deimus...@gmail.com, Jan 22, 2009

hi I install e17 for ubuntu (i have Kubuntu 8.10) with the e17-svn (ubuntu repo) and now use the e17 desktop, I put your module for view and mount external usb-disk with fat32, but when a look the file, the character "Ñ" an the "é" and other dont show correctly, I search for this, and, is because of mount, when mount through dolphin , I see it correctly, but through your module, do not look good, rhombuses symbols appear, Do you know how fix this? greetings

Comment by Aubrey.c...@gmail.com, Feb 5, 2009

Hi, thanks for places. I use it now on all my e17 installs. But running it on recent builds of e17 from svn results in a seq fault or X crash when I try to unload the module via the "Module Settings" dialog. Using "enlightenment_remote -module-unload places" works fine (no crashing).

Comment by davemds, Feb 13, 2009

@deimus999 Yes you spotted a bug. thanks! I have filled an Issue for this http://code.google.com/p/e17mods/issues/detail?id=10

Comment by davemds, Feb 13, 2009

@ Aubrey.conversely I can't reproduce the segfault here. Maybe you have some packages not in sync with svn? evas, edje, e, e_hal, e_dbus, all the e modules??

Comment by jorge.ga...@gmail.com, Feb 26, 2009

Dear davemds,

I think that I have found a bug. I have compiled and installed correctly the places module from svn, because the "places" entry is shown in the menu. But when I try to add the places Gadget in the desktop, it only shows an empty white box, if I click with the right button in this box, the box disappears.

Is there a way to get an error message or a log?

PD: I have compiled from the 39242 rev. of your svn. I am using Ubuntu 8.04.

Test: I have connected an USB Pendrive in my computer, Enlightement detect this and thunar open thi pendrive successfully, but in the "places" menu entry the pendrive it is not shown.

Policykit.conf contents: <?xml version="1.0" encoding="UTF-8"?> <!-- -- XML -- -->

<!DOCTYPE pkconfig PUBLIC "-//freedesktop//DTD PolicyKit? Configuration 1.0//EN" "http://hal.freedesktop.org/releases/PolicyKit/1.0/config.dtd">

<!-- See the manual page PolicyKit?.conf(5) for file format -->

<config version="0.1">

<match user="root">
<return result="yes"/>
</match> <define_admin_auth group="admin"/>

<match action="org.freedesktop.hal.storage.*">
<match user="jorge">
<return result="yes"/>
</match>
</match>

</config>

Comment by carvalho...@gmail.com, Mar 11, 2009

Any idea what I would need to do to make a mounted Truecrypt volume show up in Places module on an Enlightenment E17 desktop? After mounting the volume, it shows up in File Save (As) and File Open dialogs, but not in my File Manager (Thunar), nor in the Places module. My PolicyKit?.conf only had a match user=root statement, so I tried adding the match action statement above on a separate line(<match action="org.freedesktop.hal.storage.*"> </match> , though I didn't have it nested with the Match user statement - does that matter?) and rebooted, but it still didn't show up in Places module. Any thoughts?

Thanks

Comment by widget...@gmail.com, Mar 23, 2009

Hi, I ran into a problem when trying to compile. The configure finishes fine but then it couldn't make because it couldn't find Efreet.h so I add a CPPFLags directive and got by that, but now I have the following error:

In file included from e_mod_main.c:19: /usr/local/include/E_DBus.h:42: error: expected '{' before 'void' /usr/local/include/E_DBus.h:42: error: two or more data types in declaration specifiers

Then a bunch of errors past that.

Comment by Aubrey.c...@gmail.com, Mar 29, 2009

Hi davemds

Thanks for your response about the segfaults - it just went away several revisions later.

I get the impression that e17 trunk is moving quickly and leaving a lot of the places functions orphaned - first the menu item disappeared about a month ago, then volumes stopped mounting via the gadget and a revision yesterday (around 39766, I think) finally killed off the module completely.

Do you intend to continue development in parallel with the svn updates?

I ask because I am looking for an up-to-date and "solid" e17 build to incorporate into a new live CD and would dearly love to use both places and the systray module (which is only working on very recent revisions).

best wishes

Comment by davemds, Mar 29, 2009

Hi Aubrey, I'm working to merge places module in the core efm code. The menu items are now managed directly by E, and all the other places functions will be incorporated soon. The Places module have a short life :)

Comment by Aubrey.c...@gmail.com, Apr 1, 2009

That's great, davemds (integration with efm) - although I really appreciated the gadget's ability to open another file manager! I still find efm to be quite limited for use on a desktop PC compared even to the lightweight FMs like Thunar.

Comment by mister.o...@gmail.com, May 26, 2009

Hi,

first of all kudos for places. It's a really helpfull module for mounting all kind of removable devices, and since supermount is not working any more there haven't been a good replacement...

There's one point imho places can be improved. When I slide over one of non-removable mount points (e.g. '/') places offers me the button to unmount it. When clicking on 'unmount' places throws back a failure message, saying that '/' is not mounted via HAL, thus can't be unmounted by places (which is totally correct behaviour).

So my thought was, if there's a way to check if places can unmount a media, why not perform this check before displaying the media, and if places can't unmount the media don't offer the button to do it. IMHO this is a much more intuitive behaviour.

just my 2cents ;-))

Greetz

Comment by trex2...@gmail.com, Jul 24, 2009

Are there any plans to integrate any mounts, such as network mounts and so on? Would be a very nice to have ;)

Comment by davemds, Jul 27, 2009

Trex2003: Hmmm, how do you mount network volumes? with fuse? Do you know of others mount types? I'm searching for a way to also show fuse volumes, but I also think that Hal should do this work.

Dave

Comment by jorge.ga...@gmail.com, Oct 17, 2009

Dear davemds,

I have got a message error trying to mount a CDROM:

Can't mount device
org.freedesktop.Hal.Device.Volume.PermissionDenied? Device /dev/scd0 is listed in /etc/fstab. Refusing to mount.

Is there a solution to fix this error?

Thank you very much, this module is great!

Comment by davemds, Oct 20, 2009

You just need to remove the cdrom line from the /etc/fstab file, or HAL can't mount it.

Comment by idmitr...@gmail.com, Oct 26, 2010

What is proper way to add HAL mount options for this module? I've tried to make custom fdi

~$ cat /etc/hal/fdi/policy/vfat.fdi 
<?xml version="1.0" encoding="UTF-8"?> 
<deviceinfo version="0.2">
 <device>
  <match key="volume.fstype" string="vfat">
   <merge key="volume.policy.mount_option.iocharset=utf8" type="bool">true</merge>
  </match>
 </device>
</deviceinfo>

but it doesn't work for me.

Comment by Asmaged...@gmail.com, Jun 12, 2011

There is no configure file included, no makefile, no SConstruct file or anything. How do I compile it? ./autogen.sh seems to fail. I have all the libs required installed as far as I know.

Am using ubuntu.

Comment by kingsf...@gmail.com, Aug 4, 2011

To Asmaged...@gmail.com:

I am able to run the ./autogen.sh;make;make install, although this module still unable to mount my external hd.( It kinds of recognized my hd, but reporting the correct size and unable to mount my hd )

Comment by johnywhy, Sep 6, 2011

Hi Dave- When I run configure in the source or root dir, i get bash: configure: command not found. Same with make. Any ideas? I'm running MacPup? http://macpup.org/ which is based on puppy http://puppylinux.com/. Thanks!

Comment by project member d...@gurumeditation.it, Sep 6, 2011

first you need to run autogen.sh: ./autogen.sh ./configure make

Comment by mesonepi...@gmail.com, Sep 28, 2011

mmm... when I run make i get this error:

e_mod_main.c: In function 'places_conf_item_get':
e_mod_main.c:381:29: error: expected expression before 'Config_Item?'

it seems that the error is in this function:

static Config_Item *
_places_conf_item_get(const char *id)
{
   Config_Item *ci;

   GADCON_CLIENT_CONFIG_GET(Config_Item, places_conf->conf_items, _gc_class, id);

   ci = E_NEW(Config_Item, 1);
   ci->id = eina_stringshare_add(id);
   ci->switch2 = 0;
   places_conf->conf_items = eina_list_append(places_conf->conf_items, ci);
   return ci;
}

in particular, the error seems to be in this line:

GADCON_CLIENT_CONFIG_GET(Config_Item?, places_conf->conf_items, gc_class, id);

I tried to substituting Config_Item?? with ci. (Probably it's wrong) The compilation ends correctly, but the module doesn't start.

Comment by mbasti...@gmail.com, Oct 15, 2011

After tried Unity in Ubuntu 11.10, I've immediately moved to E17... It's very usable, fast and light, but it seem it doesn't recognize usb pen and external drivers. So I've tried to compile Places, but the autogen.sh return an error:


... checking for E_DBUS... no configure: error: Package requirements (dbus-1, edbus >= 1.0.999 ) were not met:

Requested 'edbus >= 1.0.999' but version of edbus is 1.0.0

Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix.

Alternatively, you may set the environment variables E_DBUS_CFLAGS and E_DBUS_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.


I've checked Ubuntu repository and I've latest d bus. I'm not so expert in compile from source..can you help me?

Comment by stank...@gmail.com, Dec 18, 2011

you need to install dbus-dev package.

Comment by V.Siz...@gmail.com, Feb 7 (5 days ago)

how to add utf8 support?


Sign in to add a comment
Powered by Google Project Hosting