question about kdesu and gtkdialog
I have problems with the following line in a bash script that uses gtkdialog.
The line in question is the following: Code:
kdesu "sed 's/alignment top_right/alignment top_left/g' /etc/conky/conky.conf > out.txt && mv -f out.txt /etc/conky/conky.conf" I've tried several variations concerning the quotations marks, but with no luck. Any ideas? |
kdesu is for KDE and gtksu is for Gnome.
|
I don't get what you mean.
I've used KDESU inside gtkdialogs that work perfectly. It is this particular string that brings me problems. |
kdesu $(/usr/bin/sed 's/alignment top_right/alignment top_left/g' /etc/conky/conky.conf > out.txt && mv -f out.txt /etc/conky/conky.conf)
kdesu `/usr/bin/sed 's/alignment top_right/alignment top_left/g' /etc/conky/conky.conf > out.txt && mv -f out.txt /etc/conky/conky.conf` Interesting question.. Try one of the ways I put it here. Just as an experiment.. The first way uses $(this) format, an the second uses `backticks`. Also note that I put the full path to the sed command, just in case. Who knows...... :) It may work, or it might be something peculiar to kdesu (which I would not be too surprised at) Sasha |
Another idea, if the above does not work, is:
Since the code works in bash according to you, why not put it into a bash script, and just use kdesu to execute the script itself? That'd be simpler than your current method anyway: kdesu script Sasha |
1 Attachment(s)
Sasha:
Thanks for your ideas and your time. Unfortunately, none of the variants worked. The last idea you suggested is a good one, but the complex involves a lot of commands, many of which do not require to be root. Besides, the idea of the script is to put everything in a handy place, with no passwords to run the initial gtkdialog. Another alternative would be to place the string as a function, but I haven't been able so far to call functions from inside a gtkdialog. If you have time and want to take a look at it and see if you come up with anything, I've attached the script. |
All times are GMT -5. The time now is 11:41 AM. |