It would appear that on Sep 30, Anton Aylward did say:
Joe(theWordy)Philbrook said the following on 09/30/2011 10:06 AM:
Well I suppose that might work... Though I think Patrick's suggested command form:
su - -c yast2
is easier to type, and while it never occurred to me to mix the "- " option to get something like root's own login environment, with the "-c command" option, if it works like he said (I'll have to test it next time I boot OpenSuSE (at the moment I'm reading my mail with Sabayon Linux) It sounds logical to me that it would work since using the "- " option to get a root shell then typing "yast2" worked...
Word, yes. You missed a point. The issue is about the environment. I use "- " but I was trying to make you understand what was going on. *sigh* Do I have to be "Wordy" to get the message across? I was hoping to teach principle and understanding, not merely tell you what to type to make it work.
Actually Anton I DID get that at least part of the issue might have been in the details of the environmental variables. Though My understanding of the nitty gritty details of those is minimal at best. Heck most of the time if I want to remember how to get a bash script to conditionally run in an xterm if X is up, I still have to find my notes, then find the example in them. Or {easier} "cat ~/bin*|less" just to remember that the environmental variable involved is $DISPLAY...
Its about the environment. If the DISPLAY isn't in the environment then the application, whatever the application, doesn't know it got access to an X screen.
In which case ' if [ "$DISPLAY" = "" ] ' probably wouldn't work either right?
So when you su you want to "preserve" (or re-create) the environment. Q.E.D.
Incidentally now that I've rebooted OpenSuSE, I tested a few things and while su - -c yast2 su -l -c yast2 su -c yast2 - su - -p -c yast2 all worked, but su -p -c /sbin/yast2 failed... So in this case I think it's still an environment issue, but is based on some difference besides $DISPLAY or $PATH between root's login environment and my user's...
Like Larry Wall says, "There's more than one way to do it"
And that's one of the things I like about Linux, There's almost always
another way. If'n only one can figure out what the heck it is...
By the way. I've found the problem with the "menu" selection. Though along
the way I did something stupid that I hope doesn't bite me someday...
Eventually I found the right desktop file:
/usr/share/applications/YaST.desktop
in which I substituted kdesu for xdg-su and now it works...
But before I realized that the correct desktop filename started with an
uppercase "Y" I'd done an:
ls /usr/share/applications/yast*.desktop
and played around with the desktop files:
/usr/share/applications/yast2-metapackage-handler.desktop
/usr/share/applications/yast2-metapackage-handler-ymu.desktop
before I understood that they were for something else...
I think I undid everything I did, except that I'm no longer sure
which one had:
Exec=/sbin/OneClickInstallUI %f
And which had:
Exec=/sbin/OneClickInstallUrlHandler %f
I don't suppose you'd care to save me from my stupidity before I forget and
try a oneclick install from someplace???
--
| ^^^ ^^^
| <o> <o> Joe (theWordy) Philbrook
| ^ J(tWdy)P
| ___ <