wez / wezterm

A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust
https://wezfurlong.org/wezterm/
Other
16.61k stars 742 forks source link

Two Applications Opening on OpenSUSE Repo Varient #2052

Closed epswims closed 2 years ago

epswims commented 2 years ago

What Operating System(s) are you seeing this problem on?

Linux Wayland

WezTerm version

20220408.101518.b908e2dd~232-1.1

Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?

No, and I'll explain why below

Describe the bug

I have installed the wezterm application from the opensuse repository. When I open the application, two applications appear on my task manager, WezTerm and wezterm-gui.

Also, the opensuse repository is not up to date. Thank you!

To Reproduce

No response

Configuration

-- WezTerm -- https://wezfurlong.org/wezterm/

local wezterm = require 'wezterm'

return { default_prog = {"/usr/bin/zsh", "-l"},

check_for_updates = false,

color_scheme= "nord",

window_background_opacity = 0.90, initial_rows = 30, initial_cols = 130,

font = wezterm.font("MonoLisa Nerd Font"), font_size=12,

-- Cursor style default_cursor_style = 'BlinkingBar',

-- Enable CSI u mode -- https://wezfurlong.org/wezterm/config/lua/config/enable_csi_u_key_encoding.html enable_csi_u_key_encoding = true

}

Expected Behavior

When I open my application it should say just WezTerm is running instead of opening a separate application called wezterm-gui

Logs

No response

Anything else?

https://i.imgur.com/f4mSmLc.pn f4mSmLc

Thank you so much for the help! Love the terminal otherwise though :)

wez commented 2 years ago

I think you may have multiple versions of wezterm installed. The icon on the left is a icon from an older version of wezterm.

epswims commented 2 years ago

I think you may have multiple versions of wezterm installed. The icon on the left is a icon from an older version of wezterm.

I think that's just the icon from my papirus icon theme. There is not set icon for "Wezterm-gui" so it uses the standard one by default

wez commented 2 years ago

I don't have an opensuse system so you're going to need to do some more legwork to figure out why the WM shows two icons. If you're unsure how to proceed I would suggest that you first uninstall the wezterm rpm and see if both icons go away. Then see if they both come back just by installing it (not even running it).

The package version you shared looks like it was built by the distro from this source: https://build.opensuse.org/package/show/openSUSE:Factory/wezterm That's not maintained by me; @uncomfyhalomacro is this something you can look into?

wez commented 2 years ago

Possibly a duplicate of https://github.com/wez/wezterm/issues/2041 if you're using wayland.

@uncomfyhalomacro: it looks like the suse package is tracking the main branch. I would recommend that it either track the latest release instead, or more aggressively track main (eg: update daily) and get renamed to wezterm-nightly so that the support story is clearer.

uncomfyhalomacro commented 2 years ago

@wez I actually tracked the main branch hence the @PARENT_TAG@TAG_OFFSET@ format of the version. though i havent updated it for two weeks now. one reason i decided to do that two weeks ago because i saw a commit for some wayland fix and I mainly daily drive Wayland.

uncomfyhalomacro commented 2 years ago

I will check later once i got home

uncomfyhalomacro commented 2 years ago

@epswims Can you tell me what icon theme have you installed? and could u check the name of the icon for wezterm on that installed icon theme?

uncomfyhalomacro commented 2 years ago

Screenshot image

Config

local wezterm = require("wezterm")
local config = {
  check_for_updates = false,
  show_update_window = false,
  term = "wezterm",
    font = wezterm.font_with_fallback({
        "JuliaMono",
        -- "Hasklug Nerd Font",
        "Symbols Nerd Font",
    "Noto Sans CJK KR",
    "Noto Sans CJK TC",
    "Noto Sans CJK SC",
    "Noto Sans CJK JP",
        "Noto Color Emoji",
        "monospace"
    }),
    font_size = 12.0,
    color_scheme = "Catppuccin",
    enable_wayland = true,
    enable_tab_bar = true,
  use_fancy_tab_bar = true, 
  hide_tab_bar_if_only_one_tab = true,
    tab_bar_at_bottom = true,
  default_prog = { "/usr/bin/zsh" },
    window_background_opacity = 0.9,
  window_frame = {
    font = wezterm.font({family="JuliaMono", weight="Bold"}),

    font_size = 12.0,
    active_titlebar_bg = "#1E1E2E",

    -- The overall background color of the tab bar when
    -- the window is not focused
    inactive_titlebar_bg = "#1e1e2e",
  },
  -- colors = {
  --   tab_bar = {
  --     background = "#1e1e2e",
  --     active_tab = {
  --       -- The color of the background area for the tab
  --       bg_color = "#1A1826",
  --       -- The color of the text for the tab
  --       fg_color = "#F8BD96",
  --
  --       intensity = "Normal",
  --
  --       underline = "Double",
  --       italic = false,
  --       strikethrough = false,
  --     },
  --     inactive_tab = {
  --       bg_color = "#1e1e2e",
  --       fg_color = "#302D41",
  --       underline = "None",
  --       strikethrough = true
  --     }
  --
  --   }
  -- }
}

local SOLID_LEFT_ARROW = utf8.char(0xe0b2)

-- The filled in variant of the > symbol
local SOLID_RIGHT_ARROW = utf8.char(0xe0b0)

wezterm.on("format-tab-title", function(tab, tabs, panes, config, hover, max_width)
  local edge_background = "#1e1e2e"
  local background = "#1b1032"
  local foreground = "#808080"

  if tab.is_active then
    background = "#96CDFB"
    foreground = "#1A1826"
  elseif hover then
    background = "#1E1E2E"
    foreground = "#ABE9B3"
    else 
    background = "#1E1E2E"
    foreground = "#6E6C7E"
  end

  local edge_foreground = background

  -- ensure that the titles fit in the available space,
  -- and that we have room for the edges.
  local title = wezterm.truncate_right(tab.active_pane.title, max_width)

  return {
    {Background={Color=edge_background}},
    {Foreground={Color=edge_foreground}},
    {Text=SOLID_LEFT_ARROW},
        {Text=utf8.char(0x2588)},
    {Background={Color=background}},
    {Foreground={Color=foreground}},
    {Text=title},
    {Background={Color=edge_background}},
    {Foreground={Color=edge_foreground}},
        {Text=utf8.char(0x2588)},
    {Text=SOLID_RIGHT_ARROW},
  }
end)
return config

I think @epswims, you forgot to add enable_wayland though that is not the problem right now. It is the icons. I am going to ask someone who has more knowledge with Wayland related stuff

uncomfyhalomacro commented 2 years ago

i cant update wezterm. opensuse build service is under maintenance. i will update later once it is back online

uncomfyhalomacro commented 2 years ago

found out it isnt related to Wayland. did you have a previous installation of wezterm?

epswims commented 2 years ago

found out it isnt related to Wayland. did you have a previous installation of wezterm?

Yes, I initially installed the RPM for tumbleweed but then I was prompted to switch to the OpenSUSE official repo one when I was doing "sudo zypper dup".

I started getting double icons when the OpenSUSE one installed. When I uninstall it and reinstall the RPM, I no longer get this issue however I keep getting prompted to switch to the one in the OpenSUSE repo when I update my packages.

I get double icons only when I install the OpenSUSE official repo one

uncomfyhalomacro commented 2 years ago

seems like it resulted duplicated icons during installation. i wonder. nvm that. i was having trouble sleeping lately that i skipped read a lot

epswims commented 2 years ago

seems like it resulted duplicated icons during installation. i wonder. nvm that. i was having trouble sleeping lately that i skipped read a lot

Thank you for your response! When I click on WezTerm's application, it opens a separate application called "Wezterm-gui", so I'm not sure it's a duplicate icons issue.

When I just try to pin the wezterm-gui application, it results in a question mark I on once it closes, and does not allow me to open the application from that point

uncomfyhalomacro commented 2 years ago

seems like it resulted duplicated icons during installation. i wonder. nvm that. i was having trouble sleeping lately that i skipped read a lot

Thank you for your response! When I click on WezTerm's application, it opens a separate application called "Wezterm-gui", so I'm not sure it's a duplicate icons issue.

When I just try to pin the wezterm-gui application, it results in a question mark I on once it closes, and does not allow me to open the application from that point

I cannot replicate my issue on KDE Plasma on openSUSE Tumbleweed. I wonder if zypper failed to clean remnants of the previous rpm installation or the spec file for the previous rpm may have noreplace or something. Nothing wrong with my spec file here:

#
# spec file for package wezterm
#
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#

Name:           wezterm
Version:        20220408.101518.b908e2dd~232
Release:        0
Summary:        GPU-accelerated cross-platform terminal emulator and multiplexer
URL:            https://github.com/wez/wezterm
License:        (Apache-2.0 OR MIT) AND BSD-3-Clause AND (0BSD OR MIT OR Apache-2.0) AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR BSL-1.0 OR MIT) AND (Apache-2.0 OR MIT) AND (Apache-2.0 OR MIT) AND (Apache-2.0 OR MIT OR BSD-2-Clause) AND (Apache-2.0 OR MIT OR Zlib) AND (Apache-2.0 OR MIT OR Zlib) AND (MIT OR Unlicense) AND (Apache-2.0 OR Zlib OR MIT) AND Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND CC0-1.0 AND ISC AND LGPL-2.1-only AND MIT AND MPL-2.0 AND WTFPL AND Zlib AND MIT
Source0:        %{name}-%{version}.tar.xz
Source1:        vendor.tar.xz
Source2:        cargo_config
Requires:       terminfo
BuildRequires:  Mesa-libEGL-devel
BuildRequires:  cargo-packaging
BuildRequires:  rust >= 1.46
ExclusiveArch:  %{rust_arches}

BuildRequires:  cmake
BuildRequires:  gcc
BuildRequires:  gcc-c++
BuildRequires:  hicolor-icon-theme
BuildRequires:  libxkbcommon-devel
BuildRequires:  libxkbcommon-x11-devel
BuildRequires:  ncurses-devel
BuildRequires:  perl
BuildRequires:  pkgconfig
BuildRequires:  python-nautilus-common-files
BuildRequires:  python3
BuildRequires:  wayland-devel
BuildRequires:  xcb-util-devel
BuildRequires:  xcb-util-image-devel
BuildRequires:  xcb-util-keysyms-devel
BuildRequires:  xcb-util-wm-devel
BuildRequires:  pkgconfig(fontconfig)
BuildRequires:  pkgconfig(libssh2)
BuildRequires:  pkgconfig(openssl)
BuildRequires:  pkgconfig(tic)
BuildRequires:  pkgconfig(xcb)

%description
Wezterm is a GPU-accelerated terminal emulator written in Rust. It supports
ligatures, font fallback and true color. It features dynamic color schemes, hyperlinks,
and multiplex terminal panes.

%prep
%autosetup -a1
mkdir -p .cargo
cp %{SOURCE2} .cargo/config
tic -vvv -x -o terminfo termwiz/data/%{name}.terminfo

%build
%{cargo_build}

%install
install -Dm 0755 %{_builddir}/%{name}-%{version}/target/release/wezterm %{buildroot}%{_bindir}/wezterm
install -Dm 0755 %{_builddir}/%{name}-%{version}/target/release/wezterm-gui %{buildroot}%{_bindir}/wezterm-gui
install -Dm 0755 %{_builddir}/%{name}-%{version}/target/release/wezterm-mux-server %{buildroot}%{_bindir}/wezterm-mux-server
install -Dm 0755 %{_builddir}/%{name}-%{version}/target/release/strip-ansi-escapes %{buildroot}%{_bindir}/strip-ansi-escapes

install -Dm 0644 terminfo/w/wezterm %{buildroot}%{_datadir}/terminfo/w/wezterm
install -Dm 0644 assets/%{name}.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop
install -Dm 0644 assets/icon/%{name}-icon.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/org.wezfurlong.%{name}.svg
install -Dm 0644 assets/%{name}.appdata.xml %{buildroot}%{_datadir}/metainfo/org.wezfurlong.%{name}.appdata.xml
install -Dm 0644 assets/shell-integration/* -t %{buildroot}%{_sysconfdir}/profile.d
install -Dm 0644 assets/%{name}-nautilus.py %{buildroot}%{_datadir}/nautilus-python/extensions/%{name}-nautilus.py

%files
%license LICENSE.md
%doc README.md CONTRIBUTING.md
%{_bindir}/wezterm
%{_bindir}/wezterm-gui
%{_bindir}/wezterm-mux-server
%{_bindir}/strip-ansi-escapes
%{_datadir}/terminfo/w/wezterm
%{_datadir}/applications/wezterm.desktop
%{_datadir}/icons/hicolor/scalable/apps/org.wezfurlong.wezterm.svg
%{_datadir}/metainfo/org.wezfurlong.wezterm.appdata.xml
%{_datadir}/nautilus-python/extensions/wezterm-nautilus.py
%config %{_sysconfdir}/profile.d/wezterm.sh

%changelog
uncomfyhalomacro commented 2 years ago

@epswims did your issue resolve itself? just checking

epswims commented 2 years ago

@uncomfyhalomacro unfortunately it did not. Ultimately what I have been doing was that I just unpinned the application from my dock and have been simply running it from my application launcher so that way I do not get double icons. I enabled wayland in the config and all that did was change the logo from the wezterm logo to the wayland application one for the 'wezterm-gui'. This is something I'll just live with until I distro hop again haha

xpufx commented 2 years ago

@epswims you can actually test the latest nightly. wezterm's github CI also builds a nightly for openSUSE.

Download it here. https://wezfurlong.org/wezterm/install/linux.html#installing-on-fedora-and-rpm-based-systems

Please let me know if the behavior is the same (after removing all previous wezterm rpms). I am not sure if the spec files are the same but I know for a fact that the OBS and Github processes are not exactly the same.

You can lock the wezterm package so zypper won't mess with it.

uncomfyhalomacro commented 2 years ago

@uncomfyhalomacro unfortunately it did not. Ultimately what I have been doing was that I just unpinned the application from my dock and have been simply running it from my application launcher so that way I do not get double icons. I enabled wayland in the config and all that did was change the logo from the wezterm logo to the wayland application one for the 'wezterm-gui'. This is something I'll just live with until I distro hop again haha

after further testing, it seems this might be an icon pack issue and not from wezterm's. What Icon pack/theme are you using? breeze dark seems to return to the new logo. it might be that the icon pack is shipping an older icon

epswims commented 2 years ago

@uncomfyhalomacro unfortunately it did not. Ultimately what I have been doing was that I just unpinned the application from my dock and have been simply running it from my application launcher so that way I do not get double icons. I enabled wayland in the config and all that did was change the logo from the wezterm logo to the wayland application one for the 'wezterm-gui'. This is something I'll just live with until I distro hop again haha

after further testing, it seems this might be an icon pack issue and not from wezterm's. What Icon pack/theme are you using? breeze dark seems to return to the new logo. it might be that the icon pack is shipping an older icon

I am using the Papirus icon pack. I'll check out different icons to see if it resolves the issue

uncomfyhalomacro commented 2 years ago

Seems Breeze, and other Breeze variants and Adwaita are the only ones showing the correct icon. Removing the icons given from Papirus as a test resolves the issue image

After removing (see pinned wezterm app on taskbar): image

uncomfyhalomacro commented 2 years ago

we might need to update the icons shipped from Papirus or remove them or I will check if openSUSE is using an older version of papirus. going to check if latest papirus theme is shipping the latest wezterm icon. if it is an older version and there is a newer icon in the latest papirus icon theme pack, expect an SR to openSUSE build service tomorrow

uncomfyhalomacro commented 2 years ago

@epswims image it is shipping an older icon after all

wez commented 2 years ago

Can we get them to stop shipping an icon? It doesn't seem useful to have them duplicate the icon that's already part of the application

xpufx commented 2 years ago

Stylizing icons to give them a certain look is kind of what icon pack designers do. Though they might not be aware of a new icon and be open to incorporating that without change. Failing that here's another option, from their github page:

Hardcoded icons

Some software uses an absolute path instead of the icon name in a .desktop file or in the source code which makes them unthemable.

EDIT: I noticed their image filenames are all appimagekit-org.wezfurlong.wezterm.svg which to me sounds like it's the icon for the appimage version but I don't know how the configs work. I don't see why icons would be duplicated anyway even if there were multiples of them. One can also override the icon on most WMs and it works fine.

uncomfyhalomacro commented 2 years ago

Can we get them to stop shipping an icon? It doesn't seem useful to have them duplicate the icon that's already part of the application

I guess since you are the owner, you can request them to remove wezterm icons from their icon pack. The icon they are shipping isn't even a customized wezterm icon but just a duplicate from the original (though old version).

varlesh commented 2 years ago

The icon has been updated. We don't think we are duplicating the icon. We have our own style and features that we try to adhere to. But you have the right to use what you like. This is the power of free software. image

Also i say about StartupWMClass, try it.

uncomfyhalomacro commented 2 years ago

The icon has been updated. We don't think we are duplicating the icon. We have our own style and features that we try to adhere to. But you have the right to use what you like. This is the power of free software.

image

Also i say about StartupWMClass, try it.

i apologize for my lack of knowledge of the desktop file spec. I didn't know we can add that section. I will check if it works later 😄

github-actions[bot] commented 1 year ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.