Mini FAQ on the Terminal Much of these materials are rooted in * nix systems.
Consequently, many commands have the same meaning, syntax
and forMeegoand forMaemoand forSailfish
for terminal Meego Harmattan
1.What to start? 1.1 After turning on developer mode, change the root password
You need to do this only with the exact understanding of why it is! Now there are many used regular rootme , and if you do not have a specific need to change it - DO NOT CHANGE!
But if there is an urgent need for this:
get user rightsrootand then run the command
Code:
passwd
After that, you will be asked to enter a password with a length of 5 to 8 characters and confirm it. While entering a password, characters on the screen are not displayed.
1.2 How to get root permissions?
This can be done in two ways:
Code:
devel-su
or
Code:
ssh root@localhost. After entering any of the specified commands, the root password will be requested, by default this password is set to the factory default rootme.
1.3 How to add additional repositories?
2. How can I do: 2.1 How to remove the program through the terminal? How to remove Opera Mobile?
To remove the program, we need to know the name of the package, after that you can use the command:
Code:
apt-get remove package_name
or
Code:
apt-get purge package_name
The second command deletes not only the program, but also its configuration files:
For example, we are looking for an opera, but we don’t know how it was written in the system. For this we use the logic:
1) packages in the system have a meaningful name.
2) the word opera is probably used in this title. (this rule applies to any software).
3) but the word opera is not necessarily used separately.
4) we drive a team:
Code:
dpkg -l "* opera *"
Asterisks mean that we are not looking for a package called "opera", but packages, in the name of which this word occurs.
As a result, we get a package / list of packages that have names and descriptions. We read, we see a package called "operamobile". Gorgeous.
5) demolish his team
Code:
apt-get remove operamobile
2.2 VNC-broadcast from phone to computer:
Many have seen the service Nokia-RDA. Some even enjoyed. Let's implement it at home, so as not to squeeze the phone once again when working on a PC.
In fact, everything is clumsy. We install the vnc-server on the phone, the vnc-client on the PC and connect them. Of course, it is preferable that they are on the same local network. I used wi-fi.
Put the server on the phone:
Code:
apt-get install bash x11vnc
Next, find out the IP phone in the local network by the command (it will be shown in the second block; in the local network, it will most likely start with 192.168.xxx.xxx)
Code:
ip ad
We start the server:
Code:
x11vnc
We put on a PC some VNC client. If you have Windows, I can offer such a functional free client.
We start the client. In the line VNC-server write the phone address in the format IP: PORT. It should turn out something like 111.111.111.111:1234
The default port is 5900. Does it work? Cool :) slows down? ... most likely yes. But for this you need to pick the x11vnc configs and the client to fine-tune your network. And yes. The screen is rotated, but in applications such as the terminal there will be no problems - the main thing is to support the landscape. And yes - be sure to put the above keyboard! You don't need a half-screen QWERTY on a PC, provided that you have a real keyboard? :-)
The control is standard - a keyboard from a keyboard, a sensor - a mouse, a left click - tap, a wheel - a pinch (zoom tweaks). Swipe works.
After shutting down the client, the server will stop automatically.
P.P.S. To turn off the server by hand, you need to press CTRL + C, otherwise it will remain hanging in your processes.
2.3 Change root password:
Password changes are simple:
Code:
passwd root
2.4 Windows Remote Desktop Connection:
1) Put the RDP client on the phone:
Code:
apt-get update
apt-get install rdesktop
2) Start the session:
Code:
rdesktop -u "USERNAME" -p "PASSWORD, if needed" -g 854x410<ip computer>
!Quote
2/15 Post Added: 10 Oct 2011 17:13
alxs_as-is wrote:
Since you do not need the buttons, because you are working from a computer on a normal keyboard.
does not work
that feature. Anyway, the keyboard will pop up. For SSH, it is certainly more convenient to work, because you work not with video, but with a full-fledged console, but many applications cannot be launched.
Added after 7min. 4s
Windows Remote Desktop Connection:
1) Put the RDP client on the phone:
Code:
apt-get update
apt-get install rdesktop
2) Start the session:
Code:
rdesktop -u "USERNAME" -p "PASSWORD, if needed" -g 854x410<ip computer>
The -g switch sets the size of the screen being broadcast. The selection method was found the optimal resolution of 854x410. This is due to the fact that the upper and lower borders of the screen will be slightly eaten. You will understand what I mean when you connect.
Computer ip can be found by running the ipconfig command in the Windows console.
To open the console open the START-UP>perform->cmd, or just type cmd in the search bar in Win7 start (if you have one). Or press the combination windowsKey + r and type cmd.
Now the downsides - so far the problem is that if you log in like this on a PC, the current account will fall off and wi-fi will likely fall off if you have a laptop. If the router - there should be no problems.
Tested and works on Windows7 professional.
2.5 Starting FM radio through the terminal:
Essential FM radio for N950 and Nokia N9.
Wired headphones / headset required.
* After installation, restart the phone.
Run through the terminal:
fmrx -f 92.0 -v -r enter
* 92.0 is your frequency
Turn off:
Ctrl + C
* -v and -r optional parameters (- r - RDS) [attachment = "1469629: fmrx_0.1 ... rmel_180.zip"]
2.6 Font Change:
So, first we look at what fonts are already in the system using the SystemInfo program, for example. We are trying to install the font Impact (actually its exact name and looked in SystemInfo). I chose Impact purely for the sample, so that the font changes on the screenshots below were more visible, for myself I installed another font.
Next, from the terminal from under the root, edit the file
for the 11th firmware /usr/share/themes/blanco/meegotouch/locale/ru/constants.ini
for the 20th firmware /usr/share/themes/blanco/meegotouch/constants.ini
(you can edit right there from mc or nano, you can first copy it into MyDocs and, editing from a computer in drive mode, throw it back).
Replace the line in the file
Code:
FONT_FAMILY = "Arial";
on
Code:
FONT_FAMILY = "Impact";
We reboot the smartphone and rejoice.
2.7.Start VLC-Player on Nokia N9 / N950:
1. Download the libvlc5 library and the vlc-player itself, throw packages into the "Downloads" folder
2. Go under the root to the terminal (devel-su), go to the folder we need
Code:
cd / home / user / MyDocs / Downloads /
3. Install the libraries we need
Code:
dpkg -i libvlc5 _ *. deb
4. Install VLC itself
Code:
dpkg -i vlc-player _ *. deb
During the installation process errors can pop up, ignore them ...
Uninstalling VLC-Player
1. Go under the root in the terminal (devel-su)
2. Delete:
Code:
apt-get remove vlc-player
3. Useful information: 3.1 Additional terminal toolbars:
As you know, you can make your own toolbars in the terminal (the toolbar is a light bar above the keyboard with additional buttons - Esc, Tab, arrows, etc.)
To work in the Midnight Commander and some other console programs need function keys (F1-F12). The attachment contains an archive with three toolbar files:
fkeys.xml: Tab, Esc, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10
fkeys1-6.xml: Tab, Ctrl, Esc, F1, F2, F3, F4, F5, F6
fkeys7-12.xml: Tab, Ctrl, Esc, F7, F8, F9, F10, F11, F12
You can use one or all the toolbars at once, they are independent of each other.
The necessary files (as root) are copied to the directory
Code:
/ usr / share / meego-terminal / toolbars /
and restart the terminal.
Toolbars are switched either from the terminal settings or by a left-right gesture on the terminal window.
PS: on the N9 (as opposed to the N950), this does not look the best, because the keyboard + toolbar closes more than half of the screen and the same Midnight Commander is almost unusable.
There is a way out - to create a virtual keyboard of one or two lines, in which there would be only arrows and something else necessary. But this later. [attachment = "1469705: terminal ... bars_163.zip"]
By the way, using the swipe gesture left-right in the terminal window, you can choose from the pre-installed toolbars you need. General information about terminal commands
1) Any team consists of one word. Everything that comes after is a parameter or parameters.
2) Short parameters (single letter) can be combined.
Example: rm -r -f = rm -rf
3) If the command accepts the source and destination as parameters, the source is always first (the first parameter) and then the destination (the second parameter).
Example:
Code:
cp /home/user/MyDocs/NewFile.jpg / home / user / MyDocs / Downloads
This command will copy (cp) the NewFile.jpg file from the source directory (/ home / user / MyDocs) to the destination directory (/ home / user / MyDocs / Downloads)
4) The case is important. Folder, FOLDER and FoLdEr are three different folders. With files also. This is not your Windows.
5) Slash only the right "/" (as in the address bar of the browser). The left slash "\" defines the correct interpretation of the entered special characters or strings without quotes.
Example: long \ spaced \ line = "long spaced line"
6) Spaces and commands. It is worth remembering that if you enter the command incorrectly, the interpreter will not guess at all what you had in mind. One of the most common mistakes:
Code:
cp / path / to / file / destination / path
Here the copy command (cp) is written together with its first parameter - the original object. Right here:
Code:
cp / path / to / file / destination / path
About superuser mode To execute some commands need superuser mode. To check the current status, use the command:
If the command shows root, then you are in superuser mode. If user is displayed, then to switch to root mode, you must run the command:
and enter the password (the rootme password is set by default),
typed characters are not displayed. To exit the superuser mode to normal mode, use the command:
There is another way to check the status of the user. If the line in the terminal starts with:
then you are user.
If with:
then you are root.
Commands for working with the file system By default, the "home" directory of the terminal is a directory
/ home / user. To change the directory, use the command:
TO
one:
cd<directory path>
Example:
Code:
cd / home / user / MyDocs
This command will move us to the MyDocs directory, which is located in the / home / user directory.
The following command is also valid:
if you are already / home / user
cd ~ - go to the home directory / home / user.
cd .. - go up one level.
Example: if we are in the / home / user / MyDocs directory, then this command will move us to the / home / user directory.
cd / - go to the root of the file system.
pwd displays the full path from the root directory to the current working directory.
Example: executing this command after launching the terminal will show us that we are in the home directory / home / user.
ls will show the contents of the current directory.
Options:
-a - show all files and folders.
-l - shows file permissions, number of links to the file, owner name, group name, file size (in bytes), time stamp and file name.
rm {file path or non-empty directory} - will delete the file or non-empty directory.
Options:
-r - recursive delete.
-f - do not ask for confirmation to delete.
Example: you must delete the Example directory from the / home / user / folder with all its contents, without prompting:
Code:
rm -rf / home / user / Example
rmdir<empty directory path>- remove an empty directory.
Example: you need to delete the empty Example directory located in MyDocs:
Code:
rmdir / home / user / MyDocs / Example
mkdir<directory name>- creates an empty directory.
Example: you need to create a directory Example, located in MyDocs:
Code:
mkdir / home / user / MyDocs / Example
Options:
-p - creates missing parent directories.
Example: you need to create a directory Example3 located in / home / user / MyDocs / Example1 / Example2 /, provided that the directory Example1 and Example2 does not exist:
Code:
mkdir -p / home / user / MyDocs / Example1 / Example2 / Example3
those. the command will automatically create the missing directories Example1 and Example2.
mv [parameters] {source file} {destination file} - moves (renames) files.
Example: you want to rename the file NewFile.jpg, located in MyDocs, to NewFile2.jpg:
Code:
mv /home/user/MyDocs/NewFile.jpg /home/user/MyDocs/NewFile2.jpg
You can also move this file to another directory (in the example - / home / user / MyDocs / Downloads /) with the same file name:
Code:
mv /home/user/MyDocs/NewFile.jpg / home / user / MyDocs / Downloads /
or with a different name:
Code:
mv /home/user/MyDocs/NewFile.jpg /home/user/MyDocs/Downloads/NewFile2.jpg
cp [options]<file><way>- copies file or directory.
Options:
-f - do not ask for confirmation to delete.
-i - request confirmation of deletion.
-r - recursive copying.
-p - saves the original file settings such as owner, group, access rights, last modified time and last file access time.
Example: you need to copy the NewFile.jpg file from the source directory (/ home / user / MyDocs) to the destination directory (/ home / user / MyDocs / Downloads) and overwrite the same file without asking:
Code:
cp –f /home/user/MyDocs/NewFile.jpg / home / user / MyDocs / Downloads
Work with processes top - show running processes (exit - q key):
htop - advanced process monitor. Unlike top, htop shows all the processes in the system, also shows the time of continuous operation, processor and memory usage.
Note: for htop to work, you need to install the Performance Package in the developer mode settings:
kill <Process pid>- complete the process with PID<Process pid>(Proccess ID is the first column in the top or htop output).
Example: you want to complete the process with PID 3472:
Code:
kill 3472
Note: if the process is not launched in the context of the current user (user is the third column in the top output, the second column is in htop), then it can be terminated only with superuser privileges.
Add or Remove Applications
wget - download a file from the Internet.
Example: you need to download the Example.deb file located at [url = "http://allnokia.ru:"] http://allnokia.ru: [/ url]
Code:
wget [url = "http://allnokia.ru/Example.deb"] http://allnokia.ru/Example.deb [/ url]
Options:
-P - download the file to the specified directory (default is downloaded to / root) Example: you need to load the Example.deb file located at
http://allnokia.ruto the MyDocs folder:
Code:
wget -P / home / user / MyDocs [url = "http://allnokia.ru/Example.deb"] http://allnokia.ru/Example.deb [/ url]
All the following commands work only with superuser rights. To work with repositories you need to connect to the Internet.apt-get update - update the repository cache.
apt-cache search <word>- will find in the repositories packages containing in the name or description<word>.
Example: it is required to find the word opera:
Code:
apt-cache search opera
apt-get install <package name>- install from the repository package named<package name>.
Example: you need to install the bash package:
Code:
apt-get update
apt-get install bash
dpkg -i <file>- Detailed article on installing applications using the terminal.
apt-get install –f - allow unsatisfied dependencies by downloading and installing the necessary packages from the repositories.
apt-get remove <program name>- removes the program from the system<program name>.
Example: you want to remove the sleeper package:
Code:
apt-get remove sleeper
apt-get clean - clears the cache of downloaded packages.
apt-get moo - and you mooed today?)))
Other ... You can clear the terminal screen with the command:
When entering directories, file names, it is recommended to use the Tab button - just type the first few letters and press Tab, after which the system will substitute the missing part of the word, or suggest typing a few more characters if the already typed characters are repeated in several words.
You can correct the error by moving along the line with the help of horizontal arrows. Press the up arrow to cycle through the previously typed commands:
Conclusion These commands should be enough for most novice users to master the terminal, but in general the number of commands is very large. More specific commands (like nano, sed, etc.) require some skills in working with the terminal and with the file system of the smartphone, so I will not consider this here.
Information is not something secret, found on the Internet (including on this forum) and collected in one message for the sake of systematization.
Read the original article on Рђllnokia ,
on Maemo.suIf someone has a desire to add / edit the cap - contact PM Alexxxl. Post has been editedAlexxxl - 26.11.14, 14:04