Tiny Core Linux
Tiny Core Base => TCB Talk => Topic started by: manit123 on March 22, 2013, 12:20:53 PM
-
i am using tiny core 4.7.3
say , when I install pcmanfm I get file manager entry in application submenu.
How can i create an entry named 'kundli' in that application submenu which when clicked will run a script kept in /home/tc .
Please suggest ?
-
Create a freedestop menu item
-
Hi manit123
Here is a quick example, create the following two files:
sysinfo.desktop
[Desktop Entry]
Name=CPU
Exec=aterm -e less /proc/cpuinfo
Terminal=false
Type=Application
Categories=Utility;
sysinfo~1.desktop (That's a tilde left of the one, not a dash)
[Desktop Entry]
Name=Modules
Exec=aterm -e less /proc/modules
Terminal=false
Type=Application
Categories=Utility;
Copy them to:
/usr/local/share/applications/
Then execute:
desktop.sh sysinfo
This will create a sub menu under Applications called sysinfo. The sub menu will have two entries, CPU and Modules.
Name= is what will appear in the menu. Exec= is the command you wish to execute. I omitted icons in this example.
Take a look at some of the .desktop files in /usr/local/share/applications/ to see how that's done. The Wiki may also help:
http://wiki.tinycorelinux.net/wiki:creating_personal_icons?
-
i will try this & report outcome . Thank you.
-
that went well .
I guess I can add more submenus by creating sysinfo~2.desktop .
Now how to remove mistakenly created desktop files ?
-
Hi manit123
If you create apples.desktop the contents of the Name= field will be listed under Applications
If you create oranges.desktop oranges~1.desktop oranges~2.desktop oranges~3.desktop the contents of their
Name= fields will be listed under Applications->oranges
To remove the oranges~2.desktop entry, delete the /usr/local/share/applications/oranges~2.desktop file, delete
the Name= value it created in /home/tc/.wmx/Applications/oranges, and run desktop.sh oranges
-
Thanks Rich .
It worked .
Now i have my menuitems which load an application on being clicked NOT on startup.
Unmounting a tcz is difficult . I think . What do you say ?
-
Unmounting a tcz is difficult . I think . What do you say ?
Correct. That is why we have .scm.
-
Hi manit123
Unmounting a tcz is difficult . I think . What do you say ?
Yes it is. Why are you asking?
-
I needed wine for my windows xp program .
I have noticed that 'scm-load wine.scm' command did not work . No success or error reported.
Though using mouse clicks I am able to load it .
So currently I am using wine.tcz which works equally good.
But I do not know a way to unmount wine.tcz once the purpose of running windows XP program in current session is served.
-
Hi manit123
But I do not know a way to unmount wine.tcz once the purpose of running windows XP program in current session is served.
Still not sure why you feel you need to unmount it, just exit wine when you are done with it.
-
I wanted to unload tcz to save space in RAM .
Can you tell me way to load & unload scm's using command
-
Hi manit123
Unless you are using the copy2fs mode, you won't really be saving any RAM since the extensions are loop mounted
and not copied to RAM. Sorry, I don't use SCMs, but I'm pretty sure it's been answered in the forum before.
-
so far I have not used copy2fs since I thought extensions were loaded into RAM.
Do you think it would help if I load application into RAM as I am booting from USB stick whose frequent access will wear it . Would not it be nice that all contents from USB drive are read at startup & then USB stick never accessed again in current session. That would help in life of USb stick.
-
Hi manit123
Reading does not wear out a USB stick, only writing does.
-
you mean that loop mounts are read only so usb stick would not deteriorate . Also access to RAM is fast , my computer has 4GB of it . So copy2fs will help me in faster access ?
-
Hi manit123
Actually, the extensions are packaged in a read only file system so they can't be messed up. If you use copy2js, your
boot time will take longer, but applications will start faster.
-
Won't they run fast too considering that they are loaded into RAM whose access time is much faster than USB ?
Also , can you tell me way to have copy2fs flag in boot (I have grub 0.97 ) ?
-
All programs run from RAM. The copy2fs.flg is a file in your tce directory
-
i do not want to pester you .
Can you point me to link explaining copy2fs mode ?
-
you can use the apps gui to set the copy2fs flag:
installation options -> toggle default install to file system flag
This will put a file named copy2fs.flg in your /tce folder and extensions will then be copied to ram
-
Hi manit123
Can you point me to link explaining copy2fs mode ?
Check out the diagrams for mount mode and copy mode found here:
http://wiki.tinycorelinux.net/wiki:tiny_core_file_architecture_diagrams
-
That was wonderful .
As i thought - copy2fs will help my applications like dictionary , word-letter-combination-search-software-for-scrabble to run faster at the expense of longer startup time .
I think if I create an empty copy2fs.flg file in tce folder my usb stick . I will get copy2fs mode . Is that right (why should I bother systemtool>apps for that) ?
The difference I think among the tcz & copy2fs is that - in tcz mode one can see what has been loaded as there will be many loop mounts . In copy2fs mode I won't get so many mountpoints . Isn't it ?
-
Hi manit123
I think if I create an empty copy2fs.flg file in tce folder my usb stick . I will get copy2fs mode . Is that right (why should I bother systemtool>apps for that) ?
Yes, that will work. The tool is suggested because that is one of the functions it provides.
The applications will run just as fast as mount mode. The time from when you start the application until you see
results on the screen will be a lot less (startup time).
-
The applications will run just as fast as mount mode.
Hmm, isn't there a possibility where a mounted app would access squashfs while running (and therefore might be a bit slower, depending on storage medium throughput)?
-
Hi tinypoodle
The executables and libraries will be loaded into and running from RAM. If the application includes a data file in the
squashfs that it routinely opens and reads, that could slow things down a bit, though caching would probably serve
to reduce that.
-
The executables and libraries will be loaded into and running from RAM. If the application includes a data file in the
squashfs that it routinely opens and reads, that could slow things down a bit
Request for clarification please:
1. Is statement referring to squashfs in particular or generally applicable (incl. e.g. uncompressed scatter files)?
2. Is statement referring to compiled code exclusively or generally applicable (incl. e.g. interpreted code)?
though caching would probably serve
to reduce that.
True, but OTOH even in copy2fs mode swapping to disk could lead to decrease speed.
-
Hi tinypoodle
1. The program will be loaded into RAM regardless of how/where it is stored.
2. Compiled code. I don't know how for example ash or a basic interpreter would handle it.
True, but OTOH even in copy2fs mode swapping to disk could lead to decrease speed.
I was referring to if the program routinely read from a data file, those reads would wind up being cached in RAM. If
the program went to read from that file again, it may already have been cached since reads are done in blocks of
4K in think.