Bug 2115891

Summary: "Can't locate Sys/Hostname.pm in @INC" exception when taking screenshot of window (missing explicit dependency?)
Product: [Fedora] Fedora Reporter: Wheeler Law <whelderwheels613>
Component: shutterAssignee: MartinKG <mgansser>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 36CC: drizt72, liangsuilong, mgansser
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: shutter-0.99.4-1.fc36 shutter-0.99.4-1.fc37 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-03-31 06:04:35 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 Wheeler Law 2022-08-05 15:44:33 UTC
Description of problem:

When I try to take a screenshot of a window or the whole desktop, Shutter will attempt to take the screenshot by disappearing and then will never reappear. One must use SIGKILL in order to kill it and start a new instance. 

Version-Release number of selected component (if applicable):
0.99.2 Rev.1593

How reproducible:


Steps to Reproduce:
1. Install Shutter (sudo dnf install shutter-0.99.2-4.fc36)
2. When Shutter opens, click the "Desktop" button at the top. 

Actual results:

Shutter will disappear, never to reappear with the screenshot. 


Expected results:

Shutter should reappear with the screenshot of the desktop. 


Additional info:

Installing the "perl-Sys-Hostname" package fixes the issue. This package should be an explicit dependency of Shutter but it is not.

Stack trace from terminal:

*** unhandled exception in callback:
***   Can't locate Sys/Hostname.pm in @INC (you may need to install the Sys::Hostname module) (@INC contains: /usr/share/shutter/resources/modules /usr/local/lib64/perl5/5.34 /usr/local/share/perl5/5.34 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at /usr/share/perl5/vendor_perl/X11/Auth.pm line 103.
***   	X11::Auth::get_by_host(X11::Auth=HASH(0x5569edfa5c10), "localhost", "Local", 1) called at /usr/share/perl5/vendor_perl/X11/Protocol.pm line 2308
***   	X11::Protocol::new("X11::Protocol", ":1") called at /usr/share/perl5/vendor_perl/Shutter/Screenshot/Main.pm line 384
***   	Shutter::Screenshot::Main::include_cursor(Shutter::Screenshot::Workspace=HASH(0x5569e9799e00), 0, 0, 1920, 1200, Gtk3::GdkX11::X11Window=HASH(0x5569eda00558), Gtk3::Gdk::Pixbuf=HASH(0x5569eddad4a8)) called at /usr/share/perl5/vendor_perl/Shutter/Screenshot/Main.pm line 324
***   	Shutter::Screenshot::Main::__ANON__() called at /usr/share/perl5/vendor_perl/Gtk3.pm line 572
***   	eval {...} called at /usr/share/perl5/vendor_perl/Gtk3.pm line 572
***   	Gtk3::main("Gtk3") called at /usr/share/perl5/vendor_perl/Shutter/Screenshot/Main.pm line 368
***   	Shutter::Screenshot::Main::get_pixbuf_from_drawable(Shutter::Screenshot::Workspace=HASH(0x5569e9799e00), Gtk3::GdkX11::X11Window=HASH(0x5569eda00558), 0, 0, 1920, 1200) called at /usr/share/perl5/vendor_perl/Shutter/Screenshot/Workspace.pm line 242
***   	Shutter::Screenshot::Workspace::workspace(Shutter::Screenshot::Workspace=HASH(0x5569e9799e00)) called at /usr/bin/shutter line 5925
***   	Shutter::App::fct_take_screenshot(Gtk3::MenuToolButton=HASH(0x5569ed7f5568), "full", undef, undef) called at /usr/bin/shutter line 3065
***   	Shutter::App::__ANON__() called at /usr/lib64/perl5/vendor_perl/Glib/Object/Introspection.pm line 67
***   	eval {...} called at /usr/lib64/perl5/vendor_perl/Glib/Object/Introspection.pm line 67
***   	Glib::Object::Introspection::__ANON__(Shutter::App=HASH(0x5569ed208be8)) called at /usr/bin/shutter line 10943
***  ignoring at /usr/share/perl5/vendor_perl/Gtk3.pm line 572.
	Gtk3::main("Gtk3") called at /usr/share/perl5/vendor_perl/Shutter/Screenshot/Main.pm line 368
	Shutter::Screenshot::Main::get_pixbuf_from_drawable(Shutter::Screenshot::Workspace=HASH(0x5569e9799e00), Gtk3::GdkX11::X11Window=HASH(0x5569eda00558), 0, 0, 1920, 1200) called at /usr/share/perl5/vendor_perl/Shutter/Screenshot/Workspace.pm line 242
	Shutter::Screenshot::Workspace::workspace(Shutter::Screenshot::Workspace=HASH(0x5569e9799e00)) called at /usr/bin/shutter line 5925
	Shutter::App::fct_take_screenshot(Gtk3::MenuToolButton=HASH(0x5569ed7f5568), "full", undef, undef) called at /usr/bin/shutter line 3065
	Shutter::App::__ANON__() called at /usr/lib64/perl5/vendor_perl/Glib/Object/Introspection.pm line 67
	eval {...} called at /usr/lib64/perl5/vendor_perl/Glib/Object/Introspection.pm line 67
	Glib::Object::Introspection::__ANON__(Shutter::App=HASH(0x5569ed208be8)) called at /usr/bin/shutter line 10943

Comment 1 Wheeler Law 2022-08-05 15:47:27 UTC
shutter-0.99.2-4.fc36 is the nvr of the package

Comment 2 MartinKG 2022-08-06 10:47:07 UTC
sorry couldn't reproduce this issue on my machines with fc36 gnome and wayland active.
There is no need of the package perl-Sys-Hostname for shutter.
Shutter reappear with the screenshot of the desktop on my machines.

Comment 3 Fedora Update System 2023-03-30 15:29:01 UTC
FEDORA-2023-d1c8d31227 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2023-d1c8d31227

Comment 4 Fedora Update System 2023-03-30 15:29:02 UTC
FEDORA-2023-46c6adf67b has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2023-46c6adf67b

Comment 5 Fedora Update System 2023-03-31 01:30:05 UTC
FEDORA-2023-d1c8d31227 has been pushed to the Fedora 37 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-d1c8d31227`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-d1c8d31227

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

Comment 6 Fedora Update System 2023-03-31 02:43:53 UTC
FEDORA-2023-46c6adf67b has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-46c6adf67b`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-46c6adf67b

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

Comment 7 Fedora Update System 2023-04-08 01:29:26 UTC
FEDORA-2023-46c6adf67b has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 8 Fedora Update System 2023-04-08 02:36:17 UTC
FEDORA-2023-d1c8d31227 has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.