Active Topics

 



Notices


Reply
Thread Tools
b666m's Avatar
Posts: 1,090 | Thanked: 476 times | Joined on Jan 2010 @ Ingolstadt, Germany
#1
hi,

it seems like a simple problem but i'm unable to find a solution here and in google.

when using the ls-command in x terminal the output is just monochrome. everything is black on white.
but i would like to have different colors for folders and files. for example folders in blue and files in green or something.
that would be especially helpfull if the file hasn't an extension like .mp3 or .doc etc.

the option --color=always isn't recognized by ls and other options don't seem to do what i would like to see.

can anybody help?
(i'm feeling pretty dumb right now because the problem looks too simple :/)
 
R-R's Avatar
Posts: 739 | Thanked: 242 times | Joined on Sep 2007 @ Montreal
#2
Well, we need to convince nokia to ditch busybox and finally get bash and coreutils on this thing to make it perfect :-)
 
b666m's Avatar
Posts: 1,090 | Thanked: 476 times | Joined on Jan 2010 @ Ingolstadt, Germany
#3
so... mhm... is there no chance of getting some color in x terminal? :/
 
Posts: 323 | Thanked: 118 times | Joined on Nov 2007 @ Australia
#4
You could possibly get bash installed and select that as a shell, I am unsure if this would work or break the device, or even if xterm supports colour at all.
 
jkq's Avatar
Posts: 251 | Thanked: 131 times | Joined on Oct 2009 @ USA
#5
Originally Posted by RipTorn View Post
You could possibly get bash installed and select that as a shell, I am unsure if this would work or break the device, or even if xterm supports colour at all.
The xterm supports colors just fine. Just ssh into a linux box, run ls --color, and see the pretty colors show up as expected. As someone pointed out above, we just need to ditch busybox.

On the N8x0, someone had made a color-ls package. Anyone brave enough to try it and see if it works fine on the N900?

-jkq
__________________
Class .. : Quiet One
Humor .. : [*********-] Alignment: Chaotic Good
Patience : [******----] Weapon(s): Python scripts
Agro ... : [***-------] Relic(s) : N900
 
Posts: 323 | Thanked: 118 times | Joined on Nov 2007 @ Australia
#6
well by xterm I meant x terminal on the N900 Gui. So even if bash/dash/etc was installed would colours work locally? (I suspect they would work just fine by ssh-ing into the N900)

Cheers
Rip
 
jkq's Avatar
Posts: 251 | Thanked: 131 times | Joined on Oct 2009 @ USA
#7
Originally Posted by RipTorn View Post
well by xterm I meant x terminal on the N900 Gui. So even if bash/dash/etc was installed would colours work locally? (I suspect they would work just fine by ssh-ing into the N900)
Yes, I did too. I'm saying that the N900's XTerminal supports colors. I don't believe the shell being used has any effect on colors working in ls (or another program).

The problem is that the version of ls on the N900 does not support colored output, as it is actually busybox, not the "standard" ls found on most linux boxes. Ssh-ing into the N900 won't magically add that funtionality to ls. Using a proper version of ls on the device will make colors "work".

-jkq
Attached Images
 
__________________
Class .. : Quiet One
Humor .. : [*********-] Alignment: Chaotic Good
Patience : [******----] Weapon(s): Python scripts
Agro ... : [***-------] Relic(s) : N900

Last edited by jkq; 2010-01-14 at 05:06. Reason: picture!
 

The Following User Says Thank You to jkq For This Useful Post:
Posts: 543 | Thanked: 181 times | Joined on Aug 2009 @ Universe,LocalCluster.MilkyWay.Sol.Earth.Europe.Slovenia.Ljubljana
#8
Feel free to install gcoreutils from my repos(see sig). That will install it and some other tools as gls and so on...
__________________
For any repos or anything else I might have working on my N900 see:
http://wiki.maemo.org/User:Ruskie
A quick list of what I have in the repos
zsh|xmms2|fcron|gtar|gcoreutils
 
Posts: 755 | Thanked: 406 times | Joined on Feb 2008 @ UK
#9
Originally Posted by jkq View Post
On the N8x0, someone had made a color-ls package. Anyone brave enough to try it and see if it works fine on the N900?
I've had it installed for quite a while - it works well for me, YMMV.

Attached the deb in case anyone doesn't want to install all of coreutils.
You have to install it through dpkg.
Attached Files
File Type: deb color_ls_1.0-1_armel.deb (43.1 KB, 474 views)
 

The Following User Says Thank You to codeMonkey For This Useful Post:
Posts: 173 | Thanked: 160 times | Joined on Jan 2010 @ London, UK
#10
Originally Posted by jkq View Post
The problem is that the version of ls on the N900 does not support colored output, as it is actually busybox, not the "standard" ls found on most linux boxes. Using a proper version of ls on the device will make colors "work".
As a quick fix for some initial mental uncomfortableness in the limited shell you get by default, I copied the binary busybox from my arm linux based NAS. This busybox contains telnet and telnetd, and the ls is compiled to support rudimentary colour output (not configurable I think, but thankfully doesn't require --colo(u)r=(yes|auto) added, you'd have to alias ls otherwise as many linux dists do). I've not compared the two fully yet, as diff isn't install by default

Oh and I copied the built-in busybox to busybox-suid and made links for su and ping. I hope my minor tinkering isn't eating up too much space on / (only 600k out of the default 50meg left).
 
Reply


 
Forum Jump


All times are GMT. The time now is 21:28.