Terminal Activity: Difference between revisions

From OLPC
Jump to navigation Jump to search
(copy&paste cleanup)
Line 37: Line 37:
The core Linux used on the XO is [http://www.Fedora.org Fedora 7].
The core Linux used on the XO is [http://www.Fedora.org Fedora 7].


=== Limitations / Known Problems ===
=== Copy and Paste into Terminal Window ===
For ways to paste into the terminal window (without using an extra USB mouse), please check here:
http://wiki.laptop.org/go/Scroll-Wheel_Copy_and_Paste

---------------------------------------------------------------------------


It is not possible to [[Terminal#Cutting and Pasting|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 [http://dev.laptop.org/ticket/5376 logged] on the dev.laptop.org bug tracking system.
It is not possible to [[Terminal#Cutting and Pasting|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 [http://dev.laptop.org/ticket/5376 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. [[Scroll-Wheel Copy and Paste|Description here]]
There is a partial work-around for this problem, using the third button of a mouse. See [[Scroll-Wheel Copy and Paste]]. That page also has instructions to make the right touchpad button act like the third button of a mouse.

==== Paste script ====

It is also possible to create a script for pasting from the clipboad.

Open a terminal and create a new file in the home directory, this can be done with nano for example.

nano paste

In the file enter the following

#!/usr/bin/python
import pygtk
import gtk
cb = gtk.clipboard_get(selection = "PRIMARY")
print cb.wait_for_text()

Save then make the file executable by typing

chmod a+x paste

Finally to run the script to paste from the clipboard type

./paste

---------------------------------------------------------------------------


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

Revision as of 10:28, 18 May 2008

Merge-arrows.gif
It has been suggested that this article or section be merged with Terminal. (Discuss)
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.

Copy and Paste into Terminal Window

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, using the third button of a mouse. See Scroll-Wheel Copy and Paste. That page also has instructions to make the right touchpad button act like the third button of a mouse.

Paste script

It is also possible to create a script for pasting from the clipboad.

Open a terminal and create a new file in the home directory, this can be done with nano for example.

   nano paste

In the file enter the following

   #!/usr/bin/python
   import pygtk
   import gtk
   cb = gtk.clipboard_get(selection = "PRIMARY")
   print cb.wait_for_text()

Save then make the file executable by typing

   chmod a+x paste

Finally to run the script to paste from the clipboard type

   ./paste

See Also

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