Linux Load ICC/ICM
#1
XBMCbuntu v.11.0 (11.10 Uuntu oneiric) running in i686 Intel hardware
Install from ISO to USB flash drive

I have a working ICM color profile file that I manually execute from xcalib. I boot to XBMCbuntu, login, open a terminal window and execute xcalib. Close out the terminal then launch XBMC.

Any suggestions on making this easier?

Thx
Reply
#2
I've made a simple script named loadicm.sh:
Code:
#!/bin/bash
# Start xcalib and pass the ICM file
xcalib /etc/samsung24.icm

Saved it in /etc/xbmc/live.d/

Made it executable by running sudo chmod +x /etc/xbmc/live.d/loadicm.sh

When I start XBMC I am expecting the ICM color profile to load but it isn't. When I manually run xcalib /etc/samsung24.icm from a terminal within XBMCbuntu it works fine. When I attempt to execute the script I get:
Code:
bash: /etc/xbmc/live.d/loadicm.sh: /bin/bash^M: bad interpreter: No such file or directory

Any hints on what I'm doing wrong?

Thanks
Reply
#3
You must have created that script in Windows? That would have added ^M characters to the ends of lines, which Linux does not like. You need to create the file using a Linux text editor. If you don't mind using the command line, you can do the following in a terminal session:
  1. cd /etc/xbmc/live.d
  2. sudo rm loadicm.sh (to delete the old file)
  3. sudo nano loadicm.sh (to open a new file using the nano editor)
  4. Type your script contents
  5. Press Ctrl-o, press Enter, press Ctrl-x (to save your new script file)
  6. sudo chmod +x loadicm.sh (to make the file executable)
Or if you prefer a GUI text editor, install leafpad or gedit via Synaptic Package Manager in XBMCbuntu. Or you can install the dos2unix utility (also available in Synaptic) to automatically remove the problematic carriage return characters from the script file you created in Windows (rather than creating a new file in Linux). Lots of choices. Smile
Reply
#4
Thanks.

But I did make it from the CLI - nano. ?

I've deleted it and recreated and get the same result. One thing of note, normally I don't do CTRL+O, I just CTRL+X, Y, ENTER. So what caught my eye is when I CTRL+O the file it asks if I want it in DOS or MAC format and DOS format is the default. Is that what's causing the issue with the ^M character?

On a side note, I did try this (taken from post #9 at this xbmc.org support page.):
In /etc/lightdm/lightdm.conf
I added a line: display-setup-script=xcalib /etc/samsung24.icm
and I *think* it's working the way I was hoping. I could easily tell in the XBMCbuntu shell because the blue background was really washed out until the xcalib command was run but with the Aeon default images it's a little more difficult to tell. Is this an acceptable way of doing this, too, or will people laugh at me if admit to this technique? Rofl

Thanks!
Reply
#5
(2013-01-12, 10:37)awsic Wrote: So what caught my eye is when I CTRL+O the file it asks if I want it in DOS or MAC format and DOS format is the default. Is that what's causing the issue with the ^M character?

Are you sure you are using nano? I've never seen it prompt for a file format before when saving a file. I know you can use Alt-D or Alt-M to specify the file format to be saved as DOS or Mac, respectively, but you shouldn't be using either of these for Linux.

If you edit the file again using nano and do a Ctrl-o to output it and it displays "File Name to Write [DOS format]", hit Alt-D and it should change to simply "File Name to Write". Hit Enter and then Ctrl-x to exit.

Reply
#6
Yeah, positive I'm using nano. I drop out of xbmc and log into xbmcbuntu then open terminal and sudo nano...

Its late. More tomorrow.

Thanks again for your help. I'll try your suggestions tomorrow.
Reply

Logout Mark Read Team Forum Stats Members Help
Load ICC/ICM 0