LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   unable to open pdf documents from root..... (https://www.linuxquestions.org/questions/linux-software-2/unable-to-open-pdf-documents-from-root-607255/)

majji.hari 12-17-2007 12:43 AM

unable to open pdf documents from root.....
 
hi all,
im unable to open pdf documents,(with pdf viewer,kghostview ,kpdf)from root but im able to do so as a user,(just like mozilla post),is there any way to open the document,i think all this is because of shutting down system without closing the applications that were currently running in root......so is there any way to make all of them working???EARLIER THEY WERE ALL WORKING......how could i correct this??

kotnik 12-17-2007 12:45 PM

Dude, don't use GUI apps as root. It's a bad practice, and it'll bite you sooner or later.

But, if you insist, you can. Since you gave no hint, I presume it's about access control. So, when you login, type this in your terminal:

xhost +

All access control on your screen will be disabled, and root will be able to open windows. And everyone else on the Internet, as a matter of fact :) So, you'd want to do this:

xhost +localhost

Once you've done, just drop:

xhost

And things will be controled again.

majji.hari 12-18-2007 06:07 AM

after trying what u have mentioned i got the following error
(gpdf:5284): Bonobo-WARNING **:Activation exception 'child process did not give an error message,unknown failure occured'.....
what to do now.....

majji.hari 12-18-2007 06:10 AM

its status....
 
when im trying to open pdf from console or directly by clicking it im getting a plain window(of page size) on screen with no page on it....it is standing still until closed....

kotnik 12-18-2007 09:39 AM

Can you open it as a regular user? Post here everything that appears in your terminal after:

xpdf some.pdf

majji.hari 12-18-2007 10:21 AM

the exact sequence.....
 
yes i agree with ur suggestion for use of GNU in root im able to open pdfs by a click or in console with ease as general user.

the actual error msg in console
-----------------------------------------------------------
[root@localhost ~]# xhost +localhost
localhost being added to access control list
[root@localhost ~]# gpdf gan2.pdf

(gpdf:3584): Bonobo-WARNING **: Activation exception 'Child process did not give an error message, unknown failure occurred'

kotnik 12-18-2007 10:34 AM

I think you can't open anything by clicking its name in console...

And, execute xhost command as a user who started X server, not root.

As last resort, try xpdf or evince instead of gpdf.

majji.hari 12-18-2007 10:40 AM

when im trying xpdf it is showing error command not found or smth.

kotnik 12-18-2007 12:33 PM

Ok, you've just made me install gpdf, so I could see what's going on :)

It fire's up just fine. Well, it seems to me that you have some deeper issues here. Try to uninstall gpdf and install it again, maybe you've killed some dependecies for it. Or install xpdf.

exvor 12-18-2007 05:53 PM

It probably has something to do with pathing. If you are su'ing to root then you are probably not getting everything set properly. try su -l and see if that fixes the issue.

majji.hari 12-19-2007 01:03 AM

no getting the same error with that also...

Tinkster 12-19-2007 01:40 AM

Excellent. The system is trying really hard to tell you NOT
TO USE IT AS ROOT. Listen to it. It's quite right.



Cheers,
Tink

majji.hari 12-19-2007 04:52 AM

im ready to listen to them and accept :)...but let me recover from this shock!!

kotnik 12-19-2007 07:05 AM

Don't percieve it as shock.

You can easily kill your system with high-level tools when using them as root, and that would be a shock. So, take this as an advice from your computer :)


All times are GMT -5. The time now is 05:46 PM.