Page 2 of 2

Re: Script help

Posted: 16 Dec 2013, 15:05
by brokenman
Your thread titles are too vague. Please read our forum rules, with attention to number 5. Adjust the title of your thread to something more useful please.
http://forum.porteus.org/viewtopic.php?f=35&t=44

You rarely need to logout out of Porteus. If you are guest and you want to do something with elevated rights from a console just enter: su (then put the root password)

For example if you want to edit a file as root just elevate to root in a console and open your text editor. (example in console)
su
toor
leafpad


or

su
toor
mcedit /etc/rc.d/rc.local


EDITED:
You can open a guest console and use ktsuss to open graphical programs as root. Just enter into the guest console: ktsuss <myprogram>

Re: Script help

Posted: 16 Dec 2013, 15:20
by Ed_P
brokenman wrote:You rarely need to logout out of Porteus. If you are guest and you want to do something with elevated rights from a console just enter: su (then put the root password)

For example if you want to edit a file as root just elevate to root in a console and open your text editor. (example in console)
su
toor
ktsuss leafpad


or

su
toor
mcedit /etc/rc.d/rc.local
You may rarely need to logout of guest but I don't have your Linux knowledge. Switching modes in a console I can do, knowing how to invoke another app from the console like leafpad is out of my league, at this point. ktsuss!! Really!! You think I know what that means? :lol: But thank you for posting the tips.

Re: Script help

Posted: 16 Dec 2013, 15:44
by brokenman
The best way to learn is by trying. I assume you are asking for scripting help so you can learn? In that case I suggest you open a console and issue the commands i wrote. In the time it took you to write your reply, you could have done this and found that ktsuss opens up a GUI asking for the root password and then opens your GUI program (leafpad) with root rights. The answer was in my reply.
just elevate to root in a console and open your text editor .... and then i gave an example.

ktsuss!! Really!! You think I know what that means?
No i was sure you didn't. Neither did i at one stage. Have a guess what i did.

PS: Since you ignored my request to change you title i have done it for you. In future please follow forum rules.

Re: Script help

Posted: 16 Dec 2013, 18:39
by Ed_P
brokenman wrote:The best way to learn is by trying.
I agree.
brokenman wrote:I assume you are asking for scripting help so you can learn?
Yes, that and resolve my problem.
brokenman wrote: In that case I suggest you open a console and issue the commands i wrote. In the time it took you to write your reply, you could have done this and found that ktsuss opens up a GUI asking for the root password and then opens your GUI program (leafpad) with root rights. The answer was in my reply.
I didn't mean to imply that I didn't do that, I try everything you suggest to me, I meant that prior to your posting I had no idea that ktsuss existed let alone how to use it.
brokenman wrote:ktsuss!! Really!! You think I know what that means?
No i was sure you didn't. Neither did i at one stage. Have a guess what i did.
You found a friendly forum and asked for help?? :Search:
brokenman wrote:PS: Since you ignored my request to change you title i have done it for you. In future please follow forum rules.
I didn't ignore it, I wasn't sure how to reword it to your liking, but I like what you put. Thank you.

Re: Script help - test user input yes/no

Posted: 16 Dec 2013, 21:54
by brokenman
I read the documentation of ktsuss and then played with it. Asking in a forum is probably the next best thing ... unless of course the donk that answers gives you bad information.

PS: I have edited the bad information i gave you above. You use ktsuss from a 'guest' console in order to use the application as root. If you elevate to root within a console using 'su' then you can just type the name of the program to open it. This is NOT the recommended way of doing it though. You should always use a GUI authentication agent to run a GUI as root.