Hi,
It seems the inverse search from Okular only moves the cursor to the corresponding position in LyX, but it does not activate the LyX window. So I made the following script:
lyxclient -g $1 $2
wmctrl -a LyX
wmctrl -a LyX
save it (here "/home/yourname/okular_inverse_search" for example), and in Configure Okular -> Editor, select Custom Text Editor, and put the following:
bash /home/yourname/okular_inverse_search %f %l
Now when you shift-right click on a line in Okular, it will do inverse search and then activate LyX automatically.
Of course, you have to have wmctrl installed.
Hope this is useful to somebody. :)
-Joon