maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   OS2008 / Maemo 4 / Chinook - Diablo (https://talk.maemo.org/forumdisplay.php?f=29)
-   -   osso_xterm toolbar shortcut (https://talk.maemo.org/showthread.php?t=16749)

ridgeback 2008-02-17 05:54

osso_xterm toolbar shortcut
 
Hi, I'm just starting to learn *nix systems in general. I find myself switching to root a lot, and would like to create a shortcut on the X Terminal toolbar. I created on called Gainroot and enter "sudo gainroot" as the command but that doesn't do anything. Can I not run commands like that? If not, what is it's purpose?

Thanks,
Mike

geneven 2008-02-17 06:12

Re: osso_xterm toolbar shortcut
 
It works for <ctrl>p to go back in command history.

Perhaps someone will tell us the syntax for other commands.

bunanson 2008-02-17 06:42

Re: osso_xterm toolbar shortcut
 
Would it be easier just to use the 'up' Dpad? Ctrl+p involves 4 key strokes - ctrl, command line, p, 'OK'.


bun

free 2008-02-17 11:14

Re: osso_xterm toolbar shortcut
 
Quote:

alias r='sudo gainroot'
put this in .profile
then to become root, type

r

You could also create an x resource to map it to hardware key although I didn't try

tobiasj 2008-02-17 13:01

Re: osso_xterm toolbar shortcut
 
what would also be nice is something along the lines of the "root terminal" menu item in desktop linux.

I can certainly understand why there isnt one from the get go, being well dangerous to the system and all. But certainly we should be able to add one somehow. I am going to start poking around and see what I can come up with. never occured to me before now, but that would very nice.

-John

sashabe 2008-02-17 13:16

Re: osso_xterm toolbar shortcut
 
Quote:

Originally Posted by free (Post 143534)
put this in .profile
then to become root, type

r

You could also create an x resource to map it to hardware key although I didn't try

Where to search for this file? I haven't found it in home and root directories. Or should it be created?

micampe 2008-02-17 15:20

Re: osso_xterm toolbar shortcut
 
use this command:
Code:

sh -c "sudo gainroot"

ridgeback 2008-02-17 15:57

Re: osso_xterm toolbar shortcut
 
Thanks for the replies everyone. micampe, I entered what you suggested as the value of the xTerm toolbar shortcut, but nothing happens when I click it. These shortcuts should be able to run terminal commands like that, right? I would definitely make one to fire up Hamachi if that were the case. Any ideas?

Thanks again,
Mike

ridgeback 2008-02-17 16:13

Re: osso_xterm toolbar shortcut
 
BTW, I was playing around with your suggestion, and if I entered "sh 1" or "sh -c 1", then 1 will be sent to the terminal. However, "sh 12" and "sh -c 12" don't send 12 to the terminal. Also, "sh "1"" and "sh -c "1"", with quotes around the 1, doesn't even send 1, like it will without the quotes.

Thanks,
Mike

free 2008-02-17 16:30

Re: osso_xterm toolbar shortcut
 
Quote:

Originally Posted by sashabe (Post 143555)
Where to search for this file? I haven't found it in home and root directories. Or should it be created?

create it yes

$HOME/.profile is executed on login shells
/home/user/.profile


All times are GMT. The time now is 01:37.

vBulletin® Version 3.8.8