WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [SOLVED]how to create right click menu entry  (Read 11643 times)

Offline manit123

  • Sr. Member
  • ****
  • Posts: 315
[SOLVED]how to create right click menu entry
« 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 ?


« Last Edit: January 01, 2014, 03:55:31 AM by manit123 »

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: how to create right click menu entry
« Reply #1 on: March 22, 2013, 12:23:24 PM »
Create a freedestop menu item
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11619
Re: how to create right click menu entry
« Reply #2 on: March 22, 2013, 03:00:03 PM »
Hi manit123
Here is a quick example, create the following two files:
sysinfo.desktop
Code: [Select]
[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)
Code: [Select]
[Desktop Entry]
Name=Modules
Exec=aterm -e less /proc/modules
Terminal=false
Type=Application
Categories=Utility;
Copy them to:
Code: [Select]
/usr/local/share/applications/Then execute:
Code: [Select]
desktop.sh sysinfoThis 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?

Offline manit123

  • Sr. Member
  • ****
  • Posts: 315
Re: how to create right click menu entry
« Reply #3 on: March 25, 2013, 01:52:14 AM »
i will try this & report outcome . Thank you.

Offline manit123

  • Sr. Member
  • ****
  • Posts: 315
Re: how to create right click menu entry
« Reply #4 on: March 25, 2013, 09:04:19 AM »
that went well .
I guess I can add more submenus by creating sysinfo~2.desktop .
Now how to remove mistakenly created desktop files ?


Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11619
Re: how to create right click menu entry
« Reply #5 on: March 25, 2013, 10:47:50 AM »
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

Offline manit123

  • Sr. Member
  • ****
  • Posts: 315
Re: how to create right click menu entry
« Reply #6 on: March 28, 2013, 10:54:16 AM »
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 ?

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: how to create right click menu entry
« Reply #7 on: March 28, 2013, 11:03:11 AM »
Unmounting a tcz is difficult . I think . What do you say ?

Correct.  That is why we have .scm.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11619
Re: how to create right click menu entry
« Reply #8 on: March 28, 2013, 11:34:43 AM »
Hi manit123
Quote
Unmounting a tcz is difficult . I think . What do you say ?
Yes it is. Why are you asking?

Offline manit123

  • Sr. Member
  • ****
  • Posts: 315
Re: how to create right click menu entry
« Reply #9 on: March 30, 2013, 10:12:41 AM »
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.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11619
Re: how to create right click menu entry
« Reply #10 on: March 30, 2013, 10:38:41 AM »
Hi manit123
Quote
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.

Offline manit123

  • Sr. Member
  • ****
  • Posts: 315
Re: how to create right click menu entry
« Reply #11 on: April 01, 2013, 10:42:12 AM »
I wanted to unload tcz to save space in RAM .
Can you tell me way to load & unload scm's using command

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11619
Re: how to create right click menu entry
« Reply #12 on: April 01, 2013, 10:55:33 AM »
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.

Offline manit123

  • Sr. Member
  • ****
  • Posts: 315
Re: how to create right click menu entry
« Reply #13 on: April 02, 2013, 02:43:48 AM »
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.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11619
Re: how to create right click menu entry
« Reply #14 on: April 02, 2013, 03:10:09 AM »
Hi manit123
Reading does not wear out a USB stick, only writing does.