by OU812 on Mon Jul 07, 2008 8:40 am
Unfortunately, that approach did not work. If you do not enter root's pwd correctly, the script terminates. If you enter it correctly, then the script is run as root. And this was a problem since now you are directed to root's wallpaper directory (after all you just made yourself root). So no matter which approach I used, I had trouble getting zenity to point to the user's wallpaper directory (in the slim chooser script).
So to make a long story short, I remembered a discussion I had with the developer of nitrogen in the use of symlinks. I figured why not learn two new things: symlinks and issuing more than one command per button in a gtkdialog script? Finally, I solved the puzzle. The general routine is:
1. Choose the slim option in the control center.
2. A symlink is created to the user's wallpaper folder.
3. Ask for root's password and if correct, launch the slim background chooser.
4. If a user chooses a background, set it and output the operation was successful. Otherwise exit the script.
Although your advice didn't help directly, it helped me indirectly because instead of giving up, I strengthened my skills.
john