Xfce Forum

Sub domains
 

You are not logged in.

#1 2010-11-17 11:45:53

Punk_Nadel
Member
Registered: 2009-02-12
Posts: 11

Thunar in a shell script

Hi there,
I'm trying to make something like a password-protected folder under xfce.
For that I changed the folder rights so that only the owner can read/write and changed the owner to root.
Now I was trying to write a shell script (executable from root via gksu) which should change the owner back to the user, open thunar for the user and after thunar has finished change the owner back to root. But when I start thunar from the shell it goes to background, so a simple:

#!/bin/bash
chown USER:users /home/USER/Secret
sudo -u USER thunar /home/USER/Secret
chown root:root /home/USER/Secret

does not work.
How can I prevent thunar from going to background?

P.S. sorry for my bad english smile


[img]http://counter.li.org/cgi-bin/certificate.cgi/506718[/img]

Offline

#2 2010-11-17 19:14:31

herd
Member
From: Germany
Registered: 2006-05-18
Posts: 143
Website

Re: Thunar in a shell script

This won't work because Thunar will first run inside the session invisibly with the --daemon argument.

Every new thunar instance coming afterwards will just hand over the arguments to the daemonized first instance and close.

What do you actually want to achieve? Use files'n folders temporarily and then lock them again?
Have a look at 'zenity' - it could provide a dialog from script that you click OK when you are done using them.

Offline

Board footer

Powered by FluxBB