Script help - test user input yes/no [Solved :-) ]

Post here if you are a new Porteus member and you're looking for some help.
User avatar
brokenman
Site Admin
Site Admin
Posts: 6105
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v4 all desktops
Location: Brazil

Re: Script help

Post#16 by brokenman » 16 Dec 2013, 15:05

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>
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
Ed_P
Contributor
Contributor
Posts: 8315
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Re: Script help

Post#17 by Ed_P » 16 Dec 2013, 15:20

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.
Ed

User avatar
brokenman
Site Admin
Site Admin
Posts: 6105
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v4 all desktops
Location: Brazil

Re: Script help

Post#18 by brokenman » 16 Dec 2013, 15:44

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.
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
Ed_P
Contributor
Contributor
Posts: 8315
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Re: Script help

Post#19 by Ed_P » 16 Dec 2013, 18:39

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.
Ed

User avatar
brokenman
Site Admin
Site Admin
Posts: 6105
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v4 all desktops
Location: Brazil

Re: Script help - test user input yes/no

Post#20 by brokenman » 16 Dec 2013, 21:54

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.
How do i become super user?
Wear your underpants on the outside and put on a cape.

Post Reply