maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   X Terminal questions from a noob (https://talk.maemo.org/showthread.php?t=65095)

supreuph 2010-11-05 00:05

X Terminal questions from a noob
 
I've been an N900 adopter since launch and as an end user, I'm generally pleased with the device. However, when using apps that require tweaking, I've been unable to get a handle on X terminal. Command lines that devs supply to modify or correct program operations leave me at a standstill because they either don't work, or I have no way of opening files from the /home directory.

So can anybody give me a basics on X terminal so I can start to make a little more of my N900?

HellFlyer 2010-11-05 00:15

Re: X Terminal questions from a noob
 
http://www.tuxradar.com/content/comm...ks-smart-geeks


You can google linux xterm commands , almost all of them are similar :)

frostbyte 2010-11-05 00:20

Re: X Terminal questions from a noob
 
For basic commands, check these out

https://help.ubuntu.com/community/UsingTheTerminal

http://www.pixelbeat.org/cmdline.html

for secure shell hosting, i.e. gaining wireless access to your N900 and the Xterminal via your laptop/PC (this allows quicker input since you are using your computer to type/copy-paste to the N900) check out WinSCP http://winscp.net/eng/docs/guides and http://scratching.psybermonkey.net/2...g-openssh.html

Wikiwide 2010-11-05 00:23

Re: X Terminal questions from a noob
 
Quick reply...
Read a similar thread here:
http://talk.maemo.org/showthread.php?t=56097

http://www.petrilopia.net/wordpress/...and-line-tips/

http://www.nokioteca.net/blog/2010/0...di-x-terminal/

http://freeengineer.org/learnUNIXin10minutes.html

http://www.busybox.net/downloads/BusyBox.html

pantera1989 2010-11-05 00:45

Re: X Terminal questions from a noob
 
Quote:

Originally Posted by HellFlyer (Post 863872)
http://www.tuxradar.com/content/comm...ks-smart-geeks


You can google linux xterm commands , almost all of them are similar :)

From his post I think those commands might be a little too complex. The easiest way to navigate through xterm if you only use it to troubleshoot and fix small stuff is the very basic commands.

First some info: the minus (-) symbol is used for flags. Flags may define further options to a command. Eg: -help usually brings out a help about a command.

Code:

cp -help

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

So some basic commands:
cp = copy. You can use it like this: cp origin destination
You can use the -R flag to copy recursively (ie. everything inside too)
To copy hello.txt from /home/user/MyDocs to /home/user
Code:

cp /home/user/MyDocs/hello.txt /home/user/
To copy a whole folder called hello:
Code:

cp -R /home/user/MyDocs/hello /home/user/
Move works in similar ways. The difference is that the files are removed from the first location. Eg:
Code:

mv /home/user/MyDocs/hello.txt /home/user/
ls - lists files in a directory. Pressing TAB (on screen button) twice lists files in the current directory:
Code:

ls /home/user/apps/
mkdir - creates a new directory:
Code:

mkdir /home/user/newdir

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


To search for files
you can use the following command: find
You can be creative with this command. You always need the -name flag to specify the name. You can use an * for a wildcard.

Ex this searches in /home/user/MyDocs for files ending with .mp3
Code:

find /home/user/MyDocs -name *.mp3
This searches for files that have abc anywhere in the filename:
Code:

find /home/user/MyDocs -name *abc*.*

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

To see or edit config files etc:
You can use the vi command to see what a file contains. Example:
Code:

vi /usr/share/applications/hildon/abc.desktop
You can use leafpad (once installed) to edit files too like this:
Code:

leafpad /home/user/abc.txt
If a file requires root access to be editted you can start leafpad while rooted and it will work.


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

Installing and updating:
These require you to be rooted. Some useful flags: -f (force), -fix-missing (fixes missing dependencies (hopefully))
Code:

apt-get update
Updates the catalogs.
Code:

apt-get upgrade
Upgrades the packages that have an upgrade available.
Code:

apt-get install something
Installs a package called something
Code:

apt-get install -reinstall something
Reinstalls a package.


Installing packages manually uses the command dpkg. Now this has many flags. Like: -i (install), -force-all (installs a package without caring for missing dependencies(may result in a broken app).
Code:

dpkg -i /home/user/MyDocs/install.deb

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

To set permissions to a file I would first recommend try setting permissions NOT as root. If you can't..then gain root.
Code:

chmod +x /home/user/file
You can also use:
Code:

chmod 777 /home/user/file
Both should give enough permissions to work. you can research the difference if you like.


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

Finally if you don't know I will tell you how to access root. Please be careful when in root. Nothing will stop you from deleting important configuration files.

1. Install the package called 'rootsh' from an application manager.
2. Open Terminal
3. Type 'sudo gainroot' OR just 'root'


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

These are the commands I can think off the top of my head. You should start with these..then advance little by little. xterm is great because it gives you feedback of what it is doing..unlike a GUI.

You can also troubleshoot an app by launching it in xterm. To do so you need to find its launcher..ex launch it by typing:

Code:

/home/opt/app1/app1
or a python app:
Code:

python /home/opt/pythonapp/pythonapp.py
One final thing. the TAB button (it's on screen) is very useful. It completes commands and directories example typing '/h' and pressing tab will complete it to '/home/'. You can select text by pressing the mouse button and dragging on screen and copy and paste from the drop down menu at the top.

Hope this helps.

Mentalist Traceur 2010-11-05 00:59

Re: X Terminal questions from a noob
 
This is what I used to start the very basic stuff. At least the first few pages are rather useful.

http://linuxcommand.org/learning_the_shell.php

Also, if you have nothing typed, you can hit tab twice and you'll get a list of all usable commands - you can the google the commands you're interested in. Some are N900-only, like the ones with "fiasco" in front of them, but most as pretty common. Just search "Linux command [name of command you want to learn about]", and there's bound to be plenty of tutorials/guides out there.

mmurfin87 2010-11-05 01:03

Re: X Terminal questions from a noob
 
If an app forces you to deal with the command line, find a different app. The developer is obviously piss poor at his job.

supreuph 2010-11-05 01:13

Re: X Terminal questions from a noob
 
Thank you all. This was extremely helpful.

geneven 2010-11-05 01:16

Re: X Terminal questions from a noob
 
Google xterm tutorial and go thru three or four of the ones that look appealing. By that time you will have a pretty good idea of how it works :)

Vintrc 2010-11-15 08:57

Re: X Terminal questions from a noob
 
Hi all..
Is possible made command/commands for widget which allow sends sms?

i mean...have one widget on desktop which when i press, automatic open new sms, paste text which i in advance choose and automatic choose recipient number which i choose in advance...then only just i press Send.. it would be gret for example for buy tram ticket..or sms for wife :D


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

vBulletin® Version 3.8.8