Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun 20 Apr 2014, 17:05
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
Lighweight pup_event_frontend_d Replacement
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 2 of 3 [40 Posts]   Goto page: Previous 1, 2, 3 Next
Author Message
Karl Godt


Joined: 20 Jun 2010
Posts: 3860
Location: Kiel,Germany

PostPosted: Mon 27 May 2013, 14:45    Post subject:  

first snap as frontend?d renamed fronend?d.sh and part-what cp as /sbin/pup_event_frontgend_d, restarted new udevd, restarted X, plugged in sd card in usb-reader .

Nice. probably let it be as it is . Needs the add part of rc.sysinit to show internal drives I guess.
part-what.jpg
 Description   
 Filesize   21.19 KB
 Viewed   555 Time(s)

part-what.jpg


_________________
«Give me GUI or Death» -- I give you [[Xx]term[inal]] [[Cc]on[s][ole]] .
Macpup user since 2010 on full installations.
People who want problems with Puppy boot frugal Razz
Back to top
View user's profile Send private message Visit poster's website 
Karl Godt


Joined: 20 Jun 2010
Posts: 3860
Location: Kiel,Germany

PostPosted: Mon 27 May 2013, 16:38    Post subject:  

myself wrote:
Needs the add part of rc.sysinit to show internal drives I guess.

Nope,
did not work ( kernel 2.6.30.5 ) to trigger pdeskdrived which I think would be a good name for part-hotplug-handler to show all internal and external drives .

For now it is a partial drive handler .

_________________
«Give me GUI or Death» -- I give you [[Xx]term[inal]] [[Cc]on[s][ole]] .
Macpup user since 2010 on full installations.
People who want problems with Puppy boot frugal Razz
Back to top
View user's profile Send private message Visit poster's website 
musher0


Joined: 04 Jan 2009
Posts: 3802
Location: Gatineau (Qc), Canada

PostPosted: Mon 27 May 2013, 23:27    Post subject:  

Hi, iguleder.

Where do these utilities go? Alternately, would a *.pet be useful?

Thanks in advance and best regards.

musher0

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
jamesbond

Joined: 26 Feb 2007
Posts: 1876
Location: The Blue Marble

PostPosted: Tue 28 May 2013, 02:46    Post subject:  

Karl Godt wrote:
myself wrote:
Needs the add part of rc.sysinit to show internal drives I guess.

Nope,
did not work ( kernel 2.6.30.5 ) to trigger pdeskdrived which I think would be a good name for part-hotplug-handler to show all internal and external drives .

For now it is a partial drive handler .

Run this after you run the handler. You should get all the internal drives displayed.

Code:
for p in $(ls /sys/class/block | grep -Ev ^ram|^loop); do
udevadm trigger --action=add --sysname-match=$p
done

_________________
Fatdog64, Slacko and Puppeee user. Puppy user since 2.13
Back to top
View user's profile Send private message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3860
Location: Kiel,Germany

PostPosted: Tue 28 May 2013, 09:02    Post subject:  

142 complains about trigger: unrecognized option `--sysname-match='

what works is something like udevadm trigger /block/sda

Looking good so far . Just needs the Icons Smile
udevadm_trigger.jpg
 Description   
 Filesize   35.92 KB
 Viewed   476 Time(s)

udevadm_trigger.jpg

Back to top
View user's profile Send private message Visit poster's website 
jamesbond

Joined: 26 Feb 2007
Posts: 1876
Location: The Blue Marble

PostPosted: Wed 29 May 2013, 13:38    Post subject:  

Karl Godt wrote:
142 complains about trigger: unrecognized option `--sysname-match='
Your udev must be of an older version. I tried to google to find the equivalent options for older udev, but it seems that all those options have been eradicated. What is your udev version? Perhaps we can figure it out by looking at the source (assuming the source is still available from kernel.org).

Quote:
what works is something like udevadm trigger /block/sda
That's not good because without the correct command line, udev will issue "change" event to *ALL* devices.

Quote:
Looking good so far . Just needs the Icons Smile
Smile
_________________
Fatdog64, Slacko and Puppeee user. Puppy user since 2.13
Back to top
View user's profile Send private message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3860
Location: Kiel,Germany

PostPosted: Thu 30 May 2013, 04:35    Post subject:  

kernel.org became a scattered pile of dung since the attack some two years ago ( patch* es missing ) and now they out-source files as it seems .

From memory I knew there had been problems to compile udev between 140 and 150 on Pup-43* .

151 gives me

1) configure:12380: error: gperf is needed
2) --disable-extras > Package gobject-introspection-1.0 was not found in the pkg-config search path.
3) configure:12565: error: libacl not found

Quote:
Your udev must be of an older version

Quote:
142

Quote:
That's not good

But funny Wink

Puppy Lupu 5 has udevd --version 124 as it seems. Still runs well also on my machines.

Quote:
Just needs the Icons Smile

Turns out to be a horror. Since
<Path>/sbin/mount-and-open</Path>
is everywhere the same, rox's globicons file seems to pick one icon for mounted, mounted_boot and unmounted .
un Cool

_________________
«Give me GUI or Death» -- I give you [[Xx]term[inal]] [[Cc]on[s][ole]] .
Macpup user since 2010 on full installations.
People who want problems with Puppy boot frugal Razz
Back to top
View user's profile Send private message Visit poster's website 
mavrothal


Joined: 24 Aug 2009
Posts: 1385

PostPosted: Thu 30 May 2013, 06:43    Post subject:  

Karl Godt wrote:

1) configure:12380: error: gperf is needed
2) --disable-extras > Package gobject-introspection-1.0 was not found in the pkg-config search path.
3) configure:12565: error: libacl not found


You can not compile udev with acl/xattr support in frugal installs.
Aufs does not support acl/xattr. You must have either a full puppy install (one of the reasons that BK usually compiles from full installs) or compile udev without acl support.

_________________
Kids all over the world go around with an XO laptop. They deserve one puppy (or many) too Very Happy
Back to top
View user's profile Send private message 
Iguleder


Joined: 11 Aug 2009
Posts: 1775
Location: Israel, somewhere in the beautiful desert

PostPosted: Thu 30 May 2013, 14:24    Post subject:  

musher0 wrote:
Where do these utilities go? Alternately, would a *.pet be useful?


Just put everything in /usr/bin,

If I find the time, I'll fix the icon and placement issues, then make a PET.

_________________
My homepage
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
ICQ Number 
charlie6

Joined: 30 Jun 2008
Posts: 937
Location: South of Belgium

PostPosted: Fri 31 May 2013, 00:37    Post subject:  

Hi Iguleder,
(running wheez-3.5.2.5)
also thanks for your time doing all this, as also to other contributors !

I got a try on these part-hotplug-handler.tar.bz2 but it seems not yet solve the following:

Here using several USB memory plugs, and external hard disk disk, to save datas, lets call them sdb1, sdc1, sdd1 to 10. All plugged into a 4 ports USB hub.
Some daily used apps (textprocessor, spreadsheet, etc...) keep tracks of the recent used files.
I am using those trasks as hints to get a fast access to my datas.

Sometimes i have to unplug one of them - for instance sdc1 - (after having unmounted it... Wink ), and aftrwds to plug another one, and aftrwds, to re-plugs the former.

This last one is no longer named sdc1, but sde1 instead. Sometimes all USB drive icons switch off, and redisplay whith names like sde1, sdf1, sdg1 ...

The only workaround to get back to sdb1, sdc1, sdd1 ... configuration is ... to shutdown the PC and reboot. Restart X does NOT help.

I have browsed across the forum since months (even years...) whithout finding how to fix this nor understanding what could explain this.

I figure out this is as if the initial USB keys names where stored somewhere ... without resetting upon unplugging.

Having installed and compiled part-hotplug-handler, a possible workaround i found:
when opened Rox file manager to /mnt, all mounted drives are displayed with a green dot.
Some already unplugged USB plugs still display with a green dot (YESSS ... Shocked ! ) as if they were currently plugged Shocked ! Right clicking on them and unmounting them result in a kind of reset of the , let's call it so, «usb-plugs-map».

Thanks again for any answer, Charlie
Back to top
View user's profile Send private message 
Iguleder


Joined: 11 Aug 2009
Posts: 1775
Location: Israel, somewhere in the beautiful desert

PostPosted: Fri 31 May 2013, 10:51    Post subject:  

You'll have to configure udev, so it uses persistent device names. Take a look at /etc/udev.
_________________
My homepage
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
ICQ Number 
charlie6

Joined: 30 Jun 2008
Posts: 937
Location: South of Belgium

PostPosted: Fri 31 May 2013, 11:58    Post subject:  

Thanks Iguleder,
Iguleder wrote:
You'll have to configure udev, so it uses persistent device names. Take a look at /etc/udev.

how can one configure udev? Here /etc/udev is a folder which has udev.conf and udev.rules in it.

I again got a try using part-hotplug-handler putting it in /usr/bin (with pup_event_frontend_d just disabled).
Got the following comments in terminal:
./part-hotplug-handler seems hanging up till i do Ctrl-c to stop it.
./mount-and-open can't find /mnt/ in /etc/fstab or /etc/mtab
Quote:
sh-3.00# ./part-hotplug-handler
^C
sh-3.00# ./part-hotplug-handler --help
^C
sh-3.00# ldd part-hotplug-handler
linux-gate.so.1 => (0xffffe000)
libudev.so.0 => /lib/libudev.so.0 (0xb7755000)
libc.so.6 => /lib/libc.so.6 (0xb7607000)
librt.so.1 => /lib/librt.so.1 (0xb75fd000)
/lib/ld-linux.so.2 (0xb7765000)
libpthread.so.0 => /lib/libpthread.so.0 (0xb75e4000)
sh-3.00# ./part-icon
sh-3.00# ./mount-and-open
BusyBox v1.19.3 (2011-11-09 07:34:50 WST) multi-call binary.

Usage: basename FILE [SUFFIX]

Strip directory path and .SUFFIX from FILE


mount: can't find /mnt/ in /etc/fstab or /etc/mtab
sh-3.00#


Moreover, or, as a consequence, i don't get any icon on desktop.
Back to top
View user's profile Send private message 
jamesbond

Joined: 26 Feb 2007
Posts: 1876
Location: The Blue Marble

PostPosted: Fri 31 May 2013, 14:04    Post subject:  

Karl Godt wrote:
jamesbond wrote:
Your udev must be of an older version

Karl wrote:
142

You don't need to re-compile that, I just want to grab the source so I can see what options are provided by that particular version. Yes, your udev is way too old - 142 doesn't support triggering by device names (or any subset of devices, unless you already know what you're looking for - yuck!), so all you can do is to re-trigger the events like this:
Code:
udevadm trigger --action=add
or may be try
Code:
udevadm trigger --action=change
and see if Iggy's code works. From here, you need to add your own filter in part-icon so only relevant block devices got shown (e.g. no loops, no rams, no nbds, no other virtual block device stuff).

Karl wrote:
Quote:
Just needs the Icons Smile

Turns out to be a horror. Since
<Path>/sbin/mount-and-open</Path>
is everywhere the same, rox's globicons file seems to pick one icon for mounted, mounted_boot and unmounted .
uncool Sad
That can be fixed in many ways, we can create symlink, or we can create rox apps, etc, again the fix is in part-icon.

I will leave that as an exercise for the reader Twisted Evil

charlie6 wrote:
I have browsed across the forum since months (even years...) whithout finding how to fix this nor understanding what could explain this.
This is old, but the principle is still the same: http://www.reactivated.net/writing_udev_rules.html.
_________________
Fatdog64, Slacko and Puppeee user. Puppy user since 2.13
Back to top
View user's profile Send private message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3860
Location: Kiel,Germany

PostPosted: Fri 31 May 2013, 16:30    Post subject:  

http://lmgtfy.com/?q=udev-142
Mr. Green

Neverteheless have compiled udev-151

./configure --bindir=/bin --sbindir=/sbin --libexecdir=/usr/libexec --sysconfdir=/etc --localstatedir=/var --libdir=/lib --includedir=/usr/include --datarootdir=/usr/share --disable-introspection

successfully on Macpup511 in frugal mode with aufs layerfs , which had libacl ( or 511 devx ) .

udev-151 has --sysname-match parameter Smile

Will have to recompile it with --libexecdir=/etc/udev Confused .

udev-130 series defaults to /usr/local :IIRC:
udev-140 series defaults to / with the --sysconfdir=/usr/etc :Quite Ok:
udev-150 series defaults to /usr Twisted Evil

Was always wondering about the
if [ $UDEVVER -gt 150 ];then
#100611 v151 is recommended for kernel 2.6.27+.
lines in rc.sysinit
and found only version 124p420, 136w5 and 167w5 in the quirky/wary/puppy repos on ibiblio .
Back to top
View user's profile Send private message Visit poster's website 
Iguleder


Joined: 11 Aug 2009
Posts: 1775
Location: Israel, somewhere in the beautiful desert

PostPosted: Sat 01 Jun 2013, 07:09    Post subject:  

Guys - I created a Git repository for this project and cleaned it up a bit. Pull requests are appreciated, as long as the coding style is fine and the changes are tested.

The handler process doesn't create desktop icons - it mounts and runs the file manager instead. This is a Puppy modification we'll have to add.

akash_rawal - it seems select() is needed. udev_monitor_receive_device() does not block.

EDIT: it's pretty cool! Install the code in the repository and put the following in your .jwmrc:
Code:
<StartupCommand>part-hotplug-monitor</StartupCommand>

Automatic mounting and unmounting works perfectly, although it could be insecure (if regular users are allowed to mount and unmount).

_________________
My homepage
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
ICQ Number 
Display posts from previous:   Sort by:   
Page 2 of 3 [40 Posts]   Goto page: Previous 1, 2, 3 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0949s ][ Queries: 12 (0.0083s) ][ GZIP on ]