Create dsl extension wiki page


Forum: DSL Ideas and Suggestions
Topic: Create dsl extension wiki page
started by: WDef

Posted by WDef on Dec. 15 2007,13:10
This is directed at the community rather than the developers.

I wrote most of the 'creating a dsl extension' wiki page ages ago:

< http://www.damnsmalllinux.org/wiki/index.php/Creating_a_dsl_Extension >

Would someone else care to fill in some of the gaps, such as how to add menu and icons etc?  I thought this would happen but it hasn't

Posted by WDef on Jan. 05 2008,13:37
So much for that.
Posted by mikshaw on Jan. 05 2008,13:54
The desktop icon is potentially [slightly] more complex since the introduction of dfm, and to be honest I haven't even looked at the present mydsl installation process yet. Otherwise I'd have no trouble adding that bit.

The only thing the developer needs to do for a menu item is include /tmp/mydsl.menu/packagename, which contains a single line in the Blackbox format:
[exec] (my menu label) {my command}

Extra work may be required if your package is a window manager that includes desktop icons and/or a menu, but I don't know if that information is needed for a general mydsl page

Posted by roberts on Jan. 05 2008,15:32
To support dfm icons is also very easy:

The only thing that is new (additional) is to make or convert the icon image in home/dsl/.xtdesk and store it as a 32x32 icon in /tmp/mydsl.icons/ext_name.xpm

Posted by stupid_idiot on Jan. 05 2008,15:49
From looking at < the main page >, perhaps we could divide < Creating MyDSL Extensions > into subsections:
e.g.
Compiling software in Linux
Making MyDSL extensions

Most of the information regarding software-compilation could be put in 'Compiling Software in Linux'. ('Compiling Software [...]' could be either a single long article or a section.)
Under 'Making MyDSL extensions', we could have a separate article for each type of extension:
e.g.
Making a .dsl extension
Making a .tar.gz extension
Making a .uci extension
Making a .unc extension

Since most of the information about compiling software is already covered in 'Compiling Software [...]', we only need to describe how to package the various types of extension as well as various things to take note of.
For example:
.dsl: How to install all files to a specified root directory ('make install DESTDIR=<target>') so that it is easier to make the tarball.
.uci: How to use 'mkisofs'; about 'user.tar.gz'; configuring with '--prefix=/opt/<package-name>'.
.unc: How to use 'mkisofs'; about 'user.tar.gz'; how to install all files to a specified root directory ('make install DESTDIR=<target>').

Also: Desktop icon files and MyDSL-menu files are located differently for .dsl/.tar.gz vs .uci/.unc extensions.
For .dsl and .tar.gz, they are included in the .dsl/.tar.gz file itself.
For .uci and .unc, they are put in 'user.tar.gz'.

Posted by kuky on Jan. 06 2008,00:21
can be useful that every mydsl extensions  are explained with integrity and autonomy steep by steep , its not necesary to know my dsl.unc or tar.gz to do a mydsl.uci or viceversa...(the newbies can help but we have a little knowledge and in mosaic).

as mike said

"The only thing the developer needs to do for a menu item is include /tmp/mydsl.menu/packagename, which contains a single line in the Blackbox format:
[exec] (my menu label) {my command}"

if, in dsl in ver 4.x, can drag an drop  of mydsl menu to have a direct acces in desktop  in a first steep and change the image icon in  a second steep  the problem is solved(for a competitive stetic with others distros).?

for to dsl ver 3.x with icontool is solved.

i have made partial ucis (without user.tar.gz) of OOo and , firefox and thunderbird of several Mb in minutes with the explains of the wiki, but to made the first user.tar.gz of 45 kb of a single line for path to mydsl.menu i spent * the 3 latest weks of 07 and the first of 08 with no result...try and error procedure because i dont now to chown pag 205 official book...

* included some time and  patient of the gurus of the forum...

:;):

Posted by stupid_idiot on Jan. 06 2008,06:42
Quote (kuky @ Jan. 06 2008,03:21)
try and error procedure because i dont now to chown pag 205 official book...

(1) To chown a file(s), do:
Code Sample
chown <owner>:<group> [files]
e.g.
Code Sample
chown dsl:staff [files]

(2) Instead of "user:group" (e.g. dsl:staff), we can also use the user/group number. We can see users' user/group numbers in the file '/etc/passwd'.
'/etc/passwd':
Code Sample
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/bin/sh
bin:x:2:2:bin:/bin:/bin/sh
sys:x:3:3:sys:/dev:/bin/sh
sync:x:4:65534:sync:/bin:/bin/sync
lp:x:7:7:lp:/var/spool/lpd:/bin/sh
proxy:x:13:13:proxy:/bin:/bin/sh
nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
sshd:x:101:65534::/var/run/sshd:/bin/false
dsl:x:1001:50:DSL User:/home/dsl:/bin/bash
From the first line: "root" is followed by "0:0.
This mean the user "root" has user number "0" and group number "0".
So for "root", we do:
Code Sample
chown 0:0 [files]
If it is for "dsl", we do:
Code Sample
chown 1001:50 [files]

(3) To chown a directory + all files inside the directory,
use the '-R' option:
Code Sample
chown -R 0:0 [directory]

(4) For MyDSL extensions:
All files in '/home/dsl/' should belong to user "dsl":
Code Sample
chown -R 1005:50 home/dsl/
All files in '/tmp/mydsl.menu/' also should belong to user "dsl":
Code Sample
chown -R 1001:50 tmp/mydsl.menu
Files in all other places should belong to user "root":
Code Sample
chown -R 0:0 [whatever/]

(5) If you use user/group names ("root"/"dsl"... "staff"...), you must always use a colon
(" : "), e.g.
Code Sample
chown dsl:staff [files]
If you use numbers, you can use either a colon (" : ") or a dot/full-stop (" . "),
e.g. both are OK:
Code Sample
chown 1001:50 [files]
chown 1001.50 [files]

Posted by kuky on Jan. 06 2008,12:22
if i understood the general procedure of ucis....?
by example all in ver 4.2.
with emlfm
1) i made the untar firefox20011 of the spanish ver(firefox.2.0.0.11.tar.gz) in opt i add with mydsl gtk2 0705.dsl and run fine (only some warnigs of type translate i think by gtk2.dsl procedures)...

2) i rename  /opt/firefox by opt/esfirefox20011(i put first es to easy find the spanish versions in the repository).


3) i made with beaver /tmp/mydsl.menu/esfirefox20011 with the line

[exec] (esfirefox20011) { /opt/esfirefox20011/firefox}

4) i made a list file with beaver in tmp with the line

tmp/mydsl.menu/esfirefox20011

5) i type in aterm root (how i understand of page 205 of official book)
 
    a) # chown -R 0.0  /opt/
    b) # chown -R 0.0  /tmp/
    c)  # chown -R 1001.50 /home/dsl/
    d)  # chown 1001.50 /tmp/mydsl.menu/esfirefox20011

6) i create the user.tar.gz with

  # tar -C / -T /tmp/list -czvf /opt/esfirefox20011/user.tar.gz

 (its done a user.tar.gz of 50 kb aprox the competence of repository have 6000...)

7)  i make the uci in /opt (emelfm) with

# mkisofs -R -hide-rr esfirefox20011 | create_compressed_fs - 65536 > /tmp/esfirefox20011.uci (and the uci its done after several lines of iso...)

 8) i copy the uci in sda1 and rename the original /opt/esfirefox20011 by /opt/aesfirefox20011(to after test the uci)  and reinice the pc.


  9) i load with mydsl app in local file ...and the uci its loaded in opt/esfirefox20011 but no in menu mydsl .. if i clik in emlf of write in run box, its work fine...

but there is a final tragedy... about 300 millions of spanish people over the world are waiting to share firefox, thunderbird and OOo adapted to dsl.uci (kukydsl proyect....) and its depend in the effort of the gurus of the forum to understand to newbies, pigmalion effect,  and to the emotional inteligence of newbies to  understand  the gurus, and peace in the  conflict phaenomen ingroup-outgroup dsl-ms and newbies-gurus...

thanks stid (i make, with your permision, a change in your nick, a question of autoesteem and public imagen,at the end you are a real person,good and clever person i presume ) i work in your explanations but i think that you solve first the enigma,to me, of dsl menu ...

its funny to writee to dsl proyect and his community...

Posted by Juanito on Jan. 11 2008,12:57
Quote
To support dfm icons is also very easy:

The only thing that is new (additional) is to make or convert the icon image in home/dsl/.xtdesk and store it as a 32x32 icon in /tmp/mydsl.icons/ext_name.xpm


...but what do you do with/where do you put the dsl-4.x equivalent of  /home/dsl/.xtdesk/myapp.lnk? I was using the command entry to pass a LD_LIBRARY_PATH= statement in dsl-3.x

Posted by mikshaw on Jan. 11 2008,15:27
The script /usr/local/bin/shortcuts.lua is run when a mydsl extension is installed. This script creates a dfm icon using the command in /tmp/mydsl.menu/appname. I guess this means that every extension that includes a desktop icon should also include a menu item, which sounds reasonable even for DSL 3.x and earlier.
Posted by stupid_idiot on Jan. 12 2008,10:00
Quote (kuky @ Jan. 06 2008,15:22)
if i understood the general procedure of ucis....?
by example all in ver 4.2.
with emlfm
1) i made the untar firefox20011 of the spanish ver(firefox.2.0.0.11.tar.gz) in opt i add with mydsl gtk2 0705.dsl and run fine (only some warnigs of type translate i think by gtk2.dsl procedures)...
Yes, this is correct.
Quote
2) i rename  /opt/firefox by opt/esfirefox20011(i put first es to easy find the spanish versions in the repository).
Yes, this is OK.
Quote
3) i made with beaver /tmp/mydsl.menu/esfirefox20011 with the line

[exec] (esfirefox20011) { /opt/esfirefox20011/firefox}
Yes, this is correct.
Quote
4) i made a list file with beaver in tmp with the line

tmp/mydsl.menu/esfirefox20011

5) i type in aterm root (how i understand of page 205 of official book)
 
    a) # chown -R 0.0  /opt/
    b) # chown -R 0.0  /tmp/
    c)  # chown -R 1001.50 /home/dsl/
    d)  # chown 1001.50 /tmp/mydsl.menu/esfirefox20011

6) i create the user.tar.gz with

  # tar -C / -T /tmp/list -czvf /opt/esfirefox20011/user.tar.gz

 (its done a user.tar.gz of 50 kb aprox the competence of repository have 6000...)
Yes, this is correct.
Quote
7)  i make the uci in /opt (emelfm) with

# mkisofs -R -hide-rr esfirefox20011 | create_compressed_fs - 65536 > /tmp/esfirefox20011.uci (and the uci its done after several lines of iso...)
Yes, this is correct.
Quote
8) i copy the uci in sda1 and rename the original /opt/esfirefox20011 by /opt/aesfirefox20011(to after test the uci)  and reinice the pc.
Yes, this is OK.
Quote
9) i load with mydsl app in local file ...and the uci its loaded in opt/esfirefox20011 but no in menu mydsl .. if i clik in emlf of write in run box, its work fine...
Everything is already correct.
I don't know why it doesn't work.
Does anyone have any ideas?
Thanks!

Posted by Juanito on Jan. 12 2008,12:37
My understanding of this is that if I want to have to have an extension that works in dsl-3.x and 4.x in terms of icons and menu entries, I need the following files:

/home/dsl/.xtdesktop/myapp.lnk
/home/dsl/.xtdesktop/myapp.png [48x48]
/home/dsl/.xtdesk/myapp.png [32x32]
/tmp/mydsl.menu/myapp

If I do this and include the files above in user.tar.gz, I get the icon and menu item in dsl-3.x but only the menu item in dsl-4.x

I guess I missed something, but what?

Posted by WDef on Jan. 12 2008,13:21
??

I thought Robert said all we needed to do for dsl4+ compatability was add a 32x32 xpm icon to /tmp/mydsl.icons/someicon.xpm ?

Thsi is in addition to the ~/.xtdesktop png and link file, and /tmp/mydsl.menu/myapp

At least, that's what I did for the peazip ucis.  So they work in dsl4+?

Posted by curaga on Jan. 12 2008,13:31
/tmp/mydsl.icons/ext_name.xpm should be the DSL 4.x 32x32 xpm?
Posted by Juanito on Jan. 12 2008,14:31
Thanks - It must have been the typo in the original quote (.xtdesk instead of .xtdesktop) and not reading to the end of the line that threw me off. Using the following, now works in both dsl-3.x and dsl-4.x:

/home/dsl/.xtdesktop/myapp.lnk
/home/dsl/.xtdesktop/myapp.png [48x48]
/tmp/mydsl.menu/myapp
/tmp/mydsl.icons/myapp.xpm [32x32]

Posted by WDef on Jan. 12 2008,15:22
Quote


----------------------------------------------------------------------

/tmp/mydsl.icons/ext_name.xpm should be the DSL 4.x 32x32 xpm


Must be an echo in here.

Posted by curaga on Jan. 12 2008,15:34
Yeah, ain't that strange
Posted by kuky on Jan. 16 2008,21:22
to stid..and curaga
partial success
to make a uci and user.tar.gz are in process..

i think  that the problem was to load gtk2 to run esfirefox...if i make the uci without gtk2 and after load the uci and gtk2 its run fine, in box mydslmenu appears esfirefox2001 but when i run a next time (in hd instalation) its appears twice..

another change is that i use the procedure of the book to make the iso

# cd/opt

# mkisofs -R -hide-rr-moved -cache-inodes -pad esfirefox20011 | create_compressed_fs - 65536 > tmp/esfirefox20011.uci

curaga said that (if i understand)

# mkisofs -R -hide-rr-moved esfirefox20011 | create_compressed_fs - 65536 > /tmp/esfirefox20011.uci

is enought

any sugestion ?

Posted by ^thehatsrule^ on Jan. 17 2008,00:01
Yes, it is enough, as they are used by default under most cases.  You can see the manpage/docs etc. for further info.
Posted by kuky on Jan. 20 2008,11:50
Quote

/home/dsl/.xtdesktop/myapp.lnk
/home/dsl/.xtdesktop/myapp.png [48x48]
/tmp/mydsl.menu/myapp
/tmp/mydsl.icons/myapp.xpm [32x32]


with only line 3 and 4

/tmp/mydsl.menu/myapp
/tmp/mydsl.icons/myapp.xpm [32x32]

and advice to users of dsl 3.xx to make a direct access with icontools its more easy to make the user.tar.gz and no add files unnecessarily in ver 4.xx

howto use imagemagik with no commands, if its possible , can be  
useful to newbies ? a single operation to change file.png to file.xpm can be done with the boxes of imagemagick.uci ?
if its solved can be done a how to make ucis 0-100 to newbies...

Posted by mikshaw on Jan. 20 2008,14:35
Quote
howto use imagemagik with no commands, if its possible , can be useful to newbies ?

The menu enry and desktop icon run the "display" program, which when run without an image filename as a parameter will open a graphical interface. Click on the window to show a menu.

Quote
a single operation to change file.png to file.xpm can be done with the boxes of imagemagick.uci ?

I believe "save as" will allow you to do a simple conversion. You should also be able to do this with Xpaint and Mtpaint, although you'll need to make sure the image uses an indexed color palette before saving as xpm.

Posted by kuky on Jan. 20 2008,17:22
Quote
The menu enry and desktop icon run the "display" program, which when run without an image filename as a parameter will open a graphical interface. Click on the window to show a menu.


i try but no run the boxes edit etc...i can do a icon and clik its appear  a menu but i do not run to edit or save as ...

Quote
You should also be able to do this with Xpaint and Mtpaint


with Mtpaint when display save as ...xpm its does not  appear( resol 800*600) the box its cut ?
with xpaint in old ver < dsl 3.4.8? in cd-rom i change the png to xpm , oowriter icon, it pass of 2000 bytes to 6000 , its OK ? zxgv do no open to its xpm...

Posted by kuky on Jan. 20 2008,17:50
Summary of recent works of kukylabs in doing a uci file with dsl style (menus files and user.tar.gz) with no sucess..

1) i made the untar firefox20011 of the spanish ver(firefox.2.0.0.11.tar.gz) in opt i add with mydsl gtk2 0705.dsl and run fine (only some warnigs of type translate i think by gtk2.dsl procedures)...

2) i rename  /opt/firefox by opt/esfirefox20011(i put first es to easy find the spanish versions in the repository).


3) i made with beaver /tmp/mydsl.menu/esfirefox20011 with the line

[exec] (esfirefox20011) { /opt/esfirefox20011/firefox}

copy a icon esfirefox20011.xpm to /tmp/mydsl.icons/esfirefox20011.xpm
(the xpm is the result of convert with xpaint icon.png to icon.xpm)
( i no made lnk and icon to .xdesktop to ver 3.xx)

4) i made a list file with beaver in tmp with the lines

/tmp/mydsl.menu/esfirefox20011
/tmp/mydsl.icons/esfirefox20011.xpm
( i no made lines to lnk and icon in .xdesktop to ver 3.xx)

5) i type in aterm root (how i understand of page 205 of official book)

   a) # chown -R 0.0  /opt/
   b) # chown -R 0.0  /tmp/
   c)  # chown -R 1001.50 /home/dsl/
   d)  # chown 1001.50 /tmp/mydsl.menu/esfirefox20011
   e) # chown 1001.50 /tmp/mydsl.icons/esfirefox20011.xpm

6) i create the user.tar.gz with

 # tar -C / -T /tmp/list -czvf /opt/esfirefox20011/user.tar.gz

(its done a user.tar.gz of 50 kb )

7)  i make the uci in /opt (emelfm) with

# mkisofs -R -hide-rr-moved  esfirefox20011 | create_compressed_fs - 65536 > /tmp/esfirefox20011.uci (and the uci its done after several lines of iso...)

8) test the uci (a or b).

a) i copy the uci in sda1 and rename the original /opt/esfirefox20011 by /opt/aesfirefox20011 and do the same in tmp / mydsl.menu/ and tmp/ mydsl.icons/  and reinice the pc.

b) run the dsl iso-cd and with mydsl app run the uci

 9)  ...and the uci its loaded in opt/esfirefox20011 but no in menu mydsl .. if i clik in emlf of write in run box, its work fine...


WHO IS WRONG....กกก

any can reproduce the steeps to know where is the problem...

thanks

pdta with OOo2.30 in spanish ver the same... i will take  Vacations for a while...

Posted by roberts on Jan. 20 2008,18:07
kuky, before you go on vacation, please send me your extension. I will open it up and take a look.
Posted by kuky on Jan. 25 2008,23:32
Solved

The strange case of the kuky ucis was solved by C.S.I Roberts seeing the body of the victim send by sendspace...


"That add a line in white before line [exec] in the steep 3"

Quote
3) i made with beaver /tmp/mydsl.menu/esfirefox20011 with the line
* line in white*
[exec] (esfirefox20011) { /opt/esfirefox20011/firefox}



thanks roberts

If some guru validates the procedure of 9  steps to obtain an uci, who writes it in the wiki ...

some work its needed in steeps 3, 4 to add files .lnk and icon to ver 3.xx

:p  :p  :p

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.