LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices


Reply
  Search this Thread
Old 12-05-2018, 11:27 AM   #1
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,959

Rep: Reputation: 55
Running okular (pdf reader) from an Xfce terminal I get Could not connect to any X display.


I am at an Xfce terminal and therefor under X. But watch this:
Code:
root@darkstar/almacen/Nonsoft/libros/math# ls -l
total 62M
-rwxr-xr-x 1 bill bill 9.7M Dec  5 08:45 _Calculus_Vol_2.djvu
-rwxr-xr-x 1 bill bill 4.0M Dec  5 08:45 halmos_measure_theory.djvu
-rwxr-xr-x 1 bill bill 1.7M Dec  5 08:45 Kargapolov.djvu
-rwxr-xr-x 1 bill bill  387 Dec  5 08:45 lq01
-rwxr-xr-x 1 bill bill 1.6M Dec  5 08:45 Naive_set_theory.djvu
drwxr-xr-x 2 bill bill 4.0K Dec  5 08:45 para_ver
-rwxr-xr-x 1 bill bill  144 Dec  5 08:45 pepe
-rwxr-xr-x 1 bill bill 671K Dec  5 08:45 Polites.djvu
-rwxr-xr-x 1 bill bill 491K Dec  5 08:45 presentation_of_group.pdf
-rwxr-xr-x 1 bill bill 321K Dec  5 08:45 problemas.pdf
-rwxr-xr-x 1 bill bill  14M Dec  5 08:45 Robinson_2.pdf
-rwxr-xr-x 1 bill bill 7.4M Dec  5 08:45 Robinson.djvu
-rwxr-xr-x 1 bill bill 1.1K Dec  5 08:45 Robinson.txt
-rwxr-xr-x 1 bill bill  931 Dec  5 08:45 Robinson.txt~
-rwxr-xr-x 1 bill bill 5.4M Dec  5 08:45 Rotman_4th.djvu
-rwxr-xr-x 1 bill bill  16M Dec  5 08:45 Schaum_Group_Theory.pdf
-rwxr-xr-x 1 bill bill 1.6M Dec  5 08:45 Secrets_of_Pawnless_Endings.djvu
drwxr-xr-x 2 bill bill 4.0K Dec  5 08:45 topology
root@darkstar/almacen/Nonsoft/libros/math# okular Polites.djvu 
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
qt.qpa.screen: QXcbConnection: Could not connect to display 
Could not connect to any X display.
root@darkstar/almacen/Nonsoft/libros/math#
Any way to expllain this weird behaviour?
 
Old 12-05-2018, 11:44 AM   #2
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,252

Rep: Reputation: 60
can you start other X programs from this same terminal?
 
Old 12-05-2018, 12:13 PM   #3
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: CentOS, Xubuntu
Posts: 5,124

Rep: Reputation: 1708Reputation: 1708Reputation: 1708Reputation: 1708Reputation: 1708Reputation: 1708Reputation: 1708Reputation: 1708Reputation: 1708Reputation: 1708Reputation: 1708
Does it work if you are not logged-in as root?
 
Old 12-05-2018, 12:23 PM   #4
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,959

Original Poster
Rep: Reputation: 55
Thanks for your reply. Could you give me the name of some oof them? I could run mplayer on some video file, but I haven't any and trying to download one I stumbled on unexpected errors.

Last edited by stf92; 12-05-2018 at 12:25 PM.
 
Old 12-05-2018, 12:41 PM   #5
petelq
Member
 
Registered: Aug 2008
Location: UK
Distribution: openSUSE(Leap and Tumbleweed) and a regularly changing third
Posts: 328

Rep: Reputation: Disabled
Did you install okular from thr xfce repos? It's a kde package so may be missing some kde libraries.
 
Old 12-05-2018, 12:44 PM   #6
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,959

Original Poster
Rep: Reputation: 55
Quote:
Originally Posted by DavidMcCann View Post
Does it work if you are not logged-in as root?
Yes it does!
 
Old 12-05-2018, 02:11 PM   #7
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,252

Rep: Reputation: 60
maybe the root login isn't setting the DISPLAY variable?
 
Old 12-05-2018, 03:36 PM   #8
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 10,157
Blog Entries: 7

Rep: Reputation: 2513Reputation: 2513Reputation: 2513Reputation: 2513Reputation: 2513Reputation: 2513Reputation: 2513Reputation: 2513Reputation: 2513Reputation: 2513Reputation: 2513
^ sounds like a sane thing to do.
 
Old 12-05-2018, 05:59 PM   #9
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,959

Original Poster
Rep: Reputation: 55
Code:
bill@darkstar/etc/netctl$ su -
Password: 
root@darkstar~# echo $DISPLAY

root@darkstar~#
 
Old 12-06-2018, 12:41 PM   #10
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: CentOS, Xubuntu
Posts: 5,124

Rep: Reputation: 1708Reputation: 1708Reputation: 1708Reputation: 1708Reputation: 1708Reputation: 1708Reputation: 1708Reputation: 1708Reputation: 1708Reputation: 1708Reputation: 1708
Try setting the necessary value for DISPLAY from /root/.profile
 
Old 12-06-2018, 01:11 PM   #11
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,959

Original Poster
Rep: Reputation: 55
Quote:
Originally Posted by DavidMcCann View Post
Does it work if you are not logged-in as root?
Logged-in as a regular user it works. I have tried to run ristretto as root too, aand again it cannot open the display. As to your other post, I do not have a /root/.profile. Could inspection of Xorg.0.log tell me something?

Last edited by stf92; 12-06-2018 at 01:16 PM.
 
Old 12-06-2018, 02:04 PM   #12
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,252

Rep: Reputation: 60
from your root terminal, try,
Code:
export DISPLAY=:0
before the
Code:
okular Polites.djvu

Last edited by whansard; 12-06-2018 at 02:06 PM.
 
Old 12-06-2018, 02:05 PM   #13
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 11,601

Rep: Reputation: 3494Reputation: 3494Reputation: 3494Reputation: 3494Reputation: 3494Reputation: 3494Reputation: 3494Reputation: 3494Reputation: 3494Reputation: 3494Reputation: 3494
X has its own authentication. You started your display as user and root has no right to access to it. You need to open those documents as regular user.
 
1 members found this post helpful.
Old 12-06-2018, 02:26 PM   #14
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,959

Original Poster
Rep: Reputation: 55
Thanks.
 
Old 12-07-2018, 12:24 PM   #15
zeebra
Member
 
Registered: Dec 2011
Distribution: Mageia, Slackware, Maemo
Posts: 419
Blog Entries: 1

Rep: Reputation: Disabled
Probably you would rather want to open the PDF as a user. If not, you need to export the display.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Adobe Reader and Okular not working rahulrajaram2005 Slackware 12 05-23-2013 05:10 PM
Okular bookmarks, annotations lost for renamed PDFs, etc. (Okular 0.16.2, KDE 4.10.2) Geremia Linux - Software 4 05-04-2013 02:51 PM
LXer: Listen to your books (ePUB or PDF) with Okular, KDE's PDF Reader LXer Syndicated Linux News 0 06-22-2012 07:30 AM
[SOLVED] how to set okular as default pdf reader after installing adobereader? (KDE4) zyli2006 Slackware 2 10-02-2009 03:33 PM
Why Do I Need KDE for Okular PDF Reader?? taurusx5 Linux - Software 1 04-03-2008 08:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook

All times are GMT -5. The time now is 12:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration