Last visit was: It is currently 24/07/2014, 2:52


All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: How to 'grep' Samsung Tools on the command line?
PostPosted: 02/08/2012, 15:24 
Supporter
Supporter

Joined: 02/08/2012, 15:16
Posts: 4
Hi guys,

I'd like to grep some details from samsung-tools on the command line to show them in my system monitor (it's conky, but that doesn't matter for the question).

I try to use grep to read the output from samsung-tools, however, I only get an error.

Here's what I do:

Code:
~$ samsung-tools -c status | grep -w 'mode'
Traceback (most recent call last):
  File "/usr/bin/samsung-tools", line 771, in <module>
    main()
  File "/usr/bin/samsung-tools", line 723, in main
    Cpu(options.cpu, options.show_notify).apply()
  File "/usr/bin/samsung-tools", line 276, in apply
    print CPU_TEMPERATURE + " " + self.__temp() + unicode(" °C", "utf8")
UnicodeEncodeError: 'ascii' codec can't encode character u'\xb0' in position 22: ordinal not in range(128)


What I wanted to do: the command was supposed to print out the 'Fan mode: ...' line. Obviously, it does not.

As I'm just an experienced user but not a code guy, I don't know what the error means. Can somebody tell me what I am doing wrong?


Top
 Profile  
 
 Post subject: Re: How to 'grep' Samsung Tools on the command line?
PostPosted: 02/08/2012, 16:51 
Administrator
Administrator
User avatar

Joined: 12/02/2009, 18:08
Posts: 1377
Location: Italy
You found a bug. :P

I've just fixed it in the bzr branch (link).

_________________
Please consider a little donation to keep the 'Linux On My Samsung' project up and running. Thank you!


Top
 Profile  
 
 Post subject: Re: How to 'grep' Samsung Tools on the command line?
PostPosted: 02/08/2012, 20:49 
Supporter
Supporter

Joined: 02/08/2012, 15:16
Posts: 4
Oh well. :lol:

Thanks for the quick fix. How long will it approximately take to show up in the ubuntu repositories?


Top
 Profile  
 
 Post subject: Re: How to 'grep' Samsung Tools on the command line?
PostPosted: 02/08/2012, 21:18 
Administrator
Administrator
User avatar

Joined: 12/02/2009, 18:08
Posts: 1377
Location: Italy
Well, I have no plans for a new release at the moment.

If you need the fix quickly, you can just apply it to your installed Samsung Tools.
Edit the file '/usr/bin/samsung-tools' and add the 3 new lines of code as shown in the bzr commit (link).

_________________
Please consider a little donation to keep the 'Linux On My Samsung' project up and running. Thank you!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Theme created StylerBB.net & kodeki