This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 473465 - Kwrite won't start from the command line (as root ?)
Kwrite won't start from the command line (as root ?)
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: kdebase (Show other bugs)
11
All Linux
medium Severity medium
: ---
: ---
Assigned To: Kevin Kofler
Fedora Extras Quality Assurance
: Reopened
: 473969 479481 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-11-28 11:52 EST by Linuxguy123
Modified: 2009-10-23 12:33 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-12-01 13:50:05 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Linuxguy123 2008-11-28 11:52:56 EST
Description of problem:

Kwrite won't start from a konsole as root.  #kwrite xorg.conf does nothing.

Version-Release number of selected component (if applicable):

$ uname -a
Linux localhost.localdomain 2.6.27.5-117.fc10.i686 #1 SMP Tue Nov 18 12:19:59 EST 2008 i686 i686 i386 GNU/Linux

 yum list *kde*                                                                            
Loaded plugins: kmdl, priorities, refresh-packagekit                                                           
0 packages excluded due to repository priority protections                                                     
Installed Packages                                                                                             
PyKDE4.i386                                                 4.1.3-1.fc10                                    installed
kde-filesystem.noarch                                       4-20.fc10                                       installed
kde-settings.noarch                                         4.1-4.20081031svn.fc10                          installed
kde-settings-kdm.noarch                                     4.1-4.20081031svn.fc10                          installed
kdeaddons-atlantikdesigner.i386                             3.5.10-2.fc10                                   installed
kdeadmin.i386                                               7:4.1.3-1.fc10                                  installed
kdeartwork.i386                                             4.1.3-2.fc10                                    installed
kdeartwork-extras.i386                                      4.1.3-2.fc10                                    installed
kdeartwork-kxs.i386                                         4.1.3-2.fc10                                    installed
kdebase.i386                                                6:4.1.3-2.fc10                                  installed
kdebase-libs.i386                                           6:4.1.3-2.fc10                                  installed
kdebase-runtime.i386                                        4.1.3-1.fc10                                    installed
kdebase-runtime-libs.i386                                   4.1.3-1.fc10                                    installed
kdebase-workspace.i386                                      4.1.3-6.fc10                                    installed
kdebase-workspace-libs.i386                                 4.1.3-6.fc10                                    installed
kdebase3.i386                                               3.5.10-2.fc10                                   installed
kdebase3-libs.i386                                          3.5.10-2.fc10                                   installed
kdebase3-pim-ioslaves.i386                                  3.5.10-2.fc10                                   installed
kdegames.i386                                               6:4.1.3-1.fc10                                  installed
kdegames-libs.i386                                          6:4.1.3-1.fc10                                  installed
kdegames3.i386                                              3.5.10-2.fc10                                   installed
kdegames3-libs.i386                                         3.5.10-2.fc10                                   installed
kdegraphics.i386                                            7:4.1.3-2.fc10                                  installed
kdegraphics-libs.i386                                       7:4.1.3-2.fc10                                  installed
kdelibs.i386                                                6:4.1.3-3.fc10                                  installed
kdelibs-common.i386                                         6:4.1.3-3.fc10                                  installed
kdelibs3.i386                                               3.5.10-1.fc10                                   installed
kdemultimedia.i386                                          6:4.1.3-1.fc10                                  installed
kdemultimedia-extras-freeworld.i386                         6:3.5.10-1.fc8                                  installed
kdemultimedia-libs.i386                                     6:4.1.3-1.fc10                                  installed
kdenetwork.i386                                             7:4.1.3-1.fc10                                  installed
kdenetwork-libs.i386                                        7:4.1.3-1.fc10                                  installed
kdepim.i386                                                 6:4.1.3-1.fc10                                  installed
kdepim-libs.i386                                            6:4.1.3-1.fc10                                  installed
kdepimlibs.i386                                             4.1.3-1.fc10                                    installed
kdeplasma-addons.i386                                       4.1.3-1.fc10                                    installed
kdetoys.i386                                                7:4.1.3-1.fc10                                  installed
kdeutils.i386                                               6:4.1.3-1.fc10                                  installed
lockdev.i386                                                1.0.1-13.fc10                                   installed
lockdev-devel.i386                                          1.0.1-13.fc10                                   installed
solar-kde-theme.noarch                                      0.1.16-2.fc10                                   installed

Konsole-> Help-> About says version 2.1

How reproducible:

Every time now.   Used to work OK ?  I can't remember.

Steps to Reproduce:
1. Open a Konsole.  su cd /etc/X11
2. # kwrite xorg.conf

Actual results:

Nothing happens.  kwrite doesn't appear.  I have to CTRL C to get back to the command line. 

Expected results:

kwrite should appear with xorg.conf open.

Additional info:

I frequently use kwrite from the command line for editing files when I am working in konsole.  Just be cause.  I've been doing this for years.  

I can nano xorg.conf without any problems when kwrite doesn't work, so it isn't a files/permission thing.  I can also browse to the file with Dolphin and open with kwrite and that works too.

I think that kwrite xorg.conf always works when I am a regular user, ie not root.

Here is what I get when I do it as a regular user:

$ kwrite xorg.conf
kwrite(7913)/Kate (Indentation) KateAutoIndent::setMode: mode "0" does not exist
kwrite(7913)/Kate (Indentation) KateAutoIndent::setMode: mode "0" does not exist
kwrite(7913)/Kate (Indentation) KateAutoIndent::setMode: mode "0" does not exist
kwrite(7913)/Kate (Indentation) KateAutoIndent::setMode: mode "0" does not exist
kwrite(7913)/Kate (Indentation) KateAutoIndent::setMode: mode "0" does not exist
QThreadStorage: Thread 0x8b5d9e0 exited after QThreadStorage 2147483645 destroyed

Thanks
Comment 1 Linuxguy123 2008-11-28 12:37:10 EST
I did some further testing.  It isn't just kwrite that won't start.

#dolphin doesn't work either.

Nor does $kdesu kwrite, nor does $kdesu dolphin.

Thanks
Comment 2 Kevin Kofler 2008-11-28 14:56:15 EST
Use /usr/libexec/kde4/kdesu to start apps as root in a non-root session. The KDE 3 kdesu (which is what /usr/bin/kdesu is) is known not to work for KDE 4 applications, and running X11 apps inside su sessions has never worked reliably.
Comment 3 Kevin Kofler 2008-12-01 12:48:08 EST
*** Bug 473969 has been marked as a duplicate of this bug. ***
Comment 4 Linuxguy123 2008-12-01 13:44:43 EST
"running X11 apps inside su sessions has never worked
reliably."

That is incorrect.   I have been running editors and browsers as su from the command line in a non su session since RH8. I have never had a problem until now.

Why is /usr/bin/kdesu a KDE3 app ?  Asking the user to use /usr/libexec/kde4/kdesu is a work around.  How is a general user supposed to know this ?   Something like this should at least be in the release notes. 

I am going to open this bug so my comment is at least heard.
Comment 5 Kevin Kofler 2009-01-10 13:50:59 EST
*** Bug 479481 has been marked as a duplicate of this bug. ***
Comment 6 Need Real Name 2009-01-11 13:16:16 EST
"running X11 apps inside su sessions has never worked
reliably."

I agree with comment #4 - it has always worked for me.

For a long time Fedora and Red Hat have taken the trouble to ensure that su sessions have the correct authority to run X11 applications securely, not only propagating the value of DISPLAY, but also setting XAUTHORITY.

Yet the present issue is "not a bug" because we aren't supposed to be using Fedora this way.

An unintended consequence of closing this bug is that when users search Bugzilla for bugs with the default search setting status=new/assigned (as I did, before filing bug 479481) they won't see this report.  They will file the same bug over and over again.  In the end it will be less annoying for the Fedora maintainers just to "fix" the bug.

Keith.

(BTW, the bug is a minor issue - I'm very pleased with Fedora 10 and its distribution of KDE 4.  I recommend the upgrade to anyone still using older Fedora versions with KDE 3.)
Comment 7 Kevin Kofler 2009-01-11 15:03:59 EST
Closing a bug as a duplicate takes all of 5 seconds, and if we get too many of them, we can even script it.

(But IMHO Bugzilla's defaults are broken and it should always return closed bugs too, but you have to file a bug against the Bugzilla if you want that changed.)
Comment 8 Rex Dieter 2009-01-30 10:01:07 EST
fyi,
> Why is /usr/bin/kdesu a KDE3 app ?

We recently fixed this so that /usr/bin/kdesu is now shipped using the functional kde4 version.
Comment 9 Linuxguy123 2009-10-23 11:05:05 EDT
This is still a problem.

Neither of the following work:

#kwrite
#kdesu kwrite

How is one supposed to open a file owned by root in a graphical editor, aside from logging in as root ?  Which we all agree is not a great thing to do, for a number of reasons.

I'm opening a new bug on this.
Comment 10 Kevin Kofler 2009-10-23 11:13:25 EDT
Uh, kdesu normally works. But you have to run kdesu write from a non-root terminal (or from Alt+F2)! It's kdesu which makes the app run as root.

If that also doesn't work, I can only assume you corrupted something in your configuration by attempting to use su.
Comment 11 Kevin Kofler 2009-10-23 11:14:00 EDT
Oops, I mean "kdesu kwrite", not "kdesu write".
Comment 12 Linuxguy123 2009-10-23 11:49:49 EDT
Please read my post carefully.  I agree that $kdesu kwrite works.  #kdesu kwrite doesn't.  Nor does #kwrite.  #kwrite used to work just fine.  I used it for years.

I run as su when I am doing maintenance.  I cd to where the files are that I am working with and I work there.  Often the directories are owned by root and you can't even get into them as a regular user.   

To use $kdesu kwrite under these conditions, I must start another session (thankfully its a tab in Konsole) and run it as a regular user and then jump back and forth between the two sessions as I chose to use command line commands and graphical tools, ie kwrite.  That is a pain !

Is there a way for developers to make #kwrite or #kdesu kwrite work ?
Comment 13 Kevin Kofler 2009-10-23 11:56:46 EDT
> #kdesu kwrite doesn't.

It's not expected to.
Comment 14 Rex Dieter 2009-10-23 12:33:29 EDT
ssh -X root@localhost
should work too (taking advantage of ssh's tunelling)

Note You need to log in before you can comment on or make changes to this bug.