SUMMARY Applications started by kglobalaccel start with LANG=C instead of the LANG environment variable set by the user. STEPS TO REPRODUCE 1. Create a new application menu entry for an application like st (suckless terminal) 2. Assign a custom shortcut to it 3. Start the application with the shortcut. 4. Check the windows properties with xprop OBSERVED RESULT With xprop the WM_LOCALE_NAME is set to C WM_LOCALE_NAME(STRING) = "C" The problem with this, is that even if my locale is set to UTF-8, characters outside the ASCII range cannot be typed, e.g. è é à á EXPECTED RESULT As my user LOCALE is set to en_US.UTF-8, I'd expect to have: WM_LOCALE_NAME(STRING) = "en_US.UTF-8" Starting the same application from the menu entry is not affected SOFTWARE/OS VERSIONS Operating System: Fedora 33 KDE Plasma Version: 5.20.5 KDE Frameworks Version: 5.79.0 Qt Version: 5.15.2 Kernel Version: 5.11.7-200.fc33.x86_64 OS Type: 64-bit Processors: 8 × Intel® Core™ i7-8650U CPU @ 1.90GHz Memory: 30.9 GiB of RAM Graphics Processor: Mesa Intel® UHD Graphics 620 ADDITIONAL INFORMATION ENVIRONMENT =========== LANG=en_US.UTF-8 LANGUAGE= SHELL=/bin/zsh Version ======= KWin version: 5.20.5 Qt Version: 5.15.2 Qt compile version: 5.15.2 XCB compile version: 1.13.1 Operation Mode: X11 only Build Options ============= KWIN_BUILD_DECORATIONS: yes KWIN_BUILD_TABBOX: yes KWIN_BUILD_ACTIVITIES: yes HAVE_DRM: yes HAVE_GBM: yes HAVE_EGL_STREAMS: yes HAVE_X11_XCB: yes HAVE_EPOXY_GLX: yes HAVE_WAYLAND_EGL: yes X11 === Vendor: Fedora Project Vendor Release: 12010000 Protocol Version/Revision: 11/0 SHAPE: yes; Version: 0x11 RANDR: yes; Version: 0x14 DAMAGE: yes; Version: 0x11 Composite: yes; Version: 0x4 RENDER: yes; Version: 0xb XFIXES: yes; Version: 0x50 SYNC: yes; Version: 0x31 GLX: yes; Version: 0x0 Decoration ========== Plugin: org.kde.kwin.aurorae Theme: __aurorae__svg__Layan Plugin recommends border size: No Blur: 1 onAllDesktopsAvailable: false alphaChannelSupported: true closeOnDoubleClickOnMenu: false decorationButtonsLeft: 0, 2 decorationButtonsRight: 6, 3, 4, 5 borderSize: 3 gridUnit: 14 font: RobotoMono Nerd Font,14,-1,5,57,0,0,0,0,0,Medium smallSpacing: 3 largeSpacing: 14 Platform ========== Name: KWin::X11StandalonePlatform Options ======= focusPolicy: 1 xwaylandCrashPolicy: xwaylandMaxCrashCount: 3 nextFocusPrefersMouse: false clickRaise: true autoRaise: false autoRaiseInterval: 750 delayFocusInterval: 300 shadeHover: false shadeHoverInterval: 250 separateScreenFocus: false placement: 10 focusPolicyIsReasonable: true borderSnapZone: 10 windowSnapZone: 10 centerSnapZone: 0 snapOnlyWhenOverlapping: false rollOverDesktops: true focusStealingPreventionLevel: 1 operationTitlebarDblClick: 5000 operationMaxButtonLeftClick: 5000 operationMaxButtonMiddleClick: 5015 operationMaxButtonRightClick: 5014 commandActiveTitlebar1: 0 commandActiveTitlebar2: 28 commandActiveTitlebar3: 2 commandInactiveTitlebar1: 4 commandInactiveTitlebar2: 28 commandInactiveTitlebar3: 2 commandWindow1: 7 commandWindow2: 8 commandWindow3: 8 commandWindowWheel: 28 commandAll1: 10 commandAll2: 3 commandAll3: 14 keyCmdAllModKey: 16777251 showGeometryTip: false condensedTitle: false electricBorderMaximize: true electricBorderTiling: true electricBorderCornerRatio: 0.25 borderlessMaximizedWindows: false killPingTimeout: 5000 hideUtilityWindowsForInactive: true compositingMode: 1 useCompositing: true hiddenPreviews: 1 glSmoothScale: 2 xrenderSmoothScale: false maxFpsInterval: 16666666 refreshRate: 0 vBlankTime: 6000000 glStrictBinding: true glStrictBindingFollowsDriver: true glCoreProfile: true glPreferBufferSwap: 101 glPlatformInterface: 1 windowsBlockCompositing: true Screen Edges ============ desktopSwitching: false desktopSwitchingMovingClients: false cursorPushBackDistance: 1x1 timeThreshold: 150 reActivateThreshold: 350 actionTopLeft: 0 actionTop: 0 actionTopRight: 0 actionRight: 0 actionBottomRight: 0 actionBottom: 0 actionBottomLeft: 0 actionLeft: 0 Screens ======= Multi-Head: no Active screen follows mouse: yes Number of Screens: 2 Screen 0: --------- Name: eDP1 Geometry: 0,1080,1920x1080 Scale: 1 Refresh Rate: 60.011 Screen 1: --------- Name: DP2-1 Geometry: 1920,0,3840x2160 Scale: 1 Refresh Rate: 30 Compositing =========== Compositing is active Compositing Type: OpenGL OpenGL vendor string: Intel OpenGL renderer string: Mesa Intel(R) UHD Graphics 620 (KBL GT2) OpenGL version string: 4.6 (Compatibility Profile) Mesa 20.3.4 OpenGL platform interface: GLX OpenGL shading language version string: 4.60 Driver: Intel GPU class: Unknown OpenGL version: 4.6 GLSL version: 4.60 Mesa version: 20.3.4 Linux kernel version: 5.11.7 Direct rendering: Requires strict binding: yes GLSL shaders: yes Texture NPOT support: yes Virtual Machine: no OpenGL 2 Shaders are used Painting blocks for vertical retrace: no Loaded Effects: --------------- kwin4_effect_morphingpopups kwin4_effect_sessionquit kwin4_effect_fullscreen zoom kwin4_effect_fadingpopups kwin4_effect_maximize kwin4_effect_login kwin4_effect_logout kwin4_effect_windowaperture kwin4_effect_translucency kwin4_effect_dialogparent kwin4_effect_fade kwin4_effect_frozenapp kwin4_effect_squash slidingpopups slide screenshot desktopgrid colorpicker presentwindows highlightwindow blur contrast startupfeedback screenedge kscreen Currently Active Effects: ------------------------- blur contrast Effect Settings: ---------------- kwin4_effect_morphingpopups: pluginId: kwin4_effect_morphingpopups isActiveFullScreenEffect: false kwin4_effect_sessionquit: pluginId: kwin4_effect_sessionquit isActiveFullScreenEffect: false kwin4_effect_fullscreen: pluginId: kwin4_effect_fullscreen isActiveFullScreenEffect: false zoom: zoomFactor: 1.2 mousePointer: 0 mouseTracking: 0 focusTrackingEnabled: false textCaretTrackingEnabled: false focusDelay: 350 moveFactor: 20 targetZoom: 1 kwin4_effect_fadingpopups: pluginId: kwin4_effect_fadingpopups isActiveFullScreenEffect: false kwin4_effect_maximize: pluginId: kwin4_effect_maximize isActiveFullScreenEffect: false kwin4_effect_login: pluginId: kwin4_effect_login isActiveFullScreenEffect: false kwin4_effect_logout: pluginId: kwin4_effect_logout isActiveFullScreenEffect: false kwin4_effect_windowaperture: pluginId: kwin4_effect_windowaperture isActiveFullScreenEffect: false kwin4_effect_translucency: pluginId: kwin4_effect_translucency isActiveFullScreenEffect: false kwin4_effect_dialogparent: pluginId: kwin4_effect_dialogparent isActiveFullScreenEffect: false kwin4_effect_fade: pluginId: kwin4_effect_fade isActiveFullScreenEffect: false kwin4_effect_frozenapp: pluginId: kwin4_effect_frozenapp isActiveFullScreenEffect: false kwin4_effect_squash: pluginId: kwin4_effect_squash isActiveFullScreenEffect: false slidingpopups: slideInDuration: 150 slideOutDuration: 250 slide: duration: 500 horizontalGap: 45 verticalGap: 20 slideDocks: false slideBackground: true screenshot: desktopgrid: zoomDuration: 300 border: 10 desktopNameAlignment: 0 layoutMode: 0 customLayoutRows: 2 usePresentWindows: true colorpicker: presentwindows: layoutMode: 0 showCaptions: true showIcons: true doNotCloseWindows: false ignoreMinimized: false accuracy: 20 fillGaps: true fadeDuration: 150 showPanel: false leftButtonWindow: 1 rightButtonWindow: 2 middleButtonWindow: 0 leftButtonDesktop: 2 middleButtonDesktop: 0 rightButtonDesktop: 0 highlightwindow: blur: contrast: startupfeedback: type: 1 screenedge: kscreen:
It can be tested with xterm as well 1. install xterm 2. assign a shortcut in the application menu for the xterm entry 3. start xterm with the shortcut 4. see the windows properties with xprop OBSERVED BEHAVIOR _NET_WM_ICON_GEOMETRY(CARDINAL) = 3, 1797, 64, 38 _NET_WM_ALLOWED_ACTIONS(ATOM) = _NET_WM_ACTION_MOVE, _NET_WM_ACTION_RESIZE, _NET_WM_ACTION_MINIMIZE, _NET_WM_ACTION_SHADE, _NET_WM_ACTION_MAXIMIZE_VERT, _NET_WM_ACTION_MAXIMIZE_HORZ, _NET_WM_ACTION_CHANGE_DESKTOP, _NET_WM_ACTION_CLOSE _KDE_NET_WM_FRAME_STRUT(CARDINAL) = 0, 0, 28, 0 _NET_FRAME_EXTENTS(CARDINAL) = 0, 0, 28, 0 _NET_WM_DESKTOP(CARDINAL) = 0 _KDE_NET_WM_ACTIVITIES(STRING) = "c892a6d5-1ecb-416b-9766-21082c57ef37" WM_STATE(WM_STATE): window state: Normal icon window: 0x0 _NET_WM_STATE(ATOM) = _NET_WM_STATE_MAXIMIZED_VERT, _NET_WM_STATE_MAXIMIZED_HORZ, _NET_WM_STATE_FOCUSED WM_PROTOCOLS(ATOM): protocols WM_DELETE_WINDOW _NET_WM_PID(CARDINAL) = 2373730 _KDE_NET_WM_USER_CREATION_TIME(CARDINAL) = 70416968 SM_CLIENT_ID(STRING) = "10d1d6676d000161648845700000038890046" WM_CLIENT_LEADER(WINDOW): window id # 0xe20000a WM_LOCALE_NAME(STRING) = "C" WM_CLASS(STRING) = "xterm", "XTerm" WM_HINTS(WM_HINTS): Client accepts input or input focus: True Initial state is Normal State. bitmap id # to use for icon: 0xe200013 bitmap id # of mask for icon: 0xe200015 WM_NORMAL_HINTS(WM_SIZE_HINTS): user specified size: 3836 by 2084 program specified size: 3836 by 2084 program specified minimum size: 26 by 17 program specified resize increment: 6 by 13 program specified base size: 20 by 4 window gravity: NorthWest WM_CLIENT_MACHINE(STRING) = "bigmom" WM_COMMAND(STRING) = { "xterm" } WM_ICON_NAME(STRING) = "xprop" WM_NAME(STRING) = "xprop" EXPECTED RESULT _NET_WM_ICON_NAME(UTF8_STRING) = "xprop" _NET_WM_NAME(UTF8_STRING) = "xprop" _NET_WM_ICON_GEOMETRY(CARDINAL) = 3, 1801, 64, 38 _NET_WM_ALLOWED_ACTIONS(ATOM) = _NET_WM_ACTION_MOVE, _NET_WM_ACTION_RESIZE, _NET_WM_ACTION_MINIMIZE, _NET_WM_ACTION_SHADE, _NET_WM_ACTION_MAXIMIZE_VERT, _NET_WM_ACTION_MAXIMIZE_HORZ, _NET_WM_ACTION_CHANGE_DESKTOP, _NET_WM_ACTION_CLOSE _KDE_NET_WM_FRAME_STRUT(CARDINAL) = 0, 0, 28, 0 _NET_FRAME_EXTENTS(CARDINAL) = 0, 0, 28, 0 _NET_WM_DESKTOP(CARDINAL) = 0 _KDE_NET_WM_ACTIVITIES(STRING) = "c892a6d5-1ecb-416b-9766-21082c57ef37" WM_STATE(WM_STATE): window state: Normal icon window: 0x0 _NET_WM_STATE(ATOM) = _NET_WM_STATE_MAXIMIZED_VERT, _NET_WM_STATE_MAXIMIZED_HORZ, _NET_WM_STATE_FOCUSED WM_PROTOCOLS(ATOM): protocols WM_DELETE_WINDOW _NET_WM_PID(CARDINAL) = 2385400 SM_CLIENT_ID(STRING) = "10d1d6676d000161648870500000038890048" _KDE_NET_WM_USER_CREATION_TIME(CARDINAL) = 70664391 WM_CLIENT_LEADER(WINDOW): window id # 0xe20000a WM_LOCALE_NAME(STRING) = "en_US.UTF-8" WM_CLASS(STRING) = "xterm", "XTerm" WM_HINTS(WM_HINTS): Client accepts input or input focus: True Initial state is Normal State. bitmap id # to use for icon: 0xe20001a bitmap id # of mask for icon: 0xe20001c WM_NORMAL_HINTS(WM_SIZE_HINTS): user specified size: 3836 by 2084 program specified size: 3836 by 2084 program specified minimum size: 26 by 17 program specified resize increment: 6 by 13 program specified base size: 20 by 4 window gravity: NorthWest WM_CLIENT_MACHINE(STRING) = "bigmom" WM_COMMAND(STRING) = { "xterm" } WM_ICON_NAME(STRING) = "xprop" WM_NAME(STRING) = "xprop"
Also starting from the application menu, without a shortcut, has the same behavior, so it's a more general issue. Which is the right component in this case?
Probably the kio applicationlauncherjob/commandlauncherjob
(In reply to Nate Graham from comment #3) > Probably the kio applicationlauncherjob/commandlauncherjob Kglobalaccel can't use KIO, so it uses dbus activation or runs them via klauncher
Oh actually I'm pretty sure this is fixed by the same thing that fixed Bug 429435 in Plasma 5.21! *** This bug has been marked as a duplicate of bug 429435 ***
Actually I didn't think to test on a recent plasma version. I'll test ASAP and report back. Thanks!
(In reply to Nate Graham from comment #5) > Oh actually I'm pretty sure this is fixed by the same thing that fixed Bug > 429435 in Plasma 5.21! > > *** This bug has been marked as a duplicate of bug 429435 *** I confirm that with Plasma > 5.21 it works properly. Thanks!
Hooray!