I’m running openSUSE 11.4 32-bit and using the gnome desktop.
I have a 320GB disk dedicated to linux that is split 50/50 to the operating system and as a storage device.
This way whenever I install new systems, it only affects 1/2 of my disk while the other half I know will not
be touched, and I can store things there more or less permanently. Now, I want to automatically save my
home directory to that storage partition at the start of every month, but I do not use my computer every
day, so I can’t rely on doing this the first day of every month. So, I’ve come up with a scheme where I save
my home directory on the storage partition to a directory made up of the year and month, ie, 2011_Oct.
And I’ve written a csh script that checks the existence of this file, and if it does not exist then it saves my
home directory, otherwise, it does nothing. That way each month I use the computer I will save a copy of
my home directory, and it will only occur once per month. If I login and execute this manually, it works
quite nicely. However, I want to automate this process, so I don’t have to remember to do it.
I have it so the system asks me what to do with an executable text file when I double click it. It displays
“Do you want to run “script-file-name”, or display its contents?”, and has the following four buttons to choose
from:
Run in Terminal
Display
Cancel
Run
To test the first and last buttons, I wrote a dummy csh script that only touches a file in my home directory.
I tested the first button, and it opened a gnome-terminal, the script ran, and the terminal closed. I verified
that the file it touched got created. I then deleted the file, and tested the last button. This did nothing that
I could visibly see, but it did run my script because I verified that the file got created. I don’t know by what
mechanism this ran. Can somebody tell me?
The “Run in Terminal” is how I want my automated process to run, so I can see what’s happening and I
can use a prompt at the end of it for me to hit return to continue, ie, terminate. This allows me to see any
script output and to know that it ran ok.
I used “computer->control center->startup applications” to add my dummy script so it would execute at
login and I know it runs because it created the file, but I don’t see any terminal open, so I assume it ran
as when I tested the “Run” button above.
Now, how do I make this startup application behave as “Run in Terminal” as described above?
Also, is what I’m wanting to accomplish the best way to go about it?, ie, I don’t know where in the startup
process that my script will run, so I want to be assured that it’s ok to attempt to copy my home directory
at this time (especially, since it could take a few minutes to do the copy, which means other things will
not run until it completes). And if not, what other way should I do what I want to do?
Thanks
Ron