Bug 1945933

Summary: scripts started out of nautilus misses $PWD
Product: [Fedora] Fedora Reporter: Ronald Warsow <rwarsow>
Component: nautilusAssignee: Matthias Clasen <mclasen>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 34CC: caillon+fedoraproject, cosimo.cecchi, gnome-sig, mclasen, philip.wyett, rhughes, rwarsow, samuel-rhbugs, sandmann
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: nautilus-40.1-2.fc34 Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-05-08 01:34:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ronald Warsow 2021-04-02 18:15:28 UTC
Description of problem:
shell scripts started via "Run as Program" under nautilus misses the correct $PWD.

$PWD is always /home/<user>

this has some dangerous side effects, if the scripts runs commands which are only intented to run in the dir where the scripts was started.  

e.g. rm -rf ./<something>


Version-Release number of selected component (if applicable):
nautilus-40.0-1.fc34.x86_64

How reproducible:
build a script with echo $(pwd) or echo $PWD in it.
the output is always /home/<user>

Expected results:

an upgrade from F33 to F34 shouldn't break user scripts

Comment 1 Ronald Warsow 2021-04-30 22:54:22 UTC
cause nobody cared:
https://gitlab.gnome.org/GNOME/nautilus/-/issues/1842

Comment 2 Ronald Warsow 2021-05-06 22:15:07 UTC
houston, the bug is fixed with nautilus-40.1-2.fc34 (kudos to kalev and António Fernandes)

please close this one

Comment 3 Fedora Update System 2021-05-06 22:49:22 UTC
FEDORA-2021-385c0e758d has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-385c0e758d

Comment 4 Fedora Update System 2021-05-07 02:07:41 UTC
FEDORA-2021-385c0e758d has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-385c0e758d`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-385c0e758d

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 5 Fedora Update System 2021-05-08 01:34:16 UTC
FEDORA-2021-385c0e758d has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.