Rewriting pup_event in C

What features/apps/bugfixes needed in a future Puppy
Message
Author
akash_rawal
Posts: 229
Joined: Wed 25 Aug 2010, 15:38
Location: ISM Dhanbad, Jharkhand, India

#91 Post by akash_rawal »

Well I got the problem.

The problem was that environment variable LD_LIBRARY_PATH wasn't set.

And what's worse is that pup-volume-monitor uses LD_LIBRARY_PATH to search for its plugins. That means the cdrom plugin simply wasn't loaded!

The fix is simple then. Just set LD_LIBRARY_PATH variable.
Last edited by akash_rawal on Fri 08 Jun 2012, 15:33, edited 1 time in total.

akash_rawal
Posts: 229
Joined: Wed 25 Aug 2010, 15:38
Location: ISM Dhanbad, Jharkhand, India

#92 Post by akash_rawal »

jamesbond wrote:
Optical drives are detected by iterating over each device in /sys/block, testing each device whether it's an optical drive.
How do you do the test?
The mechanism is translated from /lib/udev/rules.d/50-udev-default.rules.

Code: Select all

# cdrom
SUBSYSTEM=="block", KERNEL=="sr[0-9]*", SYMLINK+="scd%n", GROUP="cdrom"
SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="4|5", GROUP="cdrom"
KERNEL=="pktcdvd[0-9]*", GROUP="cdrom"
KERNEL=="pktcdvd", GROUP="cdrom"

Code: Select all

gboolean pup_drive_test_optical(struct udev_device *dev)
{
	gboolean result = FALSE;

	if (strstr(udev_device_get_sysname(dev), "sr")
	    || strstr(udev_device_get_sysname(dev), "pktcdvd"))
		result = TRUE;

	if (!result)
	{
		const gchar *type = udev_device_get_sysattr_value(dev, "device/type");
		if (type)
		{
			if ((type[0] == '4') || (type[0] == '5'))
				result = TRUE;
		}
	}

	return result;
}

akash_rawal
Posts: 229
Joined: Wed 25 Aug 2010, 15:38
Location: ISM Dhanbad, Jharkhand, India

#93 Post by akash_rawal »

I hope now pup-volume-monitor is stable enough to move it to additional software section?

http://www.murga-linux.com/puppy/viewtopic.php?t=78881

akash_rawal
Posts: 229
Joined: Wed 25 Aug 2010, 15:38
Location: ISM Dhanbad, Jharkhand, India

#94 Post by akash_rawal »

I quickly wrote an implementation for desktop drive icons for desktops that do not support them. It uses GIO.

Image

It can be configured to stick to a corner of the screen, align icons vertically, change font colors, etc. Settings take effect immediately.

Icons look like rox-filer icons for a while, till you move mouse pointer over it.

Could anyone package this, I myself am running out of time. My school will be reopening next week and I have to rush through my holiday hw for summer vacations before that. :(
Attachments
desktop_drive_icons-0.0.1.tar.gz
(124.61 KiB) Downloaded 500 times

User avatar
recobayu
Posts: 387
Joined: Wed 15 Sep 2010, 22:48
Location: indonesia

#95 Post by recobayu »

this is very nice drive icon. the labels are very helpful because i prefer look at the label than sda3 or sda4 like that. can anyone compile that in lupu, dpup, or slacko? i tried to compile myself but didn't result anything.

Code: Select all

./configure
make
make install
but nothing happened.
thank you.

akash_rawal
Posts: 229
Joined: Wed 25 Aug 2010, 15:38
Location: ISM Dhanbad, Jharkhand, India

#96 Post by akash_rawal »

Run this:

Code: Select all

desktop_drive_icons
after installing.

User avatar
MinHundHettePerro
Posts: 852
Joined: Thu 05 Feb 2009, 22:22
Location: SE

#97 Post by MinHundHettePerro »

Hello :)!

I must be a bit on the daft side :oops:

However I compile and run it, I get

Code: Select all

# desktop_drive_icons 
** Message: Config file not found
^C
# 
Where should I put the what-named config file - and what should the contents be?

Cheers /MHHP
[color=green]Celeron 2.8 GHz, 1 GB, i82845, many ptns, modes 12, 13
Dual Xeon 3.2 GHz, 1 GB, nvidia quadro nvs 285[/color]
Slackos & 214X, ... and Q6xx
[color=darkred]Nämen, vaf....[/color] [color=green]ln -s /dev/null MHHP[/color]

akash_rawal
Posts: 229
Joined: Wed 25 Aug 2010, 15:38
Location: ISM Dhanbad, Jharkhand, India

#98 Post by akash_rawal »

MinHundHettePerro wrote:Hello :)!

I must be a bit on the daft side :oops:

However I compile and run it, I get

Code: Select all

# desktop_drive_icons 
** Message: Config file not found
^C
# 
Where should I put the what-named config file - and what should the contents be?

Cheers /MHHP
You don't need to worry about it at all. Desktop-drivre-icons will automatically generate it when you change a setting.

akash_rawal
Posts: 229
Joined: Wed 25 Aug 2010, 15:38
Location: ISM Dhanbad, Jharkhand, India

#99 Post by akash_rawal »

Desktop-drive-icons has been moved here : http://www.murga-linux.com/puppy/viewto ... 792#632792.

Post Reply