WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [NOT SOLVED]cannot restore files in ~/.wmx folder  (Read 4543 times)

Offline manit123

  • Sr. Member
  • ****
  • Posts: 315
[NOT SOLVED]cannot restore files in ~/.wmx folder
« on: December 26, 2013, 04:12:29 AM »
I wanted quick access entry in right click menu of flwm .
So I created followign files in /home/tc/.wmx
Code: [Select]
$ls  ./home/tc/.wmx/
 file-manager  mount-tool    oxford
 $ cat ./home/tc/.wmx/*
 #!/bin/sh
 exec pcmanfm
 #!/bin/sh
 exec mnttool
 #!/bin/sh
 exec /mnt/sda1/tc/new-oxford.sh
It works .
When I added these files to /home/tc/.wmx folder in mydata.tgz then they do not reappear after restart .
Is .wmx folder overwritten when flwm_topside.tcz is loaded ?
« Last Edit: January 17, 2014, 07:26:37 AM by manit123 »

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: cannot restore files in ~/.wmx folder
« Reply #1 on: December 26, 2013, 06:46:38 AM »
Check your /opt/.xfiletool.lst file.
.wmx files are excluded from the backup.

You might consider adding your .wmx/ files form a script in /opt/bootsync.sh.
« Last Edit: December 26, 2013, 06:49:47 AM by gerald_clark »

Offline manit123

  • Sr. Member
  • ****
  • Posts: 315
Re: cannot restore files in ~/.wmx folder
« Reply #2 on: December 26, 2013, 06:51:04 AM »
I will remove that line , then see.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: cannot restore files in ~/.wmx folder
« Reply #3 on: December 26, 2013, 06:52:36 AM »
That is not a good idea.
This would leave entries for programs that may not be loaded at next boot.
Add them from /opt/bootsync.sh instead.

Offline manit123

  • Sr. Member
  • ****
  • Posts: 315
Re: cannot restore files in ~/.wmx folder
« Reply #4 on: December 26, 2013, 08:48:48 PM »
I created the directory structure /home/tc/.wmx then copied the files into it.
I tar , gzipped the structure & saved it as mydata.tgz in tce folder of boot partition.
So far , this has worked.
I removed '.wmx' line from /opt/.xfiletool.lst (part of mydata.tgz) , still files inside .wmx do not get restored.
Are you suggesting me to add following to /opt/bootsync.sh
Code: [Select]
mkdir -p /home/tc/.wmx
cp <files> /home/tc/.wmx
If  /opt/bootsync.sh gets run as root then those files will have owner 'root'.
Usually , files inside ~/.wmx are owned by tc:staff . That would mean , I add above lines to ~/.xsession .

Online Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 7667
Re: cannot restore files in ~/.wmx folder
« Reply #5 on: December 26, 2013, 09:09:07 PM »
Hi manit123
You could save the scripts in a subdirectory under /opt then in bootsync.sh do:
Code: [Select]
cp /opt/subdirectory/* /home/tc/.wmx

Offline manit123

  • Sr. Member
  • ****
  • Posts: 315
Re: cannot restore files in ~/.wmx folder
« Reply #6 on: December 29, 2013, 08:42:48 PM »
adding lines to /opt/bootsync.sh did not work .
Finally , adding to ~/.xsession did

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: cannot restore files in ~/.wmx folder
« Reply #7 on: December 30, 2013, 12:16:45 AM »
I use this method.

Make an extension of the ~/.wmx folder with only those entries you want to see in the final product, have it restore to a directory named say ~/.wmx_bak
then on boot use a short shell script loaded via .X.d or .xsession  whose purpose is to wait until ~/.wmx directory exists then delete it, next copy/move ~/.wmx_bak to ~/.wmx    By the time boot has finished the new menus will be in place.
« Last Edit: December 30, 2013, 12:35:52 AM by coreplayer2 »

Offline manit123

  • Sr. Member
  • ****
  • Posts: 315
Re: cannot restore files in ~/.wmx folder
« Reply #8 on: December 31, 2013, 07:00:40 AM »
That is similiar to mine.
As told above , all I want is to add 3 quick shortcuts in right click menu.
My last command in ~/.xsession copy those files from boot partition to ~/.wmx.
I also added '\ ' at beginning of file name so that they appear first in right click menu.
I guess ~/.wmx is dynamically created so startup script is indispensable.

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: cannot restore files in ~/.wmx folder
« Reply #9 on: December 31, 2013, 06:48:43 PM »
I see maybe I missunderstood, then i'd create an extension to hold the "/usr/local/share/applications/dummy.desktop" files for each menu item needed, which will allow the system to dynamically create menu items at boot when it's expected.?

Perhaps one extension for one main item with three sub menu's ?
« Last Edit: December 31, 2013, 06:50:39 PM by coreplayer2 »

Online Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 7667
Re: cannot restore files in ~/.wmx folder
« Reply #10 on: December 31, 2013, 06:55:46 PM »
Hi manit123
Didn't we cover this topic once before:
http://forum.tinycorelinux.net/index.php/topic,15107.msg86662.html#msg86662

Offline manit123

  • Sr. Member
  • ****
  • Posts: 315
Re: cannot restore files in ~/.wmx folder
« Reply #11 on: January 01, 2014, 05:14:19 AM »
to Rich ,
The one you have given as example in http://forum.tinycorelinux.net/index.php/topic,15107.msg86662.html#msg86662 creates a submenu under 'applications' not  above 'applications,system tools,new desktop,exit'
The one given in wiki (about creating menu entry) did not work (maybe it is for jwm while tiny core uses flwm by default).
« Last Edit: January 01, 2014, 05:19:52 AM by manit123 »

Offline manit123

  • Sr. Member
  • ****
  • Posts: 315
Re: cannot restore files in ~/.wmx folder
« Reply #12 on: January 09, 2014, 07:45:22 AM »
hi people ,
Please suggest me a way of creating menu item alongside 'system tools,applications,exit' - not within one of them ?
« Last Edit: January 13, 2014, 04:14:12 AM by manit123 »