You are not logged in.

#1 2007-04-17 02:37:32

rbrownclown
Member
Registered: 2006-12-29
Posts: 125

KWrite refusing to edit files when invoked by terminal.

KWrite refuses to edit/open files when I tell it to through the terminal.  I get the message below.

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

kwrite: cannot connect to X server :0.0

Any ideas on how to fix this?

Offline

#2 2007-04-17 05:15:18

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: KWrite refusing to edit files when invoked by terminal.

Are you trying to run it as root? If you want to use it to modify system config files, start it with:

$ kdesu kwrite

so it'll get proper X display permission.

Offline

#3 2007-04-17 22:48:07

rbrownclown
Member
Registered: 2006-12-29
Posts: 125

Re: KWrite refusing to edit files when invoked by terminal.

Still doesn't work.  Comes up with the same message.

Offline

#4 2007-04-18 02:46:20

rbrownclown
Member
Registered: 2006-12-29
Posts: 125

Re: KWrite refusing to edit files when invoked by terminal.

I just realized that it works when I'm not root.  Is there an explanation for this?

Offline

#5 2007-04-18 04:01:25

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: KWrite refusing to edit files when invoked by terminal.

What works when you're not root: 'kwrite' or 'kdesu kwrite' ?

Offline

#6 2007-04-18 17:37:37

rbrownclown
Member
Registered: 2006-12-29
Posts: 125

Re: KWrite refusing to edit files when invoked by terminal.

Snowman wrote:

What works when you're not root: 'kwrite' or 'kdesu kwrite' ?

KWrite still doesn't work when I'm not root, but kdesu kwrite does.

Offline

#7 2007-04-18 18:18:09

hacosta
Member
From: Mexico
Registered: 2006-10-22
Posts: 423

Re: KWrite refusing to edit files when invoked by terminal.

as the user in which you are running x, do
xhost +localhost
su -c kwrite

Offline

Board footer

Powered by FluxBB