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 Tue 02 Sep 2014, 13:21
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
Planning a new user environment (Desktop + applications)
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [10 Posts]  
Author Message
technosaurus


Joined: 18 May 2008
Posts: 4348

PostPosted: Thu 12 Sep 2013, 01:20    Post subject:  Planning a new user environment (Desktop + applications)  

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

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
amigo

Joined: 02 Apr 2007
Posts: 2240

PostPosted: Thu 12 Sep 2013, 04:32    Post subject:  

"unload a sourced shell script" I don't think you can actually unload them, but you can do this:
Code:
func() { echo yeah; }
func
func() { :; }
func
Back to top
View user's profile Send private message 
amigo

Joined: 02 Apr 2007
Posts: 2240

PostPosted: Thu 12 Sep 2013, 04:37    Post subject:  

Oh, wait! I just found it:
Code:
#!/bin/bash

func() {
   echo yeah
}

func

unset -f func

func
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4348

PostPosted: Thu 12 Sep 2013, 05:50    Post subject:  

amigo wrote:
Oh, wait! I just found it:
Code:
#!/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;..."
_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
Karl Godt


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

PostPosted: Thu 12 Sep 2013, 09:55    Post subject:  

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 !!
Back to top
View user's profile Send private message Visit poster's website 
ASRI éducation


Joined: 09 May 2009
Posts: 2417
Location: France

PostPosted: Thu 12 Sep 2013, 12:50    Post subject:  

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 => Association | Forum | Dépôt | Espace kids
Back to top
View user's profile Send private message Visit poster's website 
amigo

Joined: 02 Apr 2007
Posts: 2240

PostPosted: Thu 12 Sep 2013, 13:48    Post subject:  

". 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.
Back to top
View user's profile Send private message 
sunburnt


Joined: 08 Jun 2005
Posts: 5016
Location: Arizona, U.S.A.

PostPosted: Thu 12 Sep 2013, 15:33    Post subject:  

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.
.
Back to top
View user's profile Send private message 
matiasbatero


Joined: 11 Oct 2012
Posts: 60
Location: Mar del Plata, Argentina

PostPosted: Fri 13 Sep 2013, 00:40    Post subject: Excellent  

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
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4348

PostPosted: Sat 14 Sep 2013, 21:50    Post subject:  

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.

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [10 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
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.0696s ][ Queries: 12 (0.0087s) ][ GZIP on ]