Planning a new user environment (Desktop + applications)

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

Planning a new user environment (Desktop + applications)

#1 Post by technosaurus »

So, I've been using tiny distros for a while and even started to write my own desktop environment helpers (jwm_tools - menu generator and helpers, sit - tray applets, sdesk - tray apps plus desktop, gtkbox - a glade based gtkdialog alternative, sdialog - alternative to yad/zenity and many gtkdialog apps and patches for Rox-Filer, Geany, mtpaint and many other gtk apps)

Over time I have accumulated a bit of working knowledge on how programs (specifically gtk apps) can interact AND be light on resources.

Here are the things I have learned about gtk2/3 that can be used to create a user environment capable of running on ultra constrained systems:

1. gtkbuilder files are not limited to 1 - you can load as many as you want for as many applications as you want from a single process ... 1 gtk process for all gtk GUIS (see my patch in gtkdialog dev thread for an incomplete example)

2. glib modules can be loaded/unloaded on the fly, so each running app can have its control functions loaded before loading the gtkbuilder UI and unloaded on close (examples - TODO) ... the same can be said for shell functions, though I haven't figured out how to unload a sourced shell script.

3. gtk/glib (actually gio) can monitor directories for changes and perform actions on those files based on the event type ... guess what, these can be gtkbuilder files, plugin modules, shell functions, images etc...

4. Glade defaults to generic widget names which could interfere with each other, so we'd need to patch it to prefix names with the project name or do so manually to prevent namespace conflicts.

5. It is possible to use the above to have a lightweight daemon that handles the most common aspects of a user environment that has relatively low entry barrier to new programmers.

6. As long as we are starting from scratch, may as well add interoperability with gnome/kde/pcmanfm/etc... such as $HOME/Desktop and other standards.freedesktop.org and jwm currently provides a lot of the framework as a stop gap
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#2 Post by amigo »

"unload a sourced shell script" I don't think you can actually unload them, but you can do this:

Code: Select all

func() { echo yeah; }
func 
func() { :; } 
func

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#3 Post by amigo »

Oh, wait! I just found it:

Code: Select all

#!/bin/bash

func() {
	echo yeah
}

func

unset -f func

func

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#4 Post by technosaurus »

amigo wrote:Oh, wait! I just found it:

Code: Select all

#!/bin/bash

func() {
	echo yeah
}

func

unset -f func

func
does that do anything to reduce the memory usage, seems like it would unless the original remains mapped ... I am thinking of how gtkdialog does this with system(command) where command is ". func_file;..."
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#5 Post by Karl Godt »

technosaurus , You Are The Only One Here That Can Do !

I read and would like to help , but *really* would need literature about Gtk and such all that to try to catch up !

Cheers !
And Good Luck !!

User avatar
ASRI éducation
Posts: 3197
Joined: Sat 09 May 2009, 12:10
Location: France
Contact:

#6 Post by ASRI éducation »

Karl Godt wrote:technosaurus , You Are The Only One Here That Can Do !

I read and would like to help , but *really* would need literature about Gtk and such all that to try to catch up !

Cheers !
And Good Luck !!
Hello technosaurus.
I really appreciate the quality of your work and your desire to create a lightweight and efficient environment.
As Karl Godt, I feel that only few contributors will be able to help you in this area.
Cordialement,
Projet ASRI éducation => [url=http://asri-education.org/]Association[/url] | [url=http://forum.asri-education.org/]Forum[/url] | [url=http://dl01.asri-education.org/]Dépôt[/url] | [url=http://kids.asri-education.org/]Espace kids[/url]

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#7 Post by amigo »

". func_file" -you'd need to go through a list of the functions and unset each one. I'm pretty sure the shell would free that space.

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#8 Post by sunburnt »

The GTK part sounds like better O.S. / desktop management of GUI apps.

And yes to standards...

Some of Puppy seems to be moving toward Ubuntu as a base parent O.S.
Debian may be a better choice, but Ubuntu has some interesting irons in it`s fire.
.

User avatar
matiasbatero
Posts: 60
Joined: Fri 12 Oct 2012, 01:27
Location: Mar del Plata, Argentina

Excellent

#9 Post by matiasbatero »

This is really.. GOOD. What a project! GTK3 Ligthweight DE.. brillant.
I'm sure that your software will be very good in perfomance. You're very good on that point.. and it's very important that new develops have that concept. Now PC are more powerfull, but.. a lot of current software drops a lot of resources. Developers forget this aspect.

PD: Today is : Programmer's Day! 13/9

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#10 Post by technosaurus »

I started the sdesk (need a better name) rewrite here:
https://github.com/technosaurus/sdesk
It probably won't even compile at this state since I am just writing it directly on github as I think of stuff.
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

Post Reply