maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   Ctrl+Shift+x (https://talk.maemo.org/showthread.php?t=63545)

davide 2010-10-08 16:44

Ctrl+Shift+x
 
Once you know, you can't avoid using this function that let you open multiple x-terminal...
but how difficult is to type this sequence!

Any idea on how to reassign it to another key sequence??
ciao!

AlMehdi 2010-10-08 16:49

Re: Ctrl+Shift+x
 
You could also click program menu and "New" for multiple terminals.

davide 2010-10-08 16:54

Re: Ctrl+Shift+x
 
so little to be happy!!!:D

Mentalist Traceur 2010-10-08 17:14

Re: Ctrl+Shift+x
 
I use shortcutd and set long-half-press of the camera button to run shell command
Code:

/usr/bin/osso-xterm ""
I find that it loads faster if I specify an empty command with the "" than if I omit that. Alternatively, you can put in an actual command in that instead of make x-term launch executing that command. So /usr/bin/osso-xterm "sudo gainroot" to launch it with root access, etc. I think you may be able to get two x-term windows at once by putting one /usr/bin/osso-xterm command inside the quotes of the other one, actually.

davide 2010-10-08 17:35

Re: Ctrl+Shift+x
 
Quote:

Originally Posted by Mentalist Traceur (Post 836577)
I use shortcutd and set long-half-press of the camera button to run shell command
Code:

/usr/bin/osso-xterm ""
I find that it loads faster if I specify an empty command with the "" than if I omit that. Alternatively, you can put in an actual command in that instead of make x-term launch executing that command. So /usr/bin/osso-xterm "sudo gainroot" to launch it with root access, etc. I think you may be able to get two x-term windows at once by putting one /usr/bin/osso-xterm command inside the quotes of the other one, actually.

interesting! but how to set the button?

Mentalist Traceur 2010-10-08 18:29

Re: Ctrl+Shift+x
 
To set the button you install "shortcutd". I'm not sure what repository it's in, though. It's in one of the maemo.org ones. I'm not sure if it's made it's way to extras already, or if it's still in testing or devel.

I think "camkeyd" does the same thing, but shortcutd also lets you set what the proximity sensor does. (You can leave that part off though if you don't want to set the proximity sensor as anything.)

matthew maude 2010-10-08 18:44

Re: Ctrl+Shift+x
 
or you could make an alias

alias t='/usr/bin/osso-xterm ""'

the end is " " ' with no spaces tho
save it in .profile and root/.profile
don't overwrite root/.profile tho, use vi or leafpad to edit it

Mentalist Traceur 2010-10-08 18:57

Re: Ctrl+Shift+x
 
How exactly does this work? What does the alias do? I figured there was some system-file editing way to do it - there usually is in Linux - but I didn't know of any.

So what's an alias, and why is it alias t='...' ? Are you attaching it to the T key, or something else?

matthew maude 2010-10-08 19:11

Re: Ctrl+Shift+x
 
yea it means that pressing t then enter you get a new window
you can use these for everything tho e.g.
ud for apt-get update
ug for apt-get upgrade -y
ai for apt-get install -y
ls for ls -a
u for cd ..
and so on...

to add them all it goes like this

alias r='root' sr='sudo gainroot' ls='ls -a'

just keep going in that format, and be aware that alias saved in .profile won't work as root so don't put the apt-get ones there.
anything that needs to be root needs to go into /root/.profile or /root/.bashrc
make sure you don't overwrite those files tho
if you use 'sudo gainroot' none of them will work so its best sticking to 'root'

hsmade 2010-10-08 19:13

Re: Ctrl+Shift+x
 
alias allows you to define macros in shell

davide 2010-10-09 07:34

Re: Ctrl+Shift+x
 
Quote:

Originally Posted by matthew maude (Post 836647)
or you could make an alias....
don't overwrite root/.profile tho....

I don't understand why you say "don't overwrite". How can I save made change if I don't overvrite the file? You mean I can make a new file like profile.my?

geneven 2010-10-09 08:33

Re: Ctrl+Shift+x
 
Quote:

Originally Posted by davide (Post 836970)
I don't understand why you say "don't overwrite". How can I save made change if I don't overvrite the file? You mean I can make a new file like profile.my?

I think he means keep the info that is in .profile and append this without destroying the info already there.

AlMehdi 2010-10-09 08:54

Re: Ctrl+Shift+x
 
Quote:

Originally Posted by matthew maude (Post 836647)
or you could make an alias

alias t='/usr/bin/osso-xterm ""'

the end is " " ' with no spaces tho
save it in .profile and root/.profile
don't overwrite root/.profile tho, use vi or leafpad to edit it

Even better would be to install bash3 and then run bash-setup. Which is a will you a "normal" linux shell. Then edit the "/root/.bashrc" and "/user/.bashrc" files for alias. One of the best thing though is that it got a lot more history and the ctrl+r to search in history.

davide 2010-10-09 09:25

Re: Ctrl+Shift+x
 
yesss... I would like install bash3 but i'm afraid to loose all my personal changes done until now. I've got personalized some things about remember important dates jus using a file.txt database or color shell output.
I try to spend less as possible of my nigths on solve trouble on my n900!!!

anthonie 2010-10-09 10:00

Re: Ctrl+Shift+x
 
Quote:

Originally Posted by davide (Post 837015)
yesss... I would like install bash3 but i'm afraid to loose all my personal changes done until now. I've got personalized some things about remember important dates jus using a file.txt database or color shell output.
I try to spend less as possible of my nigths on solve trouble on my n900!!!

Installing bash wouldnŽt make you loose any changes you may have made to your xterm. just use apt-get to install and youŽll have just another shell next to your xterm. There have been some threads on the maemo4 pat of this forum, about setting up bash as your default shell but I am not sure how safe that is on maemo5 for AFAIK the bootup procedure looks for xterm at some tty levels. If you want to change your default shell youŽll probably need to look at some bootscripts too.

AlMehdi 2010-10-09 10:26

Re: Ctrl+Shift+x
 
Quote:

Originally Posted by anthonie (Post 837035)
Installing bash wouldnŽt make you loose any changes you may have made to your xterm. just use apt-get to install and youŽll have just another shell next to your xterm. There have been some threads on the maemo4 pat of this forum, about setting up bash as your default shell but I am not sure how safe that is on maemo5 for AFAIK the bootup procedure looks for xterm at some tty levels. If you want to change your default shell youŽll probably need to look at some bootscripts too.

By changing in /etc/passwd you can choose your default shell. But it is easier to just use bash-setup after install to set it up. Then edit bashrc with aliases and PS1. No problems at all.

If you want to use ash or sh.. just begin the command with it. Like "sh ls /path/" would be using the sh-shell.

davide 2010-10-09 13:05

Re: Ctrl+Shift+x
 
it wuold be easy mantaining all boot procedure between maemo and linux. I mean why have I to use \etc\.profile in maemo and \...\bashrc in linux. just make confusion to beginner????

@AlMehdi
Please let me know if you got the "calendar" command in bash3... thanks


All times are GMT. The time now is 12:22.

vBulletin® Version 3.8.8