this may not be strictly about programming, but if I find no ready-made solution it may become a programming task: On UNIX, what is a command-line method f
The answer differs depending on the desktop environment your using. Since you mentioned Okular, I'm going to assume you're using KDE. So try:
kde-open
For GNOME, there is the equivalent:
gnome-open