Planning a new user environment (Desktop + applications)
- technosaurus
- Posts: 4853
- Joined: Mon 19 May 2008, 01:24
- Location: Blue Springs, MO
- Contact:
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
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].
"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
Oh, wait! I just found it:
Code: Select all
#!/bin/bash
func() {
echo yeah
}
func
unset -f func
func
- technosaurus
- Posts: 4853
- Joined: Mon 19 May 2008, 01:24
- Location: Blue Springs, MO
- Contact:
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;..."amigo wrote:Oh, wait! I just found it:Code: Select all
#!/bin/bash func() { echo yeah } func unset -f func func
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].
- ASRI éducation
- Posts: 3197
- Joined: Sat 09 May 2009, 12:10
- Location: France
- Contact:
Hello technosaurus.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 !!
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]
- matiasbatero
- Posts: 60
- Joined: Fri 12 Oct 2012, 01:27
- Location: Mar del Plata, Argentina
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
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
- technosaurus
- Posts: 4853
- Joined: Mon 19 May 2008, 01:24
- Location: Blue Springs, MO
- Contact:
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.
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].