Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
cannot open display
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Portuguese
View previous topic :: View next topic  
Author Message
ruina
n00b
n00b


Joined: 16 Aug 2003
Posts: 21

PostPosted: Fri Aug 29, 2003 12:46 am    Post subject: cannot open display Reply with quote

Pessoal,

Eu preciso iniciar uma aplicação como root mas no ambiente X de usuário... mas eu não estou conseguindo pois dá a seguinte mensagem quando executo:

Code:

Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified


Gtk-WARNING **: cannot open display: :0.0


Não tenho idéia do que devo fazer.... para que não haja essa restrição de uso?

Obrigado,

-ruina
Back to top
View user's profile Send private message
AngusYoung
Retired Dev
Retired Dev


Joined: 20 Dec 2002
Posts: 473
Location: Campinas, SP - Brazil

PostPosted: Fri Aug 29, 2003 1:39 am    Post subject: Reply with quote

Você tá usando ssh ?
_________________
N.U.S.: A cross platform C++ application development framework
My blog (in Portuguese)
Back to top
View user's profile Send private message
cleber
n00b
n00b


Joined: 05 Aug 2003
Posts: 74
Location: São Paulo - Brazil

PostPosted: Fri Aug 29, 2003 2:45 am    Post subject: Reply with quote

Por um momento pensei que era um post em inglês... hehehe

Eu tb tive isto qdo tentei dar um xconfig (não sei porque, já que uso o menuconfig...) do kernel.

Para isto, volte a ser o usuário que logou no X e rode o comando com sudo. Para isto, vc tem que estar no /etc/sudoers .

Para dar make xconfig, vc precisa fazer o seguinte:

Code:
sudo make xconfig

e entrar a sua senha.

Good luck, man!
_________________
Saru mo ki kara ochiru - Japanese proverb.
Cleber Mori Home Page: http://www.2ks.com.br
Back to top
View user's profile Send private message
pilla
Administrator
Administrator


Joined: 07 Aug 2002
Posts: 7209
Location: Pelotas, BR

PostPosted: Fri Aug 29, 2003 12:23 pm    Post subject: Reply with quote

Para o bash,

usuario:

Code:

%xhost + localhost


root:
Code:

%export DISPLAY=localhost:0

_________________
"I'm just very selective about the reality I choose to accept." -- Calvin
Back to top
View user's profile Send private message
humpback
Retired Dev
Retired Dev


Joined: 19 Oct 2002
Posts: 394
Location: Coimbra - Portugal

PostPosted: Sun Aug 31, 2003 12:37 am    Post subject: Reply with quote

Pilla: Esse método é um pouco mau pois abre uma série de buracos.

Code:

humpback@sam humpback $ su -
Password:
sam root # xauth merge /home/humpback/.Xauthority
sam root # xeyes


Neste momento já deve aparecer uns olhinhos :)

Caso nada apareça (e este método é ainda mais limpo):

Code:

humpback@sam humpback $ su -
Password:
sam root # export XAUTHORITY=/home/humpback/.Xauthority
sam root # xeyes


Em alternativa (mas que come muito mais CPU) é alterar a configuração do sshd para aceitar ligações como root e:
Code:

humpback@sam humpback $ ssh -X root@localhost
root@localhost's password:
Last login: Sun Aug 31 01:33:50 2003 from localhost
/usr/X11R6/bin/xauth:  creating new authority file /root/.Xauthority
sam root # xeyes


A melhor forma é mesmo a segunda.
_________________
Gustavo Felisberto
Humpback @ #gentoo-pt
------------
It's most certainly GNU/Linux, not Linux. Read more at
http://www.gnu.org/gnu/why-gnu-linux.html .
-------------
Back to top
View user's profile Send private message
ruina
n00b
n00b


Joined: 16 Aug 2003
Posts: 21

PostPosted: Wed Sep 03, 2003 7:51 pm    Post subject: Reply with quote

Infelizmente... nenhuma dessas opções funcionaram. :( :( :(

Code:

priss root # export XAUTHORITY=/home/humpback/.Xauthority
priss root # mtr www.uol.com.br
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

Gtk-WARNING **: cannot open display: :0.0
Back to top
View user's profile Send private message
AngusYoung
Retired Dev
Retired Dev


Joined: 20 Dec 2002
Posts: 473
Location: Campinas, SP - Brazil

PostPosted: Wed Sep 03, 2003 8:55 pm    Post subject: Reply with quote

ruina wrote:
Infelizmente... nenhuma dessas opções funcionaram. :( :( :(

Code:

priss root # export XAUTHORITY=/home/humpback/.Xauthority
priss root # mtr www.uol.com.br
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

Gtk-WARNING **: cannot open display: :0.0
substitui export XAUTHORITY=/home/humpback/.Xauthority por export XAUTHORITY=/home/meuhome/.Xauthority :)
(se o seu home for "humpback" desconsidere :? )
_________________
N.U.S.: A cross platform C++ application development framework
My blog (in Portuguese)
Back to top
View user's profile Send private message
humpback
Retired Dev
Retired Dev


Joined: 19 Oct 2002
Posts: 394
Location: Coimbra - Portugal

PostPosted: Thu Sep 04, 2003 2:03 am    Post subject: Reply with quote

ruina wrote:
Infelizmente... nenhuma dessas opções funcionaram. :( :( :(

Code:

priss root # export XAUTHORITY=/home/humpback/.Xauthority
priss root # mtr www.uol.com.br
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

Gtk-WARNING **: cannot open display: :0.0


Hrrrrr...... humpback é o meu username, no seu caso deve colocar o login do seu user.
_________________
Gustavo Felisberto
Humpback @ #gentoo-pt
------------
It's most certainly GNU/Linux, not Linux. Read more at
http://www.gnu.org/gnu/why-gnu-linux.html .
-------------
Back to top
View user's profile Send private message
pilla
Administrator
Administrator


Joined: 07 Aug 2002
Posts: 7209
Location: Pelotas, BR

PostPosted: Thu Sep 04, 2003 11:43 am    Post subject: Reply with quote

humpback wrote:

Hrrrrr......


Amigo..... amigo..... calma..... :)
_________________
"I'm just very selective about the reality I choose to accept." -- Calvin
Back to top
View user's profile Send private message
ruina
n00b
n00b


Joined: 16 Aug 2003
Posts: 21

PostPosted: Sat Sep 06, 2003 8:25 pm    Post subject: Reply with quote

hehehehe!! essa foi muito boa!!

Minha total falta de atenção.... Me desculpem hehehehe :lol: :lol:


Quando olhei já havia postado.... "humpback" parece ser um comando muito comum. hehehe que mané eu fui!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portuguese All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum