← Back to team overview

ubuntu-phone team mailing list archive

Re: Any tips on getting more usable terminal settings with 'adb shell'?

 

What I usually do is to use ssh instead of adb. That one configures the 
terminal properly (besides setting many other things up better than adb does).

Put this into your ~/.bashrc

alias sd='adb forward tcp:2222 tcp:22; ssh-keygen -f ~/.ssh/known_hosts -R 
[localhost]:2222; ssh -o UserKnownHostsFile=/dev/null -o 
StrictHostKeyChecking=no phablet@localhost -p 2222'

and close/reopen the terminal window.

Start up the ssh server on the phone with:

adb shell start ssh

Now you can just do a "sd" (short for ssh device) and you'll be logged in as 
user phablet on the phone, with a properly configured terminal and a properly 
set up user environment. 

Hope this helps,
Michael


On Thursday 07 November 2013 10:13:37 Mike McCracken wrote:
> When I use 'adb shell', I get full-screen programs' (such as emacs and
> multitail) output wrapped to a tiny size.
> Also, long shell commands are wrapped but no newline is inserted, so I end
> up typing over the beginning of the command.
> 
> I'm hoping there's a simple fix that someone with more term config
> experience can offer up.
> 
> Thanks,
> -mike



Follow ups

References