Bug 179863 - commands called with sudo in scripts are ignored
Summary: commands called with sudo in scripts are ignored
Status: RESOLVED DUPLICATE of bug 225563
Alias: None
Product: kde
Classification: I don't know
Component: general (show other bugs)
Version: unspecified
Platform: Fedora RPMs Unspecified
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-07 00:17 UTC by 501337
Modified: 2011-09-22 23:39 UTC (History)
2 users (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 501337 2009-01-07 00:17:16 UTC
Version:            (using KDE 4.1.3)
Installed from:    Fedora RPMs

It's not possible to have commands with sudo prior to it in scripts, if you want to run them by doubleklicking it, with Alt-F2 or from an menu entry, because these commands will be ignored and never be called.
If you try it from an open console, it works fine.

A little example:

#!/bin/bash
kwrite
exit 0

This script works. No problems.
If you try

#!/bin/bash
sudo kwrite
exit 0

it only works in an open console.
Doubleklicking the file cause nothing.

I always have to run konsole first, to make such a script work properly.

I don't think this is a wilful behaviour.
Hope it will be fixed.
Comment 1 Robert Åkerblom-Andersson 2009-03-05 00:04:29 UTC
Hi, I just tested this bug and it does not seam like a bug to me!

When I use the exact code that your referring to it works out of the box for me.... :) 

(Arch Linux, KDE 4.2.1)

Regards
Comment 2 501337 2009-03-05 12:31:31 UTC
Thanks for testing.
Seems to be a fedora-specific problem.
It still occours with the KDE-4.2.0-packages.

Regards
Comment 3 Jekyll Wu 2011-09-22 23:39:20 UTC
That is because when double clicking a script, dolphin run it silently insteand of running it in konsole.See comment #8 in bug #225563 for detail.

*** This bug has been marked as a duplicate of bug 225563 ***