User:Tdang/Scratchpad: Difference between revisions

From OLPC
Jump to navigation Jump to search
(New page: preparing to merge Terminal and Terminal Activity == Talk for Terminal == === Feature Suggestions === It would be nice if, when you resumed a Terminal activity from the journal...)
 
 
(One intermediate revision by the same user not shown)
Line 116: Line 116:


: Isn't it possible to configure the X Server so that the "double cord" of pressing the left and the right mouse button at the same time, emulate the middle mouse button? But even simpler would be to use the right mouse button for pasting since it is not currently used in the terminal. -- Dov Grobgeld - 2008-01-23
: Isn't it possible to configure the X Server so that the "double cord" of pressing the left and the right mouse button at the same time, emulate the middle mouse button? But even simpler would be to use the right mouse button for pasting since it is not currently used in the terminal. -- Dov Grobgeld - 2008-01-23

: Also try "CTRL+SHIFT+V" for paste.


====gnome-terminal====
====gnome-terminal====
Line 177: Line 179:
su -1
su -1
yum install gnome-terminal
yum install gnome-terminal

===Change font size in the Terminal Activity===
Here is how to increase the print size in the terminal:

* Launch the Terminal activity.
* Type
nano ~/.sugar/default/terminalrc
* Find the line saying
Font = Monospace 8
And change it to
Font = Monospace 16
(or whatever you want).
* Press <tt>Control-X</tt> and answer '''Yes''' to save.
* Close the terminal activity (the X in the top right-hand corner)
* Re-open the terminal activity, the terminal should now be in larger print.


=== See Also ===
=== See Also ===

Latest revision as of 22:46, 6 April 2008

preparing to merge Terminal and Terminal Activity


Talk for Terminal

Feature Suggestions

It would be nice if, when you resumed a Terminal activity from the journal, you got back right into the stage you where when you stopped it. I imagine it would be nice for kids, so they could have different on-going terminal activities, which they could stop and later resume transparently.

Also would be good to allow sharing of Terminal activities. Of course, each Terminal activity would be bound to the machine it was started on, but would be usefull to have a kid help a friend by entering into his Terminal activity (let me fix that up for you), or for two or more kids to explore the system together through this interface, having a chat box to help discussion.

As for "let me fix that up for you", I believe that you can ssh from one machine to another - at least I can ssh from the OLPC to my Linux box and vice-versa. Of course for a kid that may be somewhat advanced, but then so is the terminal activity. Norm 22:36, 5 January 2008 (EST)

Keyboard Shortcuts

What are the copy/paste shortcuts? --198.145.74.169 22:22, 19 December 2007 (EST)

I'd like to know this, too. Ctrl-V/C seem to be translated literally and I can't find any button chords for it. I'd kind of suspect drag-and-drop from the frame but that doesn't seem to work currently. Thither 06:55, 21 December 2007 (EST)

Talk for Terminal Activity

(Nothing really)

Terminal Activity

(This page looks more official, cleaner, and less experimental although I don't like the name as much.)

This page is part of the XO Support FAQ.     Support Index | Print This Page
<imagemap>

Image:Support-banner-square.png|173px|community support pages rect 0 0 135 204 [1] rect 135 0 345 204 Support FAQ rect 0 205 135 408 [2]

  1. Comment : there's some whitespace here:

rect 135 205 345 408 Other support

  1. maybe desc none is better. testing.

desc none

</imagemap>

Activity-terminal.svg The Terminal activity grants access to the XO's Linux command line.

The Terminal is a pre-installed Activity that allows you to control your XO directly from a command line, similar to the Terminal program for Mac OSX or the Command Prompt for Microsoft Windows. The Terminal allows you to do far more with your XO than running Sugar activities. But it is also possible to delete your data, and the system data from the command line, so care is needed.

BEWARE: If you become user "root" by executing "su -l " you have full control to destroy all software!


Starting Terminal

The Terminal Activity is found in the Activities taskbar at the bottom of your Home View. You may need to scroll through the Activities taskbar by using the right arrow icon at the bottom of your screen (Frame-scroll-right.gif) to find the Activity-terminal.svg icon.

Another way to bring up the Linux command prompt is by pressing the Ctrl+Alt+Neighborhood keys at the same time. The Neighborhood key is represented by a circle with 8 small dots Mesh key f1 small.png.

Note: You can find Keyboard Shortcuts and the keyboard illustrated here.

Common Terminal Commands

The core Linux used on the XO is Fedora 7.

Limitations / Known Problems

It is not possible to copy and paste from the Terminal as of Ship.2 (The version all G1G1 donor will receive). So, if you are following some instructions from a web page in the Browse activity, and want to copy them into the Terminal activity, a pen and paper is required unfortunately. Copy/paste, but not Drag-and-Drop, will be possible in Update.1. This has been logged on the dev.laptop.org bug tracking system.

There is a partial work-around for this problem, but it requires an extra USB mouse with a third-button scroll wheel. Description here


See Also

  • BASH Reference A longer list of commands that can be used in the Terminal.

Terminal

This page looks like a bit of this and a bit of that.

Activity-terminal.svg

see more templates or propose new

  • The Terminal activity gives a simple command prompt similar to that provided by the Developer Console.
  • It is included in recent builds of the laptop (e.g. build 650).

Latest versions:

File:Terminal-9.xo as of Feb 2008

Change font size in the Terminal Activity

Here is how to increase the print size in the terminal:

  • Launch the Terminal activity.
  • Type
nano ~/.sugar/default/terminalrc
  • Find the line saying
Font = Monospace 8

And change it to

Font = Monospace 16

(or whatever you want).

  • Press Control-X and answer Yes to save.
  • Close the terminal activity (the X in the top right-hand corner)
  • Re-open the terminal activity, the terminal should now be in larger print.

Changing font size in the console

There is a console that runs outside of the X Window System (Sugar) environment that can be accessed by typing Ctrl-Alt-Mesh key f1 small.png. (Note that many Sugar binding are not available in the console, so commands such as sugar-control-panel will not work there.) To increase the font size in the console, type:

setfont sun12x22

(To return to the X Window System environment, type Ctrl-Alt-Home key f3 small.png.)

Cutting and Pasting

Using build 650

It is not possible to cut and paste from the terminal to other activities. However you can use the the clipboard function (i.e., to cut and paste) to drop text into a terminal if you attach a 3 button USB mouse to your USB port. After you have copied text from the web page(usually Ctl C), switch to the Terminal activity, put your cursor on the command line and click your middle button. Doing that should cause the text to be copied successfully.

Isn't it possible to configure the X Server so that the "double cord" of pressing the left and the right mouse button at the same time, emulate the middle mouse button? But even simpler would be to use the right mouse button for pasting since it is not currently used in the terminal. -- Dov Grobgeld - 2008-01-23
Also try "CTRL+SHIFT+V" for paste.

gnome-terminal

Chew up some of that precious nand and install gnome-terminal so you can paste those long strings into a shell:

su -1
yum install gnome-terminal

Using joyride build 1606

This experimental OS build has cut & paste included and working. You can update your whole system from the terminal as a super user by typing

olpc-update joyride-1606

[Note to authors: suggest providing (perhaps thru a link elsewhere) any well known pitfalls to using this experimental implementation on an XO used by a child]

New Page

This page is part of the XO Support FAQ.     Support Index | Print This Page
<imagemap>

Image:Support-banner-square.png|173px|community support pages rect 0 0 135 204 [3] rect 135 0 345 204 Support FAQ rect 0 205 135 408 [4]

  1. Comment : there's some whitespace here:

rect 135 205 345 408 Other support

  1. maybe desc none is better. testing.

desc none

</imagemap>

Activity-terminal.svg The Terminal activity grants access to the XO's Linux command line.

The Terminal is a pre-installed Activity that allows you to control your XO directly from a command line, similar to the Terminal program for Mac OSX or the Command Prompt for Microsoft Windows. The Terminal allows you to do far more with your XO than running Sugar activities. But it is also possible to delete your data, and the system data from the command line, so care is needed.

BEWARE: If you become user "root" by executing "su -l " you have full control to destroy all software!


Starting Terminal

The Terminal Activity is found in the Activities taskbar at the bottom of your Home View. You may need to scroll through the Activities taskbar by using the right arrow icon at the bottom of your screen (Frame-scroll-right.gif) to find the Activity-terminal.svg icon.

Another way to bring up the Linux command prompt is by pressing the Ctrl+Alt+Neighborhood keys at the same time. The Neighborhood key is represented by a circle with 8 small dots Mesh key f1 small.png.

Note: You can find Keyboard Shortcuts and the keyboard illustrated here.

Common Terminal Commands

The core Linux used on the XO is Fedora 7.

Copy / Paste Problems

Cutting and pasting to and from the Terminal isn't properly supported, and so is awkward, but not completely impossible. There are several ways to deal with this:

Wait
Copy/paste, but not Drag-and-Drop, will be possible in Update.1.
Use a USB mouse
You can use a scroll-wheel button to copy and paste.
Jump ahead
Experimental Joyride 1606 OS build has cut & paste included and working. Joyrides are experimental, so proceed with caution, particularly if it's a kid's machine. You can update your whole system from the terminal as a super user by typing:
olpc-update joyride-1606
gnome-terminal
Chew up some of that precious nand and install gnome-terminal so you can paste those long strings into a shell:
su -1
yum install gnome-terminal

Change font size in the Terminal Activity

Here is how to increase the print size in the terminal:

  • Launch the Terminal activity.
  • Type
nano ~/.sugar/default/terminalrc
  • Find the line saying
Font = Monospace 8

And change it to

Font = Monospace 16

(or whatever you want).

  • Press Control-X and answer Yes to save.
  • Close the terminal activity (the X in the top right-hand corner)
  • Re-open the terminal activity, the terminal should now be in larger print.

See Also

  • BASH Reference A longer list of commands that can be used in the Terminal.