Kodi Community Forum
[LINUX] Touchscreen (touch screen) issue only with XBMC? - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52)
+---- Thread: [LINUX] Touchscreen (touch screen) issue only with XBMC? (/showthread.php?tid=89536)

Pages: 1 2

[LINUX] Touchscreen (touch screen) issue only with XBMC? - Blacksheep70 - 2011-01-04

Hi community,

I am using XBMC with MythTV integration ony my HTPC with Ubuntu 10.10. One of the last open construction sites is the touchscreen in XBMC. The used driver is elotouch

I am using an USB Elo Touchscreen which works well (!) on the desktop. I can move the pointer everywhere i want, start programs from the application menu and so on. Wink

As soon XBMC is started it seems that the mouse control does not work properly. I see the mouse pointer moving along the left and upper border of the TFT when I touch the touchscreen and move my finger. But the mouse pointer is not able to leave the border. Feels like it is gluing at the border and can only moved along there but not e.g. to the middle of the screen.

The lines should show where i can move the pointer along, the X should demonstrate the area where i can't move the pointer to.

With a normal usb mouse I can move the pointer everywhere I want.

Search for similar problems here and with google was not helpful.

Any ideas? Huh

Thanx in advantage!


- SpiffBB - 2011-01-04

Just to be shure - you havent by misstake disabled mouse controll in settings?!

- Blacksheep70 - 2011-01-04

Hi SpiffBB

thanx for your answer. But: If the mouse control is disabled I would expect that the normal mouse would not work. But it does as described above.

But this brought me to the idea that both devices connected could be the problem... But the same behaviour exists when I unplug the USB mouse.

Next idea Wink


- Blacksheep70 - 2011-01-10

Not only to bump the topic... Found out more:

If XBMC is running in windowed mode, the touchscreen works well. I can select everything I want im XBMC.

But if XBMC is running in the fullscreen mode the behaviour I initially described is happen.

So it seems that XBMC is making a difference in handling mouse events when running windowed and full screen?

Would be cool if a XBMC developer could make a statement here and probably fix that...
Running XBMC windowed is uncool on a pure HTPC Wink


- Blacksheep70 - 2011-01-11

I will submit this as a bug today...


- Blacksheep70 - 2011-01-11

Ticket #11051 created.

- Blacksheep70 - 2011-01-23

kais replied into the ticket and the workaround works for me:

Quote:Seems that the SDL has a bug/feature that blocks the SDL_MOUSEMOTION events if a custom mouse cursor is used instead of the system mouse cursor in the fullscreen mode (see http://us.generation-nt.com/answer/bug-559615-boswars-uncontrollable-wacom-tablet-when-full-screen-mode-help-168935561.html and http://blogs.distant-earth.com/wp/?p=293).

I tried to implement hidden system cursor as one workaround suggest. The touchscreen worked after the change, but the problem was that the mouse wasn't allowed to move "menu" areas in the top of the screen and left border of the screen (Ubuntu Netbook 10.10 contains menu in the left side of the screen). I didn't investigate the fix further because I found that the "SDL_MOUSE_RELATIVE=0" allows to use touchscreen perfectly in the XBMC Live 1o version that was my main goal (added line "export SDL_MOUSE_RELATIVE=0" to the /usr/bin/runXBMC to my local version). In the Ubuntu Netbook the SDL_MOUSE_RELATIVE prevents also moving to the top and left border of the screen.

The tested hardware was Exopc ( http://www.exopc.com/en/exopc-slate.php).

Thanx a lot, kais! Quoted your answer here. Maybe someone need the solution too.


- ofer_shm - 2011-02-14

i have the same problem with my touch screen
evrything work good but when i run xbmc in full screen the touch screen stop working

i didnt understand how to solve it , i cant find the file runxbmc

thank you

- Blacksheep70 - 2011-02-14

It's quite easy:

create the file by using your prefered text editor, e.g.
nano /usr/bin/runXBMC

insert following into the file:


Save the file by pressing STRG&X

Make the new created file executeable (I did it as root):

chmod 755 /usr/bin/runXBMC

And that was the trick. At least you have to point the existing auto start for xmbc to the new /usr/bin/runXBMC file.

Works fine on my system. Feel free to ask if you have further issues with the above....


- ofer_shm - 2011-02-15

Thank you very much !!!
it work fine now

thank you very much - oxist - 2011-02-17

i have the same problem on my touchscreen

How do i point the existing auto start for XBMC to the new /usr/bin/runXBMC file?


- barrydocks - 2011-03-03

oxist Wrote:i have the same problem on my touchscreen

How do i point the existing auto start for XBMC to the new /usr/bin/runXBMC file?


I need the same answer? work around works great!

- LoloMc² - 2011-09-16

Thank you for tips, it works too on mine. Just a question, when double clicking on the "runXBMC" file generated, it asks me "launch in a terminal / launch / edit /whatever"...

Is there any way to avoid to answer to this question Huh


- Swifty - 2011-09-17

Just wanted to say thanks for this find! Up until now I'd been manually patching xbmc to get the touchscreen working - now with this fix I don't have to Big Grin

- stujarvis - 2011-11-28

EDIT - Actually, I don't think my issue is XBMC specific at all - I see the same launching X alone. Hmm, must need to fiddle with Ubuntu to get the touch screen working. But that's offtopic here.

Sorry for the noise, I'll leave my original post below anyway, just in case...

Quote:Hi all,

I'm running XBMC on an ExoPC (same hardware as some other posters). It is from XBMC Live 10.1 but is installed to the hard drive now. This thread, the bug report in Trac and a bit of Googling have not enlightened me ;-)

The file /usr/bin/runXBMC already exists so I tried adding
at the start of this file but this has no discernible effect.
As far as I can see, runXBMC in XBMC Live is starting an X session in which to run XBMC (at least, if I try and run xbmc or xbmc-standalone directly it fails due to lack of X). My hunch is that I need to insert the
at a very specific point in this file to get things working. I'm not getting any errors and can launch XBMC from the shell by running runXBMC which also makes me think just the insertion point is somehow wrong.

Can anyone help me with where exactly to insert that command? I can post the current runXBMC contents if that helps. But if you have XBMC live then it is at /usr/bin/runXBMC on your system. I've been inserting 'export SDL_MOUSE_RELATIVE=0' straight after the comments.

Thanks for your time.