You are not logged in.
Hi!
I'm using sway with Wayland and bemenu
So i want change pycharm entry in bemenu to
export _JAVA_AWT_WM_NONREPARENTING=1 && pycharmHow I can do it?
pycharm.desktop isn't the solution
Last edited by Morta (2023-04-08 22:02:43)
Offline
You really should just export that variable from your shell profile prior to even launching sway.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
The "systemd way" would be to set it in ~/.config/environment.d/myenv.conf (or any other filename).
Offline
That "systemd way" is rather silly as then you'd need to use yet another systemd command to import that environment ... e.g., into your shell profile. Skip the middle man - especially when the middle man is excessively complicated for no reason at all.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I did in .bashrc and ~/.profile but when I'm lunching over bemenu it's doesn't work with config in sway and mod+p as shortcut it's works like a charm
Offline
That "systemd way" is rather silly as then you'd need to use yet another systemd command to import that environment ... e.g., into your shell profile. Skip the middle man - especially when the middle man is excessively complicated for no reason at all.
I honestly do not know what you mean. For me it is set without running any command.
Last edited by -MacNuke- (2023-04-08 15:52:27)
Offline
It's set for systemd user services and anything launched from them. But if you start a compositor from a tty, it will not be set unless you have specifically done something to import that environment.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I did in .bashrc and ~/.profile but when I'm lunching over bemenu it's doesn't work with config in sway and mod+p as shortcut it's works like a charm
Post those files and explain how you start sway.
Offline
I start sway with GDM or SDDM.
[morta@lapt0p ~]$ cat /home/morta/.bashrc
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
alias ls='ls --color=auto'
PS1='[\u@\h \W]\$ '
if [ "$XDG_SESSION_DESKTOP" = "sway" ] ; then
# https://github.com/swaywm/sway/issues/595
export _JAVA_AWT_WM_NONREPARENTING=1
fi[morta@lapt0p ~]$ cat ~/.profile
if [ "$XDG_SESSION_DESKTOP" = "sway" ] ; then
# https://github.com/swaywm/sway/issues/595
export _JAVA_AWT_WM_NONREPARENTING=1
fiOffline
... from your shell profile prior to even launching sway.
if [ "$XDG_SESSION_DESKTOP" = "sway" ]...
Do you see the problem here? The code in that conditional block will almost never execute (you'd have to take special steps to start a terminal emulator to start a login shell).
But if you are using display manager(s) this may not actually be relevant. You'd need to set it somewhere the display manager would pick it up ... I can't help with display managers.
Last edited by Trilby (2023-04-08 20:35:07)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
~/.profile might be sourced, but I'd be way less confident about $XDG_SESSION_DESKTOP being set ahead of the session (and when this is sourced)
You'd probably want to edit /usr/share/wayland-sessions/sway.desktop
Offline
doesn't work
[morta@lapt0p ~]$ cat /usr/share/wayland-sessions/sway.desktop
[Desktop Entry]
Name=Sway
Comment=An i3-compatible Wayland compositor
Exec=sway && export _JAVA_AWT_WM_NONREPARENTING=1
Type=Applicationneither
[morta@lapt0p ~]$ cat /usr/share/wayland-sessions/sway.desktop
[Desktop Entry]
Name=Sway
Comment=An i3-compatible Wayland compositor
Exec=export _JAVA_AWT_WM_NONREPARENTING=1 && sway
Type=ApplicationI can't login anymore on sway
Last edited by Morta (2023-04-08 21:07:53)
Offline
Because that's not legal desktop service syntax.
man envOffline
[morta@lapt0p ~]$ cat /usr/share/wayland-sessions/sway.desktop
[Desktop Entry]
Name=Sway
Comment=An i3-compatible Wayland compositor
Exec=env -i sway -u _JAVA_AWT_WM_NONREPARENTING=1
Type=ApplicationDosen’t work
Offline
Exec=env -i sway -u _JAVA_AWT_WM_NONREPARENTING=1How did you cook up that nonsense?
There's a asynopsis in the manpage and you can frankly also just google how to use "env"…
Offline
Or see the wiki
https://wiki.archlinux.org/title/Deskto … _variables
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I have googled. Cloud you help me?
Offline
I got it
Offline
Exec=env JAVA_AWT_WM_NONREPARENTING=1 swaydid the job
Last edited by Morta (2023-04-08 21:57:47)
Offline
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.
Offline