You are not logged in.

#1 2012-03-23 04:25:10

rnarch
Member
Registered: 2012-03-17
Posts: 292

Error while opening gui app from commandline[SOLVED]

When I try to run a gui application from command line, I get following error:

# thunar
No protocol specified
Thunar: Cannot open display:

I have not been able to get info regarding this in the wiki.

Last edited by rnarch (2012-03-23 05:53:13)

Offline

#2 2012-03-23 04:34:16

MisterAnderson
Member
Registered: 2011-09-04
Posts: 285

Re: Error while opening gui app from commandline[SOLVED]

Works fine for me here. This link gives a good answer http://www.linuxquestions.org/questions … ot-808706/

Of course, you could always launch it from your user using sudo or gksudo. You'll need to install the gksu package for the latter.

$ gksudo thunar

However, is there any reason that you're trying to launch it as root?

Last edited by MisterAnderson (2012-03-23 04:35:31)


D:

Offline

#3 2012-03-23 04:44:30

rnarch
Member
Registered: 2012-03-17
Posts: 292

Re: Error while opening gui app from commandline[SOLVED]

Thanks for your reply.  I am trying to install gksu but pacman is not working even though browser is. I am putting this in a new thread.

Offline

#4 2012-03-23 04:45:21

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,797

Re: Error while opening gui app from commandline[SOLVED]

You are trying to run thunar as root.  I really suggest you not run GUI stuff that can move and delete stuff with a mouse gesture as root.

I assume you are not running X as root.  If you are, allow me to redouble my previous admonition.   
In your example, are you running that from the command line, or from a terminal emulator under X?

If you must run as root, try MisterAnderson's suggestion, but note that the command is issued as a normal user.
You can also run thunar as root from a terminal by specifying the X session to which to attach, but I cannot put the incantation together off the top of my head.  If you are interested, let us know and someone will probably come up with help.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#5 2012-03-23 05:00:54

rnarch
Member
Registered: 2012-03-17
Posts: 292

Re: Error while opening gui app from commandline[SOLVED]

I really suggest you not run GUI stuff that can move and delete stuff with a mouse gesture as root.

I fully agree. But I have recently installed Arch and I am in the process of setting up for which I often need root access. I am not able to install gksu as I am having some trouble with pacman (pl. see my other thread).

Offline

#6 2012-03-23 05:36:01

rnarch
Member
Registered: 2012-03-17
Posts: 292

Re: Error while opening gui app from commandline[SOLVED]

I have installed gksu and now following is the error:

# gksu thunar
No protocol specified

(gksu:1786): Gtk-WARNING **: cannot open display: :0.0

Offline

#7 2012-03-23 05:46:04

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,797

Re: Error while opening gui app from commandline[SOLVED]

That command wants to be run as a normal user.
Are you inside an X environment running a terminal, or are you on a console ?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#8 2012-03-23 05:52:47

rnarch
Member
Registered: 2012-03-17
Posts: 292

Re: Error while opening gui app from commandline[SOLVED]

Yes. It is working very well now. I can open all partitions and read as well as write on files.

Many thanks for your help all the way.  I think you guys have made Arch a great distro and this forum and the wiki are really very helpful.

Offline

#9 2012-03-23 06:02:14

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,797

Re: Error while opening gui app from commandline[SOLVED]

Okay.  Here is another way to do it...

ewaller@odin:~ 1001 %xhost +
access control disabled, clients can connect from any host
ewaller@odin:~ 1002 %su
Password: 
[root@odin ewaller]# thunar

The GUI started and had a Big red banned at the top warning I was running as root.

Be afraid, be very afraid...


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#10 2012-03-23 06:30:39

rnarch
Member
Registered: 2012-03-17
Posts: 292

Re: Error while opening gui app from commandline[SOLVED]

Thanks. I'll be careful.

Offline

#11 2012-03-24 02:01:14

MisterAnderson
Member
Registered: 2011-09-04
Posts: 285

Re: Error while opening gui app from commandline[SOLVED]

If you just want to automount partitions, have a look here: https://wiki.archlinux.org/index.php/Th … tomounting


D:

Offline

Board footer

Powered by FluxBB