Reply
Thread Tools
Posts: 76 | Thanked: 9 times | Joined on Nov 2007 @ Long Island NY
#11
I vote for install becomeroot and type sudo gainroot at xterm prompt

very simple.
 
Posts: 244 | Thanked: 10 times | Joined on Jan 2007
#12
if you want to do the alias option, you do it as a normal user, not as root.
 

The Following 2 Users Say Thank You to schmots For This Useful Post:
Posts: 1,950 | Thanked: 1,174 times | Joined on Jan 2008 @ Seattle, USA
#13
Originally Posted by schmots View Post
if you want to do the alias option, you do it as a normal user, not as root.
Sure enough, that works. Thanks.

My having entered that code as root earlier -- do you foresee that causing me any problems? Do I need to undo what I did there?
__________________
.
. .

Help Save This Forum
for N8x0/Diablo Users! Register and Vote for Solution #1 on this Brainstorm. (The Solution will let you see New Posts with any threads you choose -- like the N900 and Maemo5/Fremantle threads -- filtered out.) (To understand the Solution better, see these posts #17, #18, and #19.)
 
Posts: 244 | Thanked: 10 times | Joined on Jan 2007
#14
nope, no problems at all.. you can just run sudo gainroot as root... which won't hurt anything. Pointless but won't hurt anything.

If you want to remove it all the same, become root and edit

~/.profile

The very last line should be the alias you added.. just remove it.
 
Posts: 1,097 | Thanked: 650 times | Joined on Nov 2007
#15
2 methods to make a shortcut so you dont have to type it all (sudo gainroot) in always

Go into xTerminal.
Select main Menu -> Tools -> Settings
Click on Toolbar Shortcut
Add (New) a new shortcut
Title = Sudo (or whatever you want to name it)
Value = s . u . d . o . KP_Space . g . a . i . n . r . o . o . t . KP_Enter

The discussion on this and the above command to go into the shortcut command line is as per this thread
(Note : you dont need any additional software for this)


If you want a Menu in the side bar to lauch xterm and go into su mode at the same time, then install "Personal Menu" application.
You can then add custom commands to start any app you want from the sidebar itself. Pretty customizable app.
You can see my personal menu with the item X Terminal SUDO for launching from sidebar (method 2), as well as in the background the X Terminal itself with the toolbar shortcut SUDO added as explained in method 1.
 

The Following 4 Users Say Thank You to nilchak For This Useful Post:
Posts: 1,950 | Thanked: 1,174 times | Joined on Jan 2008 @ Seattle, USA
#16
Originally Posted by nilchak View Post
2 methods to make a shortcut so you dont have to type it all (sudo gainroot) in always

Go into xTerminal.
Select main Menu -> Tools -> Settings
Click on Toolbar Shortcut
Add (New) a new shortcut
Title = Sudo (or whatever you want to name it)
Value = s . u . d . o . KP_Space . g . a . i . n . r . o . o . t . KP_Enter

The discussion on this and the above command to go into the shortcut command line is as per this thread
(Note : you dont need any additional software for this)

Thanks, nilchak, this worked for me, and it's very convenient. (The earlier method (with typing in Xterm, from post #8) worked for me until I exited; then when I came back to Xterm and typed "rt", it told me: "-sh: rt: not found" but that doesn't matter now because I like this shortcut on the Toolbar better, anyway.)
__________________
.
. .

Help Save This Forum
for N8x0/Diablo Users! Register and Vote for Solution #1 on this Brainstorm. (The Solution will let you see New Posts with any threads you choose -- like the N900 and Maemo5/Fremantle threads -- filtered out.) (To understand the Solution better, see these posts #17, #18, and #19.)
 
Benson's Avatar
Posts: 4,930 | Thanked: 2,272 times | Joined on Oct 2007
#17
Originally Posted by GeraldKo View Post
Thanks, nilchak, this worked for me, and it's very convenient. (The earlier method (with typing in Xterm, from post #8) worked for me until I exited; then when I came back to Xterm and typed "rt", it told me: "-sh: rt: not found" but that doesn't matter now because I like this shortcut on the Toolbar better, anyway.)
Well, you have to do the second one to make it permanent; it puts the alias command in your .profile so it runs every time. It sounds like something went wrong there. But glad you got something you like, anyway.
 
Posts: 333 | Thanked: 32 times | Joined on Jul 2007
#18
The "#!/bin/sh" is just to tell people who are view the script it is a bash script , I grow up using DOS so the few scripts I write are more composed like batch {.bat} then Bash {.sh}.

The alias also works but I'm just more used to using scripts which I have cloned on some OS I use daily.

Any to answer your question, yes you do have to install "BecomeRoot" first, My script just makes it easier to type :)

Originally Posted by qwerty12 View Post
You do know that to have BOFH's tip working, you need easyroot or becomeroot installed first?

Also I thought #!/bin/sh was meant to be the first line. Not sure on this one though.

Sorry for sounding like a knob in this post.
 
Benson's Avatar
Posts: 4,930 | Thanked: 2,272 times | Joined on Oct 2007
#19
Originally Posted by BOFH View Post
The "#!/bin/sh" is just to tell people who are view the script it is a bash script , I grow up using DOS so the few scripts I write are more composed like batch {.bat} then Bash {.sh}.

The alias also works but I'm just more used to using scripts which I have cloned on some OS I use daily.

Any to answer your question, yes you do have to install "BecomeRoot" first, My script just makes it easier to type
No, the shebang is also interpreted by the OS, as well as people, but unless you get unlucky enough that the first couple characters are magic from some other executable format, it'll work. (I think, actually, more than unlucky is required; magic strings are generally chosen to avoid alphabetic characters to stop such a situation (or with a text file, etc.) from happening.)
But the shebang really does need to be there, for properness.
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 19:07.