Bug 381756 - kwrite sudoedit <a_file> opens 2 windows
Summary: kwrite sudoedit <a_file> opens 2 windows
Status: RESOLVED NOT A BUG
Alias: None
Product: kate
Classification: Applications
Component: kwrite (show other bugs)
Version: 17.04.2
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-28 12:11 UTC by gerald.maruccia
Modified: 2017-06-30 12:48 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gerald.maruccia 2017-06-28 12:11:08 UTC
Hi,

kde-neon user edition, kwrite v17.04.2

kwrite sudoedit <a_file>

opens 2 windows :
- one on <a_file>
- a second one on an empty new file

I expected only one window for <a_file>
Comment 1 Kåre Särs 2017-06-29 05:20:44 UTC
Hi,

You forgot to add "SUDO_EDITOR=" in front of kwrite.

The first part (SUDO_EDITOR=kwrite) is to set the environment variable SUDO_EDITOR to kwrite and the later part (sudoedit <a_file>) is to start the specified editor.

So you can permanently add the environment variable by adding "export SUDO_EDITOR=kwrite" to the end of your .bachrc file to not have to set it every time.

Regards,
 Kåre
Comment 2 gerald.maruccia 2017-06-29 10:41:25 UTC
Indeed… http://hpics.li/ea90c59 …my bad !

Coming from another DE I may ask silly things.

I've also noticed I actually do not need to launch kwrite as root to be able to modify a system file since kwrite asks for my password before saving. Is this intended behavior ?
Comment 3 Kåre Särs 2017-06-30 08:37:34 UTC
That asking for password before saving is a _very_ resent feature of KIO from the KF5 libraries :)
Comment 4 gerald.maruccia 2017-06-30 12:48:01 UTC
(In reply to Kåre Särs from comment #3)
> That asking for password before saving is a _very_ resent feature of KIO
> from the KF5 libraries :)

…and it's very convenient ! Thanks for your answers.