User Tools

Site Tools


howto:backupsimpleui

How to back up simpleui.rc

Introduction

This guide will help you create a script file that will backup your simpleui.rc file and keeps copies of the past 5 times you ran the script(so backup1 is the latest and backup5 is the oldest). I like to change my simpleui.rc file a lot so I got tired of having to go into terminal and manually make a backup and then edit. So I made some nice icons in the “Easy Mode” UI and now it is really easy and fast to backup and edit.

Disclaimer

Of course I am not liable for anything you do, ever. I can't think of anything that could go wrong with your eee by following my guide, but just in case something does happen. Please remember I am not liable. Everything is presented “as is” and is for educational use only.

I am not responsible for anything you have done, will do, or are doing right now.

This guide was written and performed on a eee with the unionfs removed. I am unsure if you can add a new script to /usr/bin/ with unionfs. I am also not sure if changes made to /opt/xandros/share/AsusLauncher/ will stick with unionfs. So I wrote this in 2 parts, one for unionfs and one without. The one with unionfs should work for both, but in case you don't like extra directories in /home/user (like me) and dumped unionfs I added a different one.

I am sure if I made any mistakes or if there really is no point in having both guides someone will correct it, or e-mail me and let me know.

Prerequisites

  1. A eee PC with the original OS and still using “Easy mode”
  2. A little understanding of the simpleui.rc file
  3. The ability to follow directions

Note

The new versions of the EeePC (e.g. 900D and even models 700 after updating) do not take into account anymore the file /home/user/.AsusLauncher/simpleui.rc. Instead, the file /var/lib/AsusLauncher/simpleui.rc can be used. All the commands that follow have to be modified by consequence.

Installation on an eee WITHOUT unionfs

First we will backup the simpleui.rc file since we are going to edit it.

  • Open a terminal window (ctrl + alt + t)
  • Execute the following command
sudo cp /opt/xandros/share/AsusLauncher/simpleui.rc /opt/xandros/share/AsusLauncher/simpleui.rc.backup

Now lets add the icons in the tabbed interface.

  • In that same terminal execute this command
sudo kwrite /opt/xandros/share/AsusLauncher/simpleui.rc
  • Now scroll all the way to the bottom where it says </simpleui>
  • Now between the last </parcel> and </simpleui> add this
<folder simplecat="Settings" id="UIedit"
	icon="asus_norm.png" 
	selected_icon="asus_hi.png">
	<name lang="en">simpleui.rc Options</name>

</folder>

<parcel simplecat="Settings/UIedit" extraargs="/usr/bin/sudo /usr/bin/kwrite /opt/xandros/share/AsusLauncher/simpleui.rc"
	icon="documents_norm.png"
	selected_icon="documents_hi.png">
	<name lang="en">Edit simpleui.rc</name>
	<desc lang="en">Edit the simpleui.rc file.</desc>
</parcel>

<parcel simplecat="Settings/UIedit" extraargs="/usr/bin/simpleuibackup.sh" 
	icon="xterm_norm.png"
	selected_icon="xterm_hi.png">
	<name lang="en">Backup simpleui.rc</name>
	<desc lang="en">Backup the simpleui.rc file.</desc>
</parcel>
  • This creates a folder in the Settings tab with 2 icons in it, one for editing the simpleui.rc file and another to backup the file.
  • Now open another terminal
cd /usr/bin/
sudo nano simpleuibackup.sh
  • now copy this into it
#!/bin/sh
#
# This file is copyright Hellgiver
# AKA Hellgiver1987
#
# This script will copy the AsusLauncher's simpleui.rc file and back it up
# To a file named simpleui.rc.script.bak# where the # increments up to five
# where 1 is the most recent backup and 5 is the oldest.
FILE0="simpleui.rc"
FILE1="simpleui.rc.script.bak1"
FILE2="simpleui.rc.script.bak2"
FILE3="simpleui.rc.script.bak3"
FILE4="simpleui.rc.script.bak4"
FILE5="simpleui.rc.script.bak5"

cd /opt/xandros/share/AsusLauncher/

if [ ! -e $FILE1 ]; then
	sudo cp $FILE0 $FILE1
elif [ ! -e $FILE2 ]; then
	sudo cp $FILE0 $FILE2
elif [ ! -e $FILE3 ]; then
	sudo cp $FILE0 $FILE3
elif [ ! -e $FILE4 ]; then
	sudo cp $FILE0 $FILE4
elif [ ! -e $FILE5 ]; then
	sudo cp $FILE0 $FILE5
else
	sudo rm $FILE5
	sudo mv $FILE4 $FILE5
	sudo mv $FILE3 $FILE4
	sudo mv $FILE2 $FILE3
	sudo mv $FILE1 $FILE2
	sudo cp $FILE0 $FILE1
fi
  • Now save it using (ctrl + O) then exit with (ctrl + x)
  • now to make it executable
chmod a+rx simpleuibackup.sh

Congratulations, reboot the eee and now you have a folder in your Settings tab labeled “simpleui.rc Options” with an edit command and a backup command.

Installation on an eee WITH unionfs

First we will backup the simpleui.rc file since we are going to edit it.

  • Open a terminal window (ctrl + alt + t)
  • Execute the following command (pay attention to capital letters)
mkdir /home/user/.AsusLauncher
cp /opt/xandros/share/AsusLauncher/simpleui.rc /home/user/.AsusLauncher/simpleui.rc.backup
cp /opt/xandros/share/AsusLauncher/simpleui.rc /home/user/.AsusLauncher/simpleui.rc

Now lets add the icons in the tabbed interface.

  • In that same terminal execute this command
kwrite /home/user/.AsusLauncher/simpleui.rc
  • Now scroll all the way to the bottom where it says </simpleui>
  • Now between the last </parcel> and </simpleui> add this
<folder simplecat="Settings" id="UIedit"
	icon="asus_norm.png" 
	selected_icon="asus_hi.png">
	<name lang="en">simpleui.rc Options</name>

</folder>

<parcel simplecat="Settings/UIedit" extraargs="/usr/bin/sudo /usr/bin/kwrite /home/user/.AsusLauncher/simpleui.rc"
	icon="documents_norm.png"
	selected_icon="documents_hi.png">
	<name lang="en">Edit simpleui.rc</name>
	<desc lang="en">Edit the simpleui.rc file.</desc>
</parcel>

<parcel simplecat="Settings/UIedit" extraargs="/home/user/.AsusLauncher/simpleuibackup.sh" 
	icon="xterm_norm.png"
	selected_icon="xterm_hi.png">
	<name lang="en">Backup simpleui.rc</name>
	<desc lang="en">Backup the simpleui.rc file.</desc>
</parcel>
  • This creates a folder in the Settings tab with 2 icons in it, one for editing the simpleui.rc file and another to backup the file.
  • Now open another terminal
cd /home/user/.AsusLauncher/
nano simpleuibackup.sh
  • now copy this into it
#!/bin/sh
#
# This file is copyright Hellgiver
# AKA Hellgiver1987
#
# This script will copy the AsusLauncher's simpleui.rc file and back it up
# To a file named simpleui.rc.script.bak# where the # increments up to five
# where 1 is the most recent backup and 5 is the oldest.
FILE0="simpleui.rc"
FILE1="simpleui.rc.script.bak1"
FILE2="simpleui.rc.script.bak2"
FILE3="simpleui.rc.script.bak3"
FILE4="simpleui.rc.script.bak4"
FILE5="simpleui.rc.script.bak5"

cd /home/user/.AsusLauncher/

if [ ! -e $FILE1 ]; then
	cp $FILE0 $FILE1
elif [ ! -e $FILE2 ]; then
	cp $FILE0 $FILE2
elif [ ! -e $FILE3 ]; then
	cp $FILE0 $FILE3
elif [ ! -e $FILE4 ]; then
	cp $FILE0 $FILE4
elif [ ! -e $FILE5 ]; then
	cp $FILE0 $FILE5
else
	rm $FILE5
	mv $FILE4 $FILE5
	mv $FILE3 $FILE4
	mv $FILE2 $FILE3
	mv $FILE1 $FILE2
	cp $FILE0 $FILE1
fi
  • Now save it using (ctrl + O) then exit with (ctrl + x)
  • now to make it executable
chmod a+rx simpleuibackup.sh

Congratulations, reboot the eee and now you have a folder in your Settings tab labeled “simpleui.rc Options” with an edit command and a backup command.

howto/backupsimpleui.txt · Last modified: 2010/01/13 18:49 by hellgiver