Tiny Core Linux

Tiny Core Base => TCB Q&A Forum => Topic started by: hoogenboom on April 25, 2016, 10:14:43 AM

Title: Remove SystemTools and Applications from click menu
Post by: hoogenboom on April 25, 2016, 10:14:43 AM
Hello, I'm trying to remove SystemTools and Applications from the click menu. I've followed this post below exactly as far as I can tell. The only thing that happens when I reboot is the /home/tc/.mymenu/.wmx file disappears and the /home/tc/.wmx remains or is rebuilt. It's almost like my /opt/bootlocal.sh isn't running. I've tried putting sudo in front of those commands as well. I understand that JWM can do this with ease but I'm working with a 32MB CF card and cant spare any more space.

Thank you!

The menu is in /home/tc/.wmx

One way to change the menu is:

Copy .wmx to another directory.

For example, lets use /home/tc/.mymenu.

So you have a copy of the menu in /home/tc/.mymenu/.wmx

In /home/tc/.mymenu/.wmx delete System Tools, or make any other changes.

Add the following to /opt/bootlocal.sh

Quote
mv /home/tc/.wmx /home/tc/.wmx_old
cp -r /home/tc/.mymenu/.wmx /home/tc/.wmx

When you start the computer, you should have the menu as you set it up in /home/tc/.mymenu/.wmx.

Keep in mind, if you install additional apps, or make changes to On Boot or On Demand, you need to set up the menu again.


To remove it properly, you can do a remaster.
Title: Re: Remove SystemTools and Applications from click menu
Post by: gerald_clark on April 25, 2016, 10:29:48 AM
Either you forgot to do a backup before rebooting or you or you don't have a persistent tce directory.
Title: Re: Remove SystemTools and Applications from click menu
Post by: Misalf on April 25, 2016, 10:34:21 AM
Maybe this helps
http://forum.tinycorelinux.net/index.php?topic=16417.0

Title: Re: Remove SystemTools and Applications from click menu
Post by: hoogenboom on April 25, 2016, 10:40:44 AM
I verified that the "Backup" is selected when I reboot. Also, the /home/tc/.mymenu directory persists. I tried just having

#!bin/sh
mv /home/tc/.wmx /home/tc/.wmx_old

in the /opt/bootlocal.sh with sudo and without sudo. Not even that runs. Checking out that link from Misalf now.
Title: Re: Remove SystemTools and Applications from click menu
Post by: Misalf on April 25, 2016, 10:55:16 AM
BTW,  sudo  is not needed inside  bootsync.sh  and  bootlocal.sh  as those run with root privileges.
Title: Re: Remove SystemTools and Applications from click menu
Post by: Misalf on April 25, 2016, 11:01:57 AM
Just thinking, doing stuff with user files from within  /opt/boot*.sh  may lead to permission issues?
In that case this might help:
Code: [Select]
TCUSER="$(cat /etc/sysconfig/tcuser)"
su "$TCUSER" -c "cp -r /home/$TCUSER/.mymenu/.wmx /home/$TCUSER/.wmx"
Title: Re: Remove SystemTools and Applications from click menu
Post by: hoogenboom on April 25, 2016, 11:31:18 AM
Well, I'm almost there. I took a different approach. First I backed up the old menu by running

Code: [Select]
cp -r /home/tc/.wmx /home/tc/.wmx_old
Then, in .X.d/ ran

Code: [Select]
echo "rm -rf /home/tc/.wmx/SystemTools /home/tc/.wmx/Applications/ &" > lockdown
Brutal but it worked! Now to remove that pesky "New xterm" from the click menu  ::)
Title: Re: Remove SystemTools and Applications from click menu
Post by: Misalf on April 25, 2016, 11:34:29 AM
I don't get why you're using  sudo ?
Title: Re: Remove SystemTools and Applications from click menu
Post by: hoogenboom on April 25, 2016, 11:52:58 AM
Bad habit I suppose  :o Removed it!
Title: Re: Remove SystemTools and Applications from click menu
Post by: curaga on April 25, 2016, 01:44:16 PM
"#!bin/sh"

If that was a straight copy-paste, the header was wrong.
Title: Re: Remove SystemTools and Applications from click menu
Post by: hoogenboom on April 25, 2016, 02:17:16 PM
Nah it wasn't copy/paste. I'm using VNC because openssh was too big :) I'm not getting a lot of hits on my last problem though. I'd like to remove, break, or password protect the "New xterm" on the menu. Without uninstalling aterm as its my only means of administration.

(http://i65.tinypic.com/2uyi2o2.jpg)

I think maro is touching on it here

Hmm, I'm not quite sure if the following is what the OP had in mind for FLWM, but rm -rf ~/.wmx is a "most brutal" way to "get rid" of pretty much all FLWM menu entries.

Now to re-establish the "SystemTools" one could use flwm_topside_initmenu and to get the menu entries of all installed extensions back I'd try my luck with: ls /usr/local/tce.installed | xargs -n 1 flwm_topside_makemenu
Title: Re: Remove SystemTools and Applications from click menu
Post by: curaga on April 26, 2016, 04:28:38 AM
The new xterm entry is hardcoded in the source IIRC, so to change it you'd need to edit and rebuild flwm_topside.
Title: Re: Remove SystemTools and Applications from click menu
Post by: hoogenboom on April 26, 2016, 07:15:22 AM
I can accept that. Thanks everyone for your help!