Applescript to Arduino LCD only works with Serial Monitor
I think you are bitten by CR-LF (carriage return [0x0d, '\r'], line feed [0x0a, '\n']). Sometimes CR comes first followed by a LF; sometimes the LF comes first, followed by the CR; sometimes only a CR is sent; sometimes only a LF is sent. 

It really depends on the application and/or operating system you use. I'd advice to change your sketch in such a way that it doesn't print the actual characters, but prints the hexcodes. That will be the easiest way to troubleshoot this problem.

Don't filter the incoming data, so remove the '\n'-check:

if (recieved == '\n')


Replace:

lcd.print(inData);


by:

char ascii[ 8 ];
sprintf( ascii , "0x%02x " , inData );
lcd.print( ascii );


to view the data in hex.

Once you figured out what codes are arriving at your Arduino, you can change your code accordingly. Make your code robust as possible, as CR/LF comes in many variations. I'd even account for a NULL (0x00) character.