maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   What to do with xterminal (https://talk.maemo.org/showthread.php?t=74316)

dagoss 2011-06-24 17:07

What to do with xterminal
 
Sometimes I'm using my phone, and I stop and say to myself "holy shat on a hot tin roof, there's a terminal on my phone!" The novelty amuses me, but short of using apt, vim, MC, and the occasional game of unnethack, I rarely use it.

Still though—there's a terminal on my phone. That's so neat.

I've only bricked my n900 once, so obviously I need to start using the command prompt more. What awesome or useful things (preferably both, but awesome and useless is acceptable) can the terminal be used for on the n900? Can I place phone calls with a command? Are there some CLI programs that are simply useful or do something that isn't replicated easily in the GUI?

Ken-Young 2011-06-24 17:18

Re: What to do with xterminal
 
Quote:

Originally Posted by dagoss (Post 1038236)
Sometimes I'm using my phone, and I stop and say to myself "holy shat on a hot tin roof, there's a terminal on my phone!" The novelty amuses me, but short of using apt, vim, MC, and the occasional game of unnethack, I rarely use it.

Still though—there's a terminal on my phone. That's so neat.

I've only bricked my n900 once, so obviously I need to start using the command prompt more. What awesome or useful things (preferably both, but awesome and useless is acceptable) can the terminal be used for on the n900? Can I place phone calls with a command? Are there some CLI programs that are simply useful or do something that isn't replicated easily in the GUI?

Well, managing packages with apt-get is WAY faster than using any of the GUI tools to download code (even FAM). Running python interactively provides a very fancy pocket calculator. If you install ssh you can log into remote workstations (if that appeals to you). And of course you have access to the usual Unix-style utilities like awk, find, grep et al. which make managing the files on your phone far easier (IMHO) than using any GUI filemanager. You can manually optify things by creating soft links.

Megaltariak 2011-06-24 17:19

Re: What to do with xterminal
 
Some commands to control the phone are in this wiki page :
http://wiki.maemo.org/Phone_control

qwazix 2011-06-24 17:23

Re: What to do with xterminal
 
Code:

espeak "I am the mighty N900"
of course you need espeak

You can ssh to a webserver if you want, you can Nano a blogpost, you can get unison binary from debian arm and sync your files from your pc, find some files with find -name whatever.txt, code some python and run it, install php and run a webserver...

if I think of anything else I'll come back. (is there pdftk for arm?)

ah, and imagemagick?

Creamy Goodness 2011-06-24 17:29

Re: What to do with xterminal
 
Quote:

Originally Posted by dagoss (Post 1038236)
I've only bricked my n900 once, so obviously I need to start using the command prompt more.

awesome

i like being able to "killall" (kills a process by name)
package management from the command line is also a life saver
if you're interested in using the terminal, there's some tricks to making it better, you can change the font color or install a version of ls that supports color, or update busybox... we will have you bricking that n900 again in no time ;)

abubakar 2011-06-24 18:16

Re: What to do with xterminal
 
Quote:

Originally Posted by Ken-Young (Post 1038244)
... Running python interactively provides a very fancy pocket calculator ...

so true, its the best programmable calculator, with all programming and variables.

zoner 2011-06-24 18:55

Re: What to do with xterminal
 
Quote:

Originally Posted by qwazix (Post 1038248)
espeak "I am the mighty N900"

hahahaha - damn man, i'm supposed to be working
espeak "holy shat on a hot tin roof"

Radu 2011-06-25 04:55

Re: What to do with xterminal
 
I use it for ssh, very useful.

daperl 2011-06-25 05:39

Re: What to do with xterminal
 
Quote:

Originally Posted by dagoss (Post 1038236)
Are there some CLI programs that are simply useful or do something that isn't replicated easily in the GUI?

gcc,g++,sed,grep,awk,find,xargs,dpkg-buildpackage...

The list is long.

geneven 2011-06-25 06:22

Re: What to do with xterminal
 
You can use xterm to learn how Linux works and thus control your device. This is like popping open the hood of your car and finding out what all that stuff does.

You can modify things like the startup video.

You can study computer languages. A good one to start with is awk.

Radu 2011-06-25 06:22

Re: What to do with xterminal
 
Do you actually use those things from the Xterminal? I use them by ssh, the keyboard is too frustrating to type long things, especially when you need special characters.
BTW, how did you manage to install gcc? I spent hours yesterday on google, and still didn't find an easy, reliable way.

geneven 2011-06-25 06:43

Re: What to do with xterminal
 
If you are following an online tutorial, you can often use copy and paste. Many people prefer ssh, true.

Mentalist Traceur 2011-06-25 07:58

Re: What to do with xterminal
 
I've gotten so used to typing commands on my N900 for shell access that on my laptop I would sometimes take longer to type the right commands than I do on my N900.

Personally, I love the N900 keyboard (sure, extra keys would be nice, but I've remapped things so compactly that I'm happier as-is [all command-line-relevant characters are available with shift+fn+key presses, and I can do shift+fn very easily with the one left thumb]). If you go into it with the mindset of something that you can and will get good at with a little practice, and use it somewhat regularly, you'll get used to it within a month at the most.

So, to answer your question Radu: I do apt-get/dpkg stuff by command-line on the phone, I do just about all my archiving/compression/decompression/etc on X-Term. I run aircrack-ng exclusively on my phone, again in X-Term. If you check out my Monitor Clock clock-style in the Advanced Clock Plugin thread - I wrote that entire thing entirely on my N900, using vi in X-Term. After installing PHP and a webserver on the N900, all of my PHP/html/javascript coding has been done in vi-in-X-Term (I did SOME in TXPad for the syntax highlighting, but I'm more comfortable in vi at this point, so I enjoy working in that more than in TXPad). I have coded what little C I coded in vi on my N900 too - I did the same code prior in a Google doc, but I didn't copy-paste it into vi - I just manually typed it back into X-Term's vi. And yes I have compiled my C programs essentially entirely on the N900 - admittedly, the only program I've written aside from a "Hello World" was an attempt to copy qwerty12's R&D Mode Control into a CLI program instead of a GTK+ GUI one. So far I only got it taking parameters, I got stuck at the part where I needed to work the closed source cal library's functions into the program, and haven't had time to get it working since.)

GCC is installed on the N900 by enabling the SDK and Tools repositories (I'm pretty sure GCC is in the SDK one, but Tools is a useful repo to have enabled as well.) You have to manually optify it and its dependencies though. If you'd like I can share a script that I wrote to do the mv and ln -s commands - it's VERY simple to do but saves the hassle if you ever have to do it again or whatever.

jarvis187 2011-06-26 06:28

Re: What to do with xterminal
 
Mentalist, I need a bit of help with this xterminal. complete novice. any chance you could PM me?

tkatchev 2011-06-26 06:42

Re: What to do with xterminal
 
You can also run alpine, the one and only usable mail client.

It's somewhat strange and not always user-friendly, but it's the only mail client (on any platform) that properly supports IMAP and doesn't break when handling tens of thousands of messages.

Sadly, it's not packaged properly for the N900, you need to download a precompiled .tar.gz binary...

http://home.mminternet.com/delaroca/index.html/

Mentalist Traceur 2011-06-26 07:14

Re: What to do with xterminal
 
Quote:

Originally Posted by jarvis187 (Post 1039224)
Mentalist, I need a bit of help with this xterminal. complete novice. any chance you could PM me?

You haven't enabled PMing you in your account settings. So no, I can't. My email address is openly visible on my account information though. You can always email me. I can always email you too, but honestly, if you have questions, ask. I mean, what would my PM/e-mail say? "Hey this is the guy you wanted to ask some questions of, what did you want to ask"? We can just skip that step and just have you send me a message/email asking what you wanted to ask (although I almost guarantee you Google-able shell tutorials will help you more than I can).

tkatchev: If it's easy to compile and make into a .deb without actually having to understand the detailed workings of make or whatever build scripts it uses, once I finally get my laptop keyboard back, I'll see if I can shoot it up into the repository.

nicholes 2011-06-26 15:58

Re: What to do with xterminal
 
Quote:

Originally Posted by Radu (Post 1038575)
Do you actually use those things from the Xterminal? I use them by ssh, the keyboard is too frustrating to type long things, especially when you need special characters.
BTW, how did you manage to install gcc? I spent hours yesterday on google, and still didn't find an easy, reliable way.

if you are talking about cc++ then check my thread (i am noob and manage to get g++) here you go >>>

http://talk.maemo.org/showthread.php?t=74021

good luck

anthonie 2011-06-26 17:06

Re: What to do with xterminal
 
New to Linux? Plenty of free books available for download.
http://talk.maemo.org/showthread.php?t=63052

vi_ 2011-06-26 19:41

Re: What to do with xterminal
 
Quote:

Originally Posted by Mentalist Traceur (Post 1039240)
You haven't enabled PMing you in your account settings. So no, I can't. My email address is openly visible on my account information though. You can always email me. I can always email you too, but honestly, if you have questions, ask. I mean, what would my PM/e-mail say? "Hey this is the guy you wanted to ask some questions of, what did you want to ask"? We can just skip that step and just have you send me a message/email asking what you wanted to ask (although I almost guarantee you Google-able shell tutorials will help you more than I can).

tkatchev: If it's easy to compile and make into a .deb without actually having to understand the detailed workings of make or whatever build scripts it uses, once I finally get my laptop keyboard back, I'll see if I can shoot it up into the repository.

Do it, i'l buy you a beer.

dagoss 2011-06-30 15:30

Re: What to do with xterminal
 
Quote:

Originally Posted by vi_ (Post 1039568)
Do it, i'l buy you a beer.

I'll buy you another. Installing alpine is one of the first things I wanted to do with my n900—I can't stand the built in mail client. (I'd also like to remove quite a few of these pre-installed programs that clutter up my menu, but that's another story).

Anecdotally, how difficult *is* it to build a package to work on the n900? I am by no means a programmer, hacker, or someone who can tie their own shoes, but there are quite a few packages I want on my n900 that aren't in the repos to the best of my knowledge, like cmus, newsbeuter, and links2.

hawaii 2011-06-30 15:43

Re: What to do with xterminal
 
Not difficult to build packages at all. The biggest roadblock is autobuilder and waiting for repository propagation.

cfh11 2011-06-30 16:45

Re: What to do with xterminal
 
Quote:

Originally Posted by qwazix (Post 1038248)
[CODE]ah, and imagemagick?

+1 imagemagick is super useful

Ken-Young 2011-06-30 17:15

Re: What to do with xterminal
 
Quote:

Originally Posted by dagoss (Post 1042241)
I'll buy you another. Installing alpine is one of the first things I wanted to do with my n900—I can't stand the built in mail client. (I'd also like to remove quite a few of these pre-installed programs that clutter up my menu, but that's another story).

Anecdotally, how difficult *is* it to build a package to work on the n900? I am by no means a programmer, hacker, or someone who can tie their own shoes, but there are quite a few packages I want on my n900 that aren't in the repos to the best of my knowledge, like cmus, newsbeuter, and links2.

It's not very hard if you have at least some experience compiling programs on a linux machine. If you get stuck (as I have several times) there's almost always someone who will help you on the maemo IRC channel.

Eminem 2011-06-30 17:38

Re: What to do with xterminal
 
Run this to add Root, Update and Upgrade buttons in X-term.

gconftool-2 -s /apps/osso/xterm/key_labels -t list --list-type=string "[Tab,Esc,Root,Update,Upgrade]"
gconftool-2 -s /apps/osso/xterm/keys -t list --list-type=string "[Tab,Esc,S\,U\,D\,O\,KP_Space\,G\,A\,I\,N\,R\,O\,O\ ,T\,KP_Enter,A\,P\,T\,minus\,G\,E\,T\,KP_Space\,U\ ,P\,D\,A\,T\,E\,KP_Enter,A\,P\,T\,minus\,G\,E\,T\, KP_Space\,U\,P\,G\,R\,A\,D\,E\,KP_Enter]"

http://thumbnails35.imagebam.com/138...0138650289.jpg

Mentalist Traceur 2011-07-02 21:08

Re: What to do with xterminal
 
To the alpine requesters:

I have put a tentative first version into the autobuilder. No guarantees as to whether or not it will work, or work right/fully. (Though by the time I finished typing this, it finished building successfully in the autobuilder, so that's something.) It also won't be optified. I didn't get a chance to test in my scratchbox because my scratchbox environment for some reason decided to just fail to connect to the maemo.org repository, so I wasn't able to get some of the build dependencies locally just yet, and thus wasn't able to build locally or install on-device (without quite a lot of pain-in-the-*** fiddling).

So don't install if you're not willing to risk something getting badly ****ed up just yet. If scratchbox wasn't being such a pain, I'd test more before submitting, but since it is, I'm testing by putting it up in -devel. But, hey, that's the point of -devel.

Mentalist Traceur 2011-07-02 22:48

Re: What to do with xterminal
 
1 Attachment(s)
Attachment 21170

Right now apt-get can't install alpine for some reason ("E: Handler silently failed") - but the package is downloadable from the package interface online. Then you just have to manually install what dependencies are still needed. _Seems_ to me like it's working, but I've never used alpine (though something tells me I'm about to learn to), so some brave tester who has should get their hands dirty with it. Meanwhile, I'll go fix the section from the one the source code suggested for .deb packages (non-free/mail) to something Maemo 5 officially-compatible (like user/network). Maybe that'll fix the apt-get dying issue...

After we're sure that works, next up will be optifying the entire thing.

- Edit 2 -
Version 2.00-maemo2 is in the autobuilder now... Has the section fixed. HOPEFULLY it'll install normally with apt-get now. It'll also show up in the application managers, so I need to get an icon on it that indicates it's a command-line-only app soonish, so as to not get flooded with newbs. I'm also making a thread on the subject now, so that we don't keep hijacking this one. Here.

Ken-Young 2011-07-09 01:38

Re: What to do with xterminal
 
Quote:

Originally Posted by Eminem (Post 1042324)
Run this to add Root, Update and Upgrade buttons in X-term.

gconftool-2 -s /apps/osso/xterm/key_labels -t list --list-type=string "[Tab,Esc,Root,Update,Upgrade]"
gconftool-2 -s /apps/osso/xterm/keys -t list --list-type=string "[Tab,Esc,S\,U\,D\,O\,KP_Space\,G\,A\,I\,N\,R\,O\,O\ ,T\,KP_Enter,A\,P\,T\,minus\,G\,E\,T\,KP_Space\,U\ ,P\,D\,A\,T\,E\,KP_Enter,A\,P\,T\,minus\,G\,E\,T\, KP_Space\,U\,P\,G\,R\,A\,D\,E\,KP_Enter]"

http://thumbnails35.imagebam.com/138...0138650289.jpg

I issued the above commands, and now my X-term will no longer produce Escape when I hit "Esc". Does anyone know how to fix that? Does anyone know how to modify the rx-51 file to map the EuroSign key to produce Escape instead? I've mapped the PoundSterling key to "|" (for handy piping), but can't get the keyboard to produce Escape.


All times are GMT. The time now is 23:04.

vBulletin® Version 3.8.8