bilelmoussaoui / Hardcode-Tray

Fixes Hardcoded tray icons in Linux
Other
861 stars 63 forks source link

Install on Opensuse Leap #715

Open KMLAgency opened 2 years ago

KMLAgency commented 2 years ago

Hey! How would be the way to install it on opensuse Leap 15.3 KDE plasma 5 ?? Thanks a lot

varlesh commented 2 years ago

Now, not available repo for OpenSuse distros... You can compile hardcode-tray from sources. Possible build depends:

KMLAgency commented 2 years ago

ok ok thanks !!

So, what I did, make sure I have those dependencies :

Than I build it with the command in the doc, for reminder:

git clone https://github.com/bil-elmoussaoui/Hardcode-Tray
cd Hardcode-Tray
meson builddir --prefix=/usr
sudo ninja -C builddir install

Everything seem fine, I got a warning but no error! WARNING: Gettext not found, all translation targets will be ignored.

Than I run Hardcode-Tray using the command sudo -E hardcode-tray

It work, but when I choose to "apply", it say me : No apps to fix!

I checked and yeah most of the apps I use are not in the database, but Joplin is in it so it should at least find that one?! Am I missing something?

Thanks

If I check the version with a sudo hardcode-tray --version I get that:

Unable to init server: Could not connect: Connection refused
Hardcode-Tray: 4.3
Gtk: 3.24
varlesh commented 2 years ago

WARNING: Gettext not found, all translation targets will be ignored.

I think it's not critical

You can check path to joplin, maybe it's have another path on opensuse https://github.com/bilelmoussaoui/Hardcode-Tray/blob/master/data/database/joplin.json

PS: we usualy added paths for only DEB & AUR... but PR welcome! if needed

varlesh commented 2 years ago

i'm analyzed this package https://download.copr.fedorainfracloud.org/results/taw/joplin/opensuse-leap-15.3-x86_64/02890193-joplin/joplin-2.4.12-1.rp.suse.lp153.taw.x86_64.rpm and understood why this not worked for you. Very strange, but maintainers pack appimage-version to RPM... it's unusual

varlesh commented 2 years ago

@MetaStazz As solution you can install flatpak-version Joplin, it's supported on hardcode-tray:

"icons_path": [
        "/usr/share/joplin/resources/build/icons/",
        "/usr/share/joplin/desktop/resources/build/icons/",
        "/usr/share/joplin-desktop/resources/build/icons/",
        "/var/lib/flatpak/app/net.cozic.joplin_desktop/current/active/files/joplin-desktop/resources/build/icons/"
KMLAgency commented 2 years ago

i already use the flatpak version ! But I have nothing related to joplin in usr/share !! I have "joplin-desktop" in the user config folder (and it doesn't content a "build/icons") But I do have the "net.cozic.joplin_desktop" in "var/lib" with icons stuff...

varlesh commented 2 years ago

It's worked for you? Yes, flatpak version installed here: /var/lib/flatpak/app/net.cozic.joplin_desktop

varlesh commented 2 years ago

/usr/share location for DEB or AUR packages

KMLAgency commented 2 years ago

I tried again but no, it's not working... I still have the blue icon in tray! and "no app to fix" !!

varlesh commented 2 years ago

it's very strange. Flatpak Jopplin fixed fine for me: image please upload last log from /tmp/Hardcode-Tray/

KMLAgency commented 2 years ago
[DEBUG] 2021-10-20 10:07:47 DE: Kde
[DEBUG] 2021-10-20 10:07:47 Config file: Not found.
[DEBUG] 2021-10-20 10:07:47 Arguments/Icon Size: None
[DEBUG] 2021-10-20 10:07:47 System/Icon Size: 22
[DEBUG] 2021-10-20 10:07:47 System/Theme: Papirus-Dark
[DEBUG] 2021-10-20 10:07:47 Arguments/Conversion Tool: None
[DEBUG] 2021-10-20 10:07:47 Config/Conversion Tool: None
[DEBUG] 2021-10-20 10:07:47 SVG Factory: Failed RSVGConvert
[DEBUG] 2021-10-20 10:07:47 SVG Factory: Failed CairoSVG
[DEBUG] 2021-10-20 10:07:47 SVG Factory: Failed SVGExport
[DEBUG] 2021-10-20 10:07:47 SVG Factory: Import ImageMagick
[DEBUG] 2021-10-20 10:07:48 Path with condition: discord_callback /home/loky/.config/discordcanary/{discord}/modules/discord_desktop_core/
[DEBUG] 2021-10-20 10:07:48 Path with condition: discord_callback /home/loky/.config/discord/{discord}/modules/discord_desktop_core/
[DEBUG] 2021-10-20 10:07:48 Path with condition: discord_callback /home/loky/.var/app/com.discordapp.Discord/config/discord/{discord}/modules/discord_desktop_core/
[DEBUG] 2021-10-20 10:07:48 Path with condition: dropbox_callback /var/lib/flatpak/app/com.dropbox.Client/current/active/files/extra/.dropbox-dist/{dropbox}/images/hicolor/16x16/status
[DEBUG] 2021-10-20 10:07:48 Path with condition: dropbox_callback /home/loky/.dropbox-dist/dropbox-lnx.x86_64-133.4.4089/images/hicolor/16x16/status/
varlesh commented 2 years ago

Failed CairoSVG You install it? ImageMagick can be a not good worked...

KMLAgency commented 2 years ago

As I listed before, the only one I found was python3-CairoSVG And I do have librsvg-2-2 !!

varlesh commented 2 years ago

librsvg-2-2 not have binary /usr/bin/rsvg-convert, it's only library. try set conversion option: sudo -E hardcode-tray --conversion-tool CairoSVG

KMLAgency commented 2 years ago

It tell me The selected conversion tool is not installed. arf shit!!

varlesh commented 2 years ago

I don't know why hardcode-tray not seen CairoSVG another way install SVGExport from npm: sudo npm install svgexport -g

KMLAgency commented 2 years ago

sudo npm install svgexport -g gave me lot of error !!

loky@stellaris:~>  sudo npm install svgexport -g
[sudo] password for root: 
/usr/local/bin/svgexport -> /usr/local/lib/node_modules/svgexport/bin/index.js

> puppeteer@3.3.0 install /usr/local/lib/node_modules/svgexport/node_modules/puppeteer
> node install.js

ERROR: Failed to set up Chromium r756035! Set "PUPPETEER_SKIP_DOWNLOAD" env variable to skip download.
Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/svgexport/node_modules/puppeteer/.local-chromium'
  -- ASYNC --
    at BrowserFetcher.<anonymous> (/usr/local/lib/node_modules/svgexport/node_modules/puppeteer/lib/helper.js:94:19)
    at fetchBinary (/usr/local/lib/node_modules/svgexport/node_modules/puppeteer/install.js:148:8)
    at download (/usr/local/lib/node_modules/svgexport/node_modules/puppeteer/install.js:54:9) {
  errno: -13,
  code: 'EACCES',
  syscall: 'mkdir',
  path: '/usr/local/lib/node_modules/svgexport/node_modules/puppeteer/.local-chromium'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! puppeteer@3.3.0 install: `node install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the puppeteer@3.3.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
varlesh commented 2 years ago

I think need update npm. sudo npm install npm -g

varlesh commented 2 years ago

and try install again: sudo npm install svgexport -g

KMLAgency commented 2 years ago
sudo npm install npm -g
[sudo] password for root: 
/usr/local/bin/npm -> /usr/local/lib/node_modules/npm/bin/npm-cli.js
/usr/local/bin/npx -> /usr/local/lib/node_modules/npm/bin/npx-cli.js
+ npm@8.1.0
added 220 packages from 96 contributors in 4.292s

But the other command to install SVGexport gave me the exact same error !!

So much for a fucking blue icon.... Freaking OCD !! ^^

varlesh commented 2 years ago

npm install puppeteer --unsafe-perm

varlesh commented 2 years ago

i found package for RSVGConvert. It's rsvg-convert LOL ))

varlesh commented 2 years ago

http://download.opensuse.org/distribution/leap/15.3/repo/oss/x86_64/rsvg-convert-2.46.5-3.3.1.x86_64.rpm.mirrorlist

KMLAgency commented 2 years ago
npm install puppeteer --unsafe-perm
added 55 packages, and audited 56 packages in 2m
8 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities

But the other command to install SVGexport gave me the exact same error !!

Ok ok !! So I installed rsvg-convert and do a sudo -E hardcode-tray --conversion-tool RSVGConvert In the log it found the "Conversion Tool"... But still "no app to fix" !!

varlesh commented 2 years ago

what are version you use Papirus Icon Theme?

varlesh commented 2 years ago

on Leap 15.3 not new version, but and not very old papirus-icon-theme-20210201... and this version have joplin-tray icon. It was added on 30 Dec 2019 https://github.com/PapirusDevelopmentTeam/papirus-icon-theme/commit/ac1654d3710590c20c22a5aee9563d6afaaeb8b1 I'm not understand why this not worked for you

varlesh commented 2 years ago

try install gettext-tools

KMLAgency commented 2 years ago

I use the last Papirus theme!!! I tried the full command from the papyrus github page but without succes !! sudo -E hardcode-tray --conversion-tool RSVGConvert --size 22 --theme Papirus

I installed gettext-tools but no success either !! it start to be a shit load of dependencies to just change tray icon.......