Peek: Doesn't launch from applicatoin menu in Fedora 23

Created on 31 Aug 2016  Â·  24Comments  Â·  Source: phw/peek

Fedora 23 - Gnome

Can launch from CLI fine but it doesn't launch from app menu even though it's present.

bug

Most helpful comment

By the way, if anyone wants to package it, here is the SPEC file.

Name:           peek
Version:        0.7.2
Release:        1%{?dist}
Summary:        An animated GIF recorder

License:        GPLv3
URL:            https://github.com/phw/peek
Source0:        https://github.com/phw/peek/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz

BuildRequires:  cmake
BuildRequires:  vala-devel
BuildRequires:  gettext
BuildRequires:  pkgconfig(gtk+-3.0) >= 3.14
Requires:       ffmpeg
Requires:       ImageMagick

%description
A simple tool that allows you to record short animated GIF images 
from your screen.


%prep
%autosetup


%build
%cmake -DBUILD_TESTS=OFF .
%make_build


%install
rm -rf $RPM_BUILD_ROOT
%make_install
%find_lang %{name}


%files -f %{name}.lang
%license LICENSE
%{_bindir}/%{name}
%{_datadir}/applications/com.uploadedlobster.%{name}.desktop
%{_datadir}/dbus-1/services/com.uploadedlobster.%{name}.service
%{_datadir}/glib-2.0/schemas/com.uploadedlobster.%{name}.gschema.xml
%{_datadir}/icons/hicolor/*/apps/%{name}.png


%changelog
* Sun Sep 04 2016 Roseanne Levert <[email protected]> - 0.7.2-1
- First package

All 24 comments

Very strange, I have no good idea right now what's happening or how to debug it. Do you have any useful log output in journald?

Hopefully this helps. I didn't search these errors yet:

Sep 02 14:33:51  /usr/libexec/gdm-x-session[1912]: Activating service name='org.gnome.ControlCenter.SearchProvider'
Sep 02 14:33:51  /usr/libexec/gdm-x-session[1912]: Activating service name='org.gnome.Boxes.SearchProvider'
Sep 02 14:33:51  /usr/libexec/gdm-x-session[1912]: Activating service name='org.gnome.Calculator.SearchProvider'
Sep 02 14:33:51  /usr/libexec/gdm-x-session[1912]: Activating service name='org.gnome.clocks'
Sep 02 14:33:51  /usr/libexec/gdm-x-session[1912]: Activating service name='org.gnome.Contacts.SearchProvider'
Sep 02 14:33:51  /usr/libexec/gdm-x-session[1912]: Activating service name='org.gnome.Documents'
Sep 02 14:33:51  /usr/libexec/gdm-x-session[1912]: Activating service name='org.gnome.Nautilus'
Sep 02 14:33:51  /usr/libexec/gdm-x-session[1912]: Activating service name='org.gnome.Bijiben.SearchProvider'
Sep 02 14:33:51  /usr/libexec/gdm-x-session[1912]: Activating service name='org.gnome.seahorse.Application'
Sep 02 14:33:51  /usr/libexec/gdm-x-session[1912]: Successfully activated service 'org.gnome.Boxes.SearchProvider'
Sep 02 14:33:51  /usr/libexec/gdm-x-session[1912]: Successfully activated service 'org.gnome.Calculator.SearchProvider'
Sep 02 14:33:51  /usr/libexec/gdm-x-session[1912]: Successfully activated service 'org.gnome.ControlCenter.SearchProvider'
Sep 02 14:33:51  /usr/libexec/gdm-x-session[1912]: Successfully activated service 'org.gnome.clocks'
Sep 02 14:33:51  /usr/libexec/gdm-x-session[1912]: Successfully activated service 'org.gnome.Nautilus'
Sep 02 14:33:51  /usr/libexec/gdm-x-session[1912]: Successfully activated service 'org.gnome.seahorse.Application'
Sep 02 14:33:51  /usr/libexec/gdm-x-session[1912]: Successfully activated service 'org.gnome.Contacts.SearchProvider'
Sep 02 14:33:51  /usr/libexec/gdm-x-session[1912]: Successfully activated service 'org.gnome.Documents'
Sep 02 14:33:51  /usr/libexec/gdm-x-session[1912]: Successfully activated service 'org.gnome.Bijiben.SearchProvider'
Sep 02 14:33:51  /usr/libexec/gdm-x-session[1912]: Activating service name='com.uploadedlobster.peek'
Sep 02 14:33:52  /usr/libexec/gdm-x-session[1912]: Activated service 'com.uploadedlobster.peek' failed: Failed to execute program com.uploadedlobster.peek: No such file or directory
Sep 02 14:33:52  org.gnome.Bijiben.SearchProvider[1965]: Unable to load location /home/<user>/.local/share/bijiben: No such file or directory
Sep 02 14:33:52  org.gnome.Bijiben.SearchProvider[1965]: (bijiben-shell-search-provider:10900): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
Sep 02 14:33:52  org.gnome.Bijiben.SearchProvider[1965]: (bijiben-shell-search-provider:10900): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
Sep 02 14:33:52  org.gnome.Bijiben.SearchProvider[1965]: (bijiben-shell-search-provider:10900): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
Sep 02 14:33:52  org.gnome.Bijiben.SearchProvider[1965]: sending the mass change

I had the same problem, but after package and install it as RPM solved the problem.

It'd be really nice to have a step-by-step installation procedure for Fedora users as well in the README.

@Shnifty @Bajoja care to share the exact dnf install package names for the dependancies?

So I've discovered that you need the following (maybe) on fedora 22:

sudo dnf install gtk3-devel ffmpeg ffmpeg-libs imagemagick ImageMagick-devel glib gtk+

I tried to gather as much info as possible. Hopefully it helps.

$ sudo dnf list installed | grep ^gtk
gtk+.x86_64                            1:1.2.10-81.fc23         @fedora         
gtk-murrine-engine.x86_64              0.98.2-10.fc23           @updates        
gtk-update-icon-cache.x86_64           3.18.9-1.fc23            @updates        
gtk-vnc2.x86_64                        0.5.4-2.fc23             @koji-override-0
gtk2.i686                              2.24.30-1.fc23           @updates        
gtk2.x86_64                            2.24.30-1.fc23           @updates        
gtk2-engines.x86_64                    2.20.2-10.fc23           @fedora         
gtk3.x86_64                            3.18.9-1.fc23            @updates        
gtk3-devel.x86_64                      3.18.9-1.fc23            @updates        
gtkmm24.x86_64                         2.24.4-7.fc23            @koji-override-0
gtkmm30.x86_64                         3.18.1-1.fc23            @updates        
gtksourceview3.x86_64                  3.18.2-1.fc23            @updates        
gtkspell.x86_64                        2.0.16-10.fc23           @fedora         
gtkspell3.x86_64                       3.0.9-1.fc23             @updates        


$ sudo dnf list installed | grep -i ^glib
glib.x86_64                            1:1.2.10-46.fc23         @fedora         
glib-networking.x86_64                 2.46.1-1.fc23            @koji-override-0
glib2.i686                             2.46.2-2.fc23            @updates        
glib2.x86_64                           2.46.2-2.fc23            @updates        
glib2-devel.x86_64                     2.46.2-2.fc23            @updates        
glibc.i686                             2.22-18.fc23             @updates        
glibc.x86_64                           2.22-18.fc23             @updates        
glibc-common.x86_64                    2.22-18.fc23             @updates        
glibc-devel.x86_64                     2.22-18.fc23             @updates        
glibc-headers.x86_64                   2.22-18.fc23             @updates        
glibmm24.x86_64                        2.46.2-1.fc23            @updates   
$ sudo dnf list installed | grep -i ^imagemagick
ImageMagick.x86_64                     6.9.2.7-1.fc23           @updates        
ImageMagick-c++.x86_64                 6.9.2.7-1.fc23           @updates        
ImageMagick-libs.x86_64                6.9.2.7-1.fc23           @updates        
$ sudo dnf list installed | grep -i ^ffmpeg
ffmpeg.x86_64                          2.8.7-1.fc23             @rpmfusion-free-updates-testing
ffmpeg-compat.x86_64                   0.6.7-9.fc23             @rpmfusion-free 
ffmpeg-devel.x86_64                    2.8.7-1.fc23             @rpmfusion-free 
ffmpeg-libs.x86_64                     2.8.7-1.fc23             @rpmfusion-free-updates-testing
$ sudo dnf list installed | grep -i ^cmake
cmake.x86_64                           3.4.3-1.fc23             @updates        
$ sudo dnf list installed | grep -i ^vala
vala.x86_64                            0.30.2-1.fc23            @updates        
$ sudo dnf list installed | grep -i ^gettext
gettext.x86_64                         0.19.8.1-1.fc23          @updates        
gettext-common-devel.noarch            0.19.8.1-1.fc23          @updates        
gettext-devel.x86_64                   0.19.8.1-1.fc23          @updates        
gettext-libs.x86_64                    0.19.8.1-1.fc23          @updates   
$ sudo cmake . && make
-- Found Vala: /usr/bin/valac (found version "0.30.2") 
-- Found Vala: /usr/bin/valac (found suitable version "0.30.2", minimum required is "0.22") 
-- GSettings schemas will be installed locally.
-- GSettings shemas will be compiled.
-- GSettings schemas will be installed into /usr/local/share/glib-2.0/schemas/
-- Copying schema to build directory /home/shnifty/peek/data/schemas
-- Building development schema in /home/shnifty/peek/data/schemas
-- Configuring done
-- Generating done
-- Build files have been written to: /home/shnifty/peek
[ 93%] Built target peek
/home/shnifty/peek/po/uk_UA.po: 29 translated messages, 2 untranslated messages.
[ 93%] Built target generate-peek-uk_UA-gmo
/home/shnifty/peek/po/es.po: 29 translated messages, 2 untranslated messages.
[ 93%] Built target generate-peek-es-gmo
/home/shnifty/peek/po/pl.po: 29 translated messages, 2 untranslated messages.
[ 93%] Built target generate-peek-pl-gmo
/home/shnifty/peek/po/fr.po: 29 translated messages, 2 untranslated messages.
[ 93%] Built target generate-peek-fr-gmo
/home/shnifty/peek/po/de.po: 31 translated messages.
[ 93%] Built target generate-peek-de-gmo
/home/shnifty/peek/po/pt_PT.po: 29 translated messages, 2 untranslated messages.
[ 93%] Built target generate-peek-pt_PT-gmo
/home/shnifty/peek/po/lt.po: 29 translated messages, 2 untranslated messages.
[ 93%] Built target generate-peek-lt-gmo
[ 93%] Built target update-gmo
[100%] Built target build-desktop-file
$ sudo make install
[ 93%] Built target peek
/home/shnifty/peek/po/uk_UA.po: 29 translated messages, 2 untranslated messages.
[ 93%] Built target generate-peek-uk_UA-gmo
/home/shnifty/peek/po/es.po: 29 translated messages, 2 untranslated messages.
[ 93%] Built target generate-peek-es-gmo
/home/shnifty/peek/po/pl.po: 29 translated messages, 2 untranslated messages.
[ 93%] Built target generate-peek-pl-gmo
/home/shnifty/peek/po/fr.po: 29 translated messages, 2 untranslated messages.
[ 93%] Built target generate-peek-fr-gmo
/home/shnifty/peek/po/de.po: 31 translated messages.
[ 93%] Built target generate-peek-de-gmo
/home/shnifty/peek/po/pt_PT.po: 29 translated messages, 2 untranslated messages.
[ 93%] Built target generate-peek-pt_PT-gmo
/home/shnifty/peek/po/lt.po: 29 translated messages, 2 untranslated messages.
[ 93%] Built target generate-peek-lt-gmo
[ 93%] Built target update-gmo
[100%] Built target build-desktop-file
Install the project...
-- Install configuration: ""
-- Up-to-date: /usr/local/bin/peek
-- Up-to-date: /usr/local/share/glib-2.0/schemas/com.uploadedlobster.peek.gschema.xml
-- Compiling GSettings schemas
-- Up-to-date: /usr/local/share/applications/com.uploadedlobster.peek.desktop
-- Up-to-date: /usr/local/share/icons/hicolor/16x16/apps/peek.png
-- Up-to-date: /usr/local/share/icons/hicolor/24x24/apps/peek.png
-- Up-to-date: /usr/local/share/icons/hicolor/32x32/apps/peek.png
-- Up-to-date: /usr/local/share/icons/hicolor/48x48/apps/peek.png
-- Up-to-date: /usr/local/share/icons/hicolor/256x256/apps/peek.png
-- Up-to-date: /usr/local/share/icons/hicolor/512x512/apps/peek.png
-- Up-to-date: /usr/local/share/dbus-1/services/com.uploadedlobster.peek.service
-- Installing: /usr/local/share/locale/de/LC_MESSAGES/peek.mo
-- Installing: /usr/local/share/locale/es/LC_MESSAGES/peek.mo
-- Installing: /usr/local/share/locale/fr/LC_MESSAGES/peek.mo
-- Installing: /usr/local/share/locale/lt/LC_MESSAGES/peek.mo
-- Installing: /usr/local/share/locale/pl/LC_MESSAGES/peek.mo
-- Installing: /usr/local/share/locale/pt_PT/LC_MESSAGES/peek.mo
-- Installing: /usr/local/share/locale/uk_UA/LC_MESSAGES/peek.mo
$ peek -v
Peek 0.7.2

Here (Fedora 24) it doesn't start per application menu either. But it starts per command line somehow…

So I've discovered that you need the following (maybe) on fedora 22:

sudo dnf install gtk3-devel ffmpeg ffmpeg-libs imagemagick ImageMagick-devel glib gtk+

I was only missing ImageMagick-devel so I installed it and ran the cmake/make but it did not fix anything, sorry.

Try per CLI.

Yes, CLI still works. The app menu still doesn't.

So it can't be an error due to missing packages. Normally CMake should throw an error when dependencies are missing.

I have found the issue. I believe there is an issue with the .desktop files. I was able to get it working with a custom file but I'd like to identify what is wrong with the default files. I will post again shortly.

Okay, I've gotten the default build to work by modifying:

/usr/local/share/applications/com.uploadedlobster.peek.desktop

Remove this line:

DBusActivatable=true

Then restart Gnome:

<alt>+<F2> r <Enter>

Unfortunately I do not know what that setting is for but at least we know the source of the problem.

Thanks all for digging into this. It makes perfect sense since Peek does not contain a dbus service file right now. My bad, will fix it. I just wonder why it never caused problems for me and seems to affect mostly Fedora.

No problem. Upon further digging, I've discovered that the dbus config file is pointing to /usr/bin/peek which should perhaps be /usr/local/bin/peek? I really don't know much about dbus so I don't know if changing it would break it for a different distro.

$ cat dbus/com.uploadedlobster.peek.service 
[D-BUS Service]
Name=com.uploadedlobster.peek
Exec=/usr/bin/peek --gapplication-service

You're right, but directories should NEVER be hardcoded because most are set by CMake and can be changed at installation.

I confirmed that updating the Exec path in the dbus file also fixes the issue.

Ok, now we got it. Yes, hard coded path is definitely a bad idea, needs to be handled by cmake.

By the way, if anyone wants to package it, here is the SPEC file.

Name:           peek
Version:        0.7.2
Release:        1%{?dist}
Summary:        An animated GIF recorder

License:        GPLv3
URL:            https://github.com/phw/peek
Source0:        https://github.com/phw/peek/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz

BuildRequires:  cmake
BuildRequires:  vala-devel
BuildRequires:  gettext
BuildRequires:  pkgconfig(gtk+-3.0) >= 3.14
Requires:       ffmpeg
Requires:       ImageMagick

%description
A simple tool that allows you to record short animated GIF images 
from your screen.


%prep
%autosetup


%build
%cmake -DBUILD_TESTS=OFF .
%make_build


%install
rm -rf $RPM_BUILD_ROOT
%make_install
%find_lang %{name}


%files -f %{name}.lang
%license LICENSE
%{_bindir}/%{name}
%{_datadir}/applications/com.uploadedlobster.%{name}.desktop
%{_datadir}/dbus-1/services/com.uploadedlobster.%{name}.service
%{_datadir}/glib-2.0/schemas/com.uploadedlobster.%{name}.gschema.xml
%{_datadir}/icons/hicolor/*/apps/%{name}.png


%changelog
* Sun Sep 04 2016 Roseanne Levert <[email protected]> - 0.7.2-1
- First package

@phw, can you please add the fix to master?

@fb87 I have committed a fix, so the CMAKE_INSTALL_PREFIX is used in the service file during build.

@heent Thanks for the SPEC file. But shouldn't the package install to /usr instead of /usr/local? You can specify the prefix for cmake with e.g. cmake -DCMAKE_INSTALL_PREFIX=/usr .

I pulled the changes and rebuilt and it works! Thanks!

Standard is /usr/local/, custom directories should be specified by -D CMAKE_INSTALL_PREFIX.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

phw picture phw  Â·  6Comments

ronjouch picture ronjouch  Â·  6Comments

phw picture phw  Â·  3Comments

chteuchteu picture chteuchteu  Â·  6Comments

nunodonato picture nunodonato  Â·  5Comments