rickyrockrat / parcellite

GNU General Public License v3.0
220 stars 29 forks source link

No icon on ubuntu 20. #65

Closed matthias-ccri closed 7 months ago

matthias-ccri commented 2 years ago

No icon in the tray.

Following https://github.com/rickyrockrat/parcellite/issues/30, nothing worked. No info on how to enable the unity setting.

I can't open any GUI, with Ctrl-Alt-P or whatever the key combination is.

I created a /home/user/.config/parcellite/parcelliterc file and attempted to set the unity setting by trying on_unity=1 and on_unity=true, then running parcellite in the console. Nothing seemed to happen.

rickyrockrat commented 2 years ago

Did you build from the source (tip of master?) If not, you are not going to get an icon. When you run parcellite does it print anything interesting out? Please post whatever it spits out when it starts.

matthias-ccri commented 2 years ago

Good to know. No, I installed with apt

felagund commented 2 years ago

By the way, when one uses the Makefile.simple installation method, one also does not get an icon.

rickyrockrat commented 2 years ago

The makefile.simple is a simple hack to get the binary built. I'm surprised the install worked. :) I need to finish the simple makefile solution to include man pages, desktop file, and the icon.

rickyrockrat commented 2 years ago

OK, I decided I just needed to finish this. Please check out master. It should work for you to install everything: At the top level: make -f Makefile.simple sudo make -f Makefile.simple DESTDIR=/tmp/test.me

command line variables are DESTDIR (defaults to nothing) and prefix, which defaults to /usr To install in /usr/local:

sudo make -f Makefile.simple prefix=/usr/local install

felagund commented 2 years ago

Thanks! However, when doing make -f Makefile.simple fails with:

make[1]: Leaving directory '/home/drew/Zdroje_a_programy/Sources/parcellite/po'
make -C $(echo build.data|sed 's!build.!!') -f Makefile.simple GETTEXT_PACKAGE=parcellite
make[1]: Entering directory '/home/drew/Zdroje_a_programy/Sources/parcellite/data'
LC_ALL=C /usr/bin/intltool-merge  -d -u -c /po/.intltool-merge-cache ../po parcellite.desktop.in parcellite.desktop
No such file or directory at /usr/bin/intltool-merge line 396.
make[1]: *** [Makefile.simple:48: parcellite.desktop] Error 2
make[1]: Leaving directory '/home/drew/Zdroje_a_programy/Sources/parcellite/data'
make: *** [Makefile.simple:45: build.data] Error 2
rickyrockrat commented 2 years ago

Which git sha is that from? I just tried it from a fresh clone off master, and this does work: is /usr/bin/intltool-merge there? I need to add it to my deps.

felagund commented 2 years ago

/usr/bin/intltool-merge is there.

git rev-parse HEAD
112a625edf5f8b951a2faf526a54cd411cf8bc17

I also did this from a Frech clone master. I am on Kubuntu 21.10.

rickyrockrat commented 2 years ago

I've never looked at the intltools....they are in perl. How exciting. Can you please pull, then try again, and please dump the whole make output. I mainly want the versions that print out on tool discovery. Thanks!

felagund commented 2 years ago

It gives out this:

make -f Makefile.simple
Checking for intltool-update intltool-extract intltool-merge pkg-config
Checking for intltool-update.. /usr/bin/intltool-update 'V=0.51.0' OK
Checking for intltool-extract.. /usr/bin/intltool-extract 'V=0.51.0' OK
Checking for intltool-merge.. /usr/bin/intltool-merge 'V=0.51.0' OK
Checking for pkg-config.. /usr/bin/pkg-config 'V=0.29.2' OK
    Need gtk+-2.0 x11 fontconfig and freetype2
Checking for gtk.. OK
Checking for X11.. OK
Checking for fontconfig.. OK
Checking for freetype.. OK
make -C $(echo build.po|sed 's!build.!!') -f Makefile.simple GETTEXT_PACKAGE=parcellite
make[1]: Entering directory '/home/drew/Zdroje_a_programy/Sources/parcellite/po'
file=`echo ca | sed 's,.*/,,'`.gmo \
  && rm -f $file && /usr/bin/msgfmt -o $file ca.po
file=`echo cs | sed 's,.*/,,'`.gmo \
  && rm -f $file && /usr/bin/msgfmt -o $file cs.po
file=`echo da | sed 's,.*/,,'`.gmo \
  && rm -f $file && /usr/bin/msgfmt -o $file da.po
file=`echo de | sed 's,.*/,,'`.gmo \
  && rm -f $file && /usr/bin/msgfmt -o $file de.po
file=`echo el | sed 's,.*/,,'`.gmo \
  && rm -f $file && /usr/bin/msgfmt -o $file el.po
file=`echo es | sed 's,.*/,,'`.gmo \
  && rm -f $file && /usr/bin/msgfmt -o $file es.po
file=`echo fr | sed 's,.*/,,'`.gmo \
  && rm -f $file && /usr/bin/msgfmt -o $file fr.po
file=`echo hu | sed 's,.*/,,'`.gmo \
  && rm -f $file && /usr/bin/msgfmt -o $file hu.po
file=`echo it | sed 's,.*/,,'`.gmo \
  && rm -f $file && /usr/bin/msgfmt -o $file it.po
file=`echo ja | sed 's,.*/,,'`.gmo \
  && rm -f $file && /usr/bin/msgfmt -o $file ja.po
file=`echo nb | sed 's,.*/,,'`.gmo \
  && rm -f $file && /usr/bin/msgfmt -o $file nb.po
file=`echo pl_PL | sed 's,.*/,,'`.gmo \
  && rm -f $file && /usr/bin/msgfmt -o $file pl_PL.po
file=`echo pl | sed 's,.*/,,'`.gmo \
  && rm -f $file && /usr/bin/msgfmt -o $file pl.po
file=`echo pt_BR | sed 's,.*/,,'`.gmo \
  && rm -f $file && /usr/bin/msgfmt -o $file pt_BR.po
file=`echo ro | sed 's,.*/,,'`.gmo \
  && rm -f $file && /usr/bin/msgfmt -o $file ro.po
file=`echo ru | sed 's,.*/,,'`.gmo \
  && rm -f $file && /usr/bin/msgfmt -o $file ru.po
file=`echo sv | sed 's,.*/,,'`.gmo \
  && rm -f $file && /usr/bin/msgfmt -o $file sv.po
file=`echo tr | sed 's,.*/,,'`.gmo \
  && rm -f $file && /usr/bin/msgfmt -o $file tr.po
file=`echo zh_CN | sed 's,.*/,,'`.gmo \
  && rm -f $file && /usr/bin/msgfmt -o $file zh_CN.po
file=`echo zh_TW | sed 's,.*/,,'`.gmo \
  && rm -f $file && /usr/bin/msgfmt -o $file zh_TW.po
make[1]: Leaving directory '/home/drew/Zdroje_a_programy/Sources/parcellite/po'
make -C $(echo build.data|sed 's!build.!!') -f Makefile.simple GETTEXT_PACKAGE=parcellite
make[1]: Entering directory '/home/drew/Zdroje_a_programy/Sources/parcellite/data'
LC_ALL=C /usr/bin/intltool-merge  -d -u -c /po/.intltool-merge-cache ../po parcellite.desktop.in parcellite.desktop
No such file or directory at /usr/bin/intltool-merge line 396.
make[1]: *** [Makefile.simple:48: parcellite.desktop] Error 2
make[1]: Leaving directory '/home/drew/Zdroje_a_programy/Sources/parcellite/data'
make: *** [Makefile.simple:47: build.data] Error 2
rickyrockrat commented 2 years ago

Thank you! We are running the same intltool. Line 396 the paste below. I assume I have a cache somewhere and you don't. I usually build in a chroot, and this is why. Thanks. I will try to find out what step I'm missing. This is my output:

LC_ALL=C /usr/bin/intltool-merge  -d -u -c /po/.intltool-merge-cache ../po parcellite.desktop.in parcellite.desktop
Generating and caching the translation database
print() on closed filehandle CACHE at /usr/bin/intltool-merge line 375, <PO_FILE> line 6533.
Merging translations into parcellite.desktop.

Can you please do a find at the top level: find . -name '.intltool-merge-cache'


sub get_cached_translation_database
{
    my $cache_file_age = -M $cache_file;
    if (defined $cache_file_age)
    {
        if ($cache_file_age <= &get_newest_po_age)
        {
            &load_cache;
            return;
        }
        print "Found too-old cached translation database\n" unless $QUIET_ARG;
    }

    &create_cache;
}
felagund commented 2 years ago

You mean in the top level, so i.e:

rm parcellite/
git clone https://github.com/rickyrockrat/parcellite.git parcellite
cd parcellite/
make -f Makefile.simple
find . -name '.intltool-merge-cache'

That gives no output.

rickyrockrat commented 2 years ago

Yes, thank you. Can you try this on a clean checkout and report back with the contents of parcellite.desktop.

cd make -f Makefile.simple cd ../data LC_ALL=C ../intltool-merge -d -u -c /po/.intltool-merge-cache ../po parcellite.desktop.in parcellite.desktop

felagund commented 2 years ago

There is no parcellite.desktop, there is only parcellite.desktop.in ? These are the files in the data directory:

Makefile.am  Makefile.simple  parcellite.appdata.xml  parcellite.desktop.in  parcellite.png  parcellite-startup.desktop.in  parcellite.svg  parcellite.xpm

the parcellite-startup.desktop.in file is as follows:

 ``` [Desktop Entry] _Name=Parcellite _GenericName=Clipboard Manager _Comment=Lightweight GTK+ clipboard manager Icon=parcellite Exec=parcellite Terminal=false Type=Application Categories=GTK;GNOME;Application;Utility; OnlyShowIn=GNOME;KDE;LXDE;MATE;Razor;ROX;TDE;Unity;XFCE;Old;LXQt;

rickyrockrat commented 2 years ago

The intltool-merge creates the parcellite.desktop from the .po files and the parcellite.desktop.in. The end result should be a really big .desktop file with every language in it.

felagund commented 2 years ago

Well, it does not get created. In the po directory, there is no en.po, just en@boldquot.header and en@quot.header

My locales is as follows:

LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=cs_CZ.UTF-8
LC_TIME=cs_CZ.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=cs_CZ.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=cs_CZ.UTF-8
LC_NAME=cs_CZ.UTF-8
LC_ADDRESS=cs_CZ.UTF-8
LC_TELEPHONE=cs_CZ.UTF-8
LC_MEASUREMENT=cs_CZ.UTF-8
LC_IDENTIFICATION=cs_CZ.UTF-8
LC_ALL=
rickyrockrat commented 2 years ago

I am completely mystified at this point. Just to be sure:

git clone https://github.com/rickyrockrat/parcellite.git test cd test make -f Makefile.simple

And you are telling me it errors out? I placed your locale info in a bash script with export in front of each entry then called make Makefile.simple and it built for me.

rickyrockrat commented 2 years ago

And while in the test directory, please report back this sha: git log -n1 --pretty=format:%h it should be 4eb98c9

felagund commented 2 years ago

Yes, as you can see and it is at that commit. I am also puzzled:-): Screenshot_20220223_110302 I am on KDE - could it be the reason, that I miss something from GNOME? Though Parcellite is not DE-dependent, is it?

rickyrockrat commented 2 years ago

I check for the libraries Parcellite needs and It finds it, it's not related to KDE AFAIK. This is strange. It builds all the translations but can't seem to find it when it build. Can you please try editing data/Makefile.simple and replace: INTLTOOL_MERGE = /usr/bin/intltool-merge with INTLTOOL_MERGE = ../intltool-merge Then if that fails with the same message, leave the edit and add this one (remove the -c option): LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u $(top_srcdir)/po $< $@

I think it will do the same thing, but maybe...

felagund commented 2 years ago

Yes

editing data/Makefile.simple and replace:
INTLTOOL_MERGE = /usr/bin/intltool-merge
with
INTLTOOL_MERGE = ../intltool-merge

makes it build.

There is a huge difference in versions:

$ intltool-merge --version
intltool-merge (intltool) 0.51.0
Written by Maciej Stachowiak, Darin Adler and Kenneth Christiansen.

Copyright (C) 2000-2003 Free Software Foundation, Inc.
Copyright (C) 2000-2001 Eazel, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ /home/drew/Zdroje_a_programy/Sources/parcellite/intltool-merge --version
intltool-merge (intltool) 0.37.1
Written by Maciej Stachowiak, Darin Adler and Kenneth Christiansen.

Copyright (C) 2000-2003 Free Software Foundation, Inc.
Copyright (C) 2000-2001 Eazel, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
LinoMastro commented 10 months ago

FYI, the "No such file or directory at /usr/bin/intltool-merge line 396" error happens because the makefile in the data directory attempts to run this command:

LC_ALL=C /usr/bin/intltool-merge -d -u -c /po/.intltool-merge-cache ../po parcellite.desktop.in parcellite.desktop

This tells intltool-merge to create a cache file in the /po directory at the root of the filesystem, which doesn't exist and cannot be created by non-root users.

The reason for the wrong path is that the makefile expects an environment variable called top_builddir to be set, which doesn't happen when compiling with "make -f Makefile.simple" from a fresh git clone directory (without running autotools). At least this is what happens for me on Debian 11 Bullseye.

A workaround is to set this variable before running make, e.g. assuming that you are using bash and the current directory is the top-level one (the directory with the README file) this should compile successfully:

$ export top_builddir="$(pwd)"
$ make -f Makefile.simple clean  # optional - clean previous build files
$ make -f Makefile.simple
rickyrockrat commented 7 months ago

I believe I can close this now. I added a top_builddir for version 1.2.3. Please re-open if this isn't fixed. Thanks, and sorry for the long delay.