*

Welcome, Guest. Please login or register.

Get your own OLPC - Buy an XO laptop on eBay!
Pages: [1]
Print
Author Topic: Key bindings for opening a terminal?  (Read 4250 times)

Key bindings for opening a terminal?

capsid
Commenter

Posts: 5


December 30, 2007, 08:33:43 AM

Hi all!

I would like to create some key bindings, could anybody give me tips on how to accomplish this?  I'm sure other people with grownup sized hands are interested in quicker navigation as well:)

--a keypress to open the terminal activity
--a keypress to open the terminal activity and execute an arbitrary command
--a Run dialogue box, similar to pressing Alt-F2 in Gnome. 

Has anybody else been wondering about this?  What are some other things that you would like to hook up to a keyboard shortcut?
Logged

#1 Re: Key bindings for opening a terminal?

Ben James Ben
Senior Contributor
**
Posts: 142



January 01, 2008, 12:29:03 PM

/usr/share/sugar/shell/view/keyhandler.py is the file that defines Sugar keyboard shortcuts. I assume that you'll want to edit that file to add another binding. To execute the Terminal activity, I believe that the command line command would be "sugar-activity terminal.TerminalActivity".

The Terminal seems to be the VTE Terminal Widget, which has a vte_terminal_fork_command() function that lets it run a command. However, it looks as if the sugar-activity command does not support passing command line arguments to activities. To have the Terminal run a command upon start, you might need to hack a second copy of the activity.

Of course, <Ctrl>-<Alt>-<Neighborhood/F1> will switch you to the first Console for running quick commands, but I admit that it isn't quite the same as the Terminal activity.
Logged

#2 Re: Key bindings for opening a terminal?

Dennis
Commenter

Posts: 18


January 25, 2008, 08:23:19 PM

EP,

Do you know of a way of resetting the XO back to it's initial load state - I have problem in terminal mode - it does not take keyboard input. System test shows all OK - keyboard functions in other modes - eg in Journal search field.

Is there a key combination that will reset and rebuild the OS - I seem to remember seeing somewhere that you could do this given the ability to get at the underlying code - as such there was a need to be able to put the XO back into it's default load state at the time it waas shipped out.

Thanks.
Logged

#3 Re: Key bindings for opening a terminal?

olpc_franco
Master Contributor
***
Posts: 484



January 25, 2008, 09:18:33 PM

Dennis,

It looked like you posted to this thread accidentally.  But to try to address the question, look at the first bullet here:

http://www.hackszine.com/blog/archive/2008/01/howto_upgrade_the_xo_laptops_o.html

is that what you are trying to do?

If you want to just go to the newer build 653, then look at this:

http://www.olpcnews.com/forum/index.php?topic=796.msg6562;topicseen

Descriptions by others can be also found.
Logged

If I suggest it, I have tested it on my XO.
Pages: [1]
Print
Jump to:  

Members
Total Members: 2406
Latest: sembik
Stats
Total Posts: 31943
Total Topics: 3843
Online Today: 26
Online Ever: 238
(April 18, 2011, 09:48:50 PM)
Users Online
Users: 0
Guests: 17
Total: 17