Author Topic: "kwrite /etc/fstab" fails  (Read 1820 times)

Offline mab33

  • Jr. Member
  • **
  • Posts: 29
"kwrite /etc/fstab" fails
« on: April 25, 2010, 07:19:10 AM »
Wanting to change /etc/fstab, I fired up kwrite, but it failed to open:

[root@localhost ~]# kwrite /etc/fstab
No protocol specified
kwrite: cannot connect to X server :0.0

  What on earth is that all about?!

Offline mab33

  • Jr. Member
  • **
  • Posts: 29
Re: "kwrite /etc/fstab" fails
« Reply #1 on: April 25, 2010, 07:20:24 AM »
P.S. I should have said that I'm using the latest PCLinuxOS 2010 - fully updated.

Offline mab33

  • Jr. Member
  • **
  • Posts: 29
Re: "kwrite /etc/fstab" fails
« Reply #2 on: April 25, 2010, 07:21:38 AM »
P.S. (2)  KDE version

Offline Texstar

  • Administrator
  • Super Villain
  • *****
  • Posts: 12506
Re: "kwrite /etc/fstab" fails
« Reply #3 on: April 25, 2010, 07:24:20 AM »


The command in a root terminal is dbus-launch kwrite


Thanks to everyone who donates. You keep the servers running.

Online pinoc

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2841
    • other projects...
Re: "kwrite /etc/fstab" fails
« Reply #4 on: April 25, 2010, 07:35:41 AM »
Wanting to change /etc/fstab, I fired up kwrite, but it failed to open:

[root@localhost ~]# kwrite /etc/fstab
No protocol specified
kwrite: cannot connect to X server :0.0

  What on earth is that all about?!

looks to me that you did the following:
you were in your user account, then opened a konsole, then "su -" and entered your root-pwd, then "kwrite /etc/fstab"

the error message suggests that you did not provide X-access to root.
try this from a konsole in your user-account:
Code: [Select]
xhost +
su -
{and enter your root-pwd}
kwrite /etc/fstab &

-p.

Offline doctore

  • Sr. Member
  • ****
  • Posts: 376
Re: "kwrite /etc/fstab" fails
« Reply #5 on: April 25, 2010, 07:54:27 AM »
I am having the same problem. I tried "xhost" and "xhost +" and got

No protocol specified
xhost:  unable to open display ":0.0"



Offline JohnW_57

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2115
Re: "kwrite /etc/fstab" fails
« Reply #6 on: April 25, 2010, 08:19:07 AM »
More options to edit /etc/fstab.

ALT-F2 runs Krunner and type kdesu kwrite /etc/fstab (works here).
Konsole (non-superuser mode): type kdesu kwrite /etc/fstab .

JohnW
« Last Edit: April 25, 2010, 08:24:15 AM by JohnW »
PCLinuxOS 2013 KDE4 (64 bit) on: home build system:  Intel Core 2 Quad (q6700) (2.66ghz), Asus P5K motherboard, 4 gig ddr2 memory, Asus Nvidia Geforce GTS 250 1024 mb gddr3, Crucial M4 128 SSD,  2x Samsung 500 gig HDD (sata), TSSTcorp CDDVDW SH-224BB.

Offline mab33

  • Jr. Member
  • **
  • Posts: 29
Re: "kwrite /etc/fstab" fails
« Reply #7 on: April 25, 2010, 10:37:53 AM »
I'll try the kdesu approach when I get back to base. (I'm away with non-PCLinuxOS laptop at the moment.)

But with Mandriva I can do:

   [mab@laptop ~]$ su - root
   Password:
   [root@laptop ~]# kwrite /etc/fstab

Offline mab33

  • Jr. Member
  • **
  • Posts: 29
Re: "kwrite /etc/fstab" fails
« Reply #8 on: April 25, 2010, 10:43:01 AM »


The command in a root terminal is dbus-launch kwrite



Never heard of that!  With Mandriva I can simply do:

   [mab@laptop ~]$ su - root
   Password:
   [root@laptop ~]# kwrite /etc/fstab



Offline muungwana

  • Hero Member
  • *****
  • Posts: 6235
Re: "kwrite /etc/fstab" fails
« Reply #9 on: April 25, 2010, 10:50:48 AM »
can you log from the GUI in root account? its been my experience that error msg shows up when "~/.Xauthority" text file is missing.

a simple test to show this.

[ink@kdi ~]$ mkdir test                                  <---- create a new folder
[ink@kdi ~]$ cd test                                      <---- cd to new folder
[ink@kdi test]$ export HOME=/home/ink/test/   <----make new folder home folder
[ink@kdi test]$ kwrite                                    <----- run kwrite with new home
No protocol specified                                      <---- error
kwrite: cannot connect to X server :0.0             <---- error  
[ink@kdi test]$ cp  /home/ink/.Xauthority .         <--- copy the txt file "old" to "new" home
[ink@kdi test]$ kwrite                                      <---- kwrite works
.. 3 things are certain in life : death, taxes and software bloat ..
.. tell me something i don't know, something i can use as i struggle to reason with the world around me ..

Offline daniel

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3731
  • God knows, i'm not an Angel!
    • Tipps und Tricks
Re: "kwrite /etc/fstab" fails
« Reply #10 on: April 25, 2010, 12:32:52 PM »


The command in a root terminal is dbus-launch kwrite



Never heard of that!  With Mandriva I can simply do:

   [mab@laptop ~]$ su - root
   Password:
   [root@laptop ~]# kwrite /etc/fstab



Make it simple, to copy for your user konsole
Code: [Select]
kdesu "kwrite /etc/fstab" ;)

Offline mab33

  • Jr. Member
  • **
  • Posts: 29
Re: "kwrite /etc/fstab" fails
« Reply #11 on: April 26, 2010, 10:37:38 AM »
Even if "kdesu kwrite /etc/fstab" works, the problem I would have (if kdesu is going to ask for the root password each time) is that - when starting with a new installation - there are a number of root files I need to modify.
    So far I've been able to go into root mode, then simply, issue several 'kwrite' commands.
I really don't want to keep having to enter the root password for every kwrite.

On the other hand, if - when in root mode - I can keep on issuing the 'kwrite' as "dbus-launch kwrite". then that would suffice - if KDE 4.4 is not going to allow any other arrangement...

Online pinoc

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2841
    • other projects...
Re: "kwrite /etc/fstab" fails
« Reply #12 on: April 26, 2010, 10:49:44 AM »
Never heard of that!  With Mandriva I can simply do:

   [mab@laptop ~]$ su - root
   Password:
   [root@laptop ~]# kwrite /etc/fstab


exactly this command sequence also works in PCLinuxOS, just did it myself. Do you enter this sequence in a terminal of your own installation or is this a remote login via ssh? In the latter case you need to login with ssh -X to have GUI support.
-p.

Offline markcynt

  • Jr. Member
  • **
  • Posts: 13
Re: "kwrite /etc/fstab" fails
« Reply #13 on: April 26, 2010, 10:55:43 AM »
How about this in a terminal?
Code: [Select]
su - then password,  then
Code: [Select]
kwriteWorks for me.
P5N-E SLI, Core2Duo E6850 3GHZ X 2
2 GB DDR2 800MHZ
EVGA 8800GTS 320MB
2x320GB Hitachi
Arctic Cooling Freezer 7 Pro

Offline Bald Brick

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6377
  • I'm going South
Re: "kwrite /etc/fstab" fails
« Reply #14 on: April 26, 2010, 11:03:58 AM »
Never heard of that!  With Mandriva I can simply do:

   [mab@laptop ~]$ su - root
   Password:
   [root@laptop ~]# kwrite /etc/fstab


exactly this command sequence also works in PCLinuxOS, just did it myself.

And you should even be able to simplify it:

   $ su -
   $ Password:
   # kwrite /etc/fstab

worked a minute ago on my box. The hyphen seems to be necessary though in this incarnation of PCLinuxOS. (It makes the root shell a login shell.)
« Last Edit: April 26, 2010, 11:08:44 AM by blackbird »
Feed the trolls!
They need it!

AMD Athlon 7450 Dual-Core Processor, 7.80 GiB RAM, Nvidia GeForce GT 120/PCIe/SSE2, OpenGL/ES-version: 3.3 0 NVIDIA 295.40, SBx00 Azalia (Intel HDA) soundcard, ‎Logitech B500 webcam, SAA7146 DVB card, HDDs: Seagate 250824AS, Western Digital WD10EAVS-00D