Programs started with konsole stops when closed

hey, how do i make so i can run apps without them being closed if i exit the Konsole?
for example, sometimes Latte-Dock doesn't stay on screen and disappears during the boot, if i start it again with the konsole latte-dock --Replace it works but i have to keep that konsole instance always on, same when i use a Flatpak app (have to use flatpak now since the python update killed the compiled one, waiting for update)

Kernel: 5.15.11-230-tkg-pds x86_64 bits: 64 compiler: gcc v: 11.1.0
parameters: intel_pstate=passive BOOT_IMAGE=/@/boot/vmlinuz-linux-tkg-pds
root=UUID=a2edb1d1-2b71-4078-8e7e-5c1eddf533f9 rw rootflags=subvol=@
quiet
cryptdevice=UUID=53f62651-9e7c-4ac4-9ddc-9ae7a1225771:luks-53f62651-9e7c-4ac4-9ddc-9ae7a1225771
root=/dev/mapper/luks-53f62651-9e7c-4ac4-9ddc-9ae7a1225771 splash
rd.udev.log_priority=3 vt.global_cursor_default=0
systemd.unified_cgroup_hierarchy=1 loglevel=3
Desktop: KDE Plasma 5.23.4 tk: Qt 5.15.2 info: latte-dock wm: kwin_x11
vt: 1 dm: SDDM Distro: Garuda Linux base: Arch Linux
Machine:
Type: Desktop System: Micro-Star product: MS-7B79 v: 3.0
serial: <superuser required>
Mobo: Micro-Star model: X470 GAMING PLUS MAX (MS-7B79) v: 3.0
serial: <superuser required> UEFI: American Megatrends LLC. v: H.C0
date: 05/18/2021
CPU:
Info: model: AMD Ryzen 7 5800X bits: 64 type: MT MCP arch: Zen 3
family: 0x19 (25) model-id: 0x21 (33) stepping: 0 microcode: 0xA201009
Topology: cpus: 1x cores: 8 tpc: 2 threads: 16 smt: enabled cache:
L1: 512 KiB desc: d-8x32 KiB; i-8x32 KiB L2: 4 MiB desc: 8x512 KiB
L3: 32 MiB desc: 1x32 MiB
Speed (MHz): avg: 4274 high: 4275 min/max: N/A cores: 1: 4275 2: 4274
3: 4275 4: 4275 5: 4273 6: 4275 7: 4275 8: 4273 9: 4275 10: 4275 11: 4275
12: 4275 13: 4275 14: 4275 15: 4275 16: 4275 bogomips: 136939
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Vulnerabilities:
Type: itlb_multihit status: Not affected
Type: l1tf status: Not affected
Type: mds status: Not affected
Type: meltdown status: Not affected
Type: spec_store_bypass
mitigation: Speculative Store Bypass disabled via prctl and seccomp
Type: spectre_v1
mitigation: usercopy/swapgs barriers and __user pointer sanitization
Type: spectre_v2 mitigation: Full AMD retpoline, IBPB: conditional,
IBRS_FW, STIBP: always-on, RSB filling
Type: srbds status: Not affected
Type: tsx_async_abort status: Not affected
Graphics:
Device-1: NVIDIA TU104 [GeForce RTX 2080 Rev. A] vendor: ASUSTeK
driver: nvidia v: 495.46 alternate: nouveau,nvidia_drm bus-ID: 27:00.0
chip-ID: 10de:1e87 class-ID: 0300
Display: x11 server: X.Org 1.21.1.2 compositor: kwin_x11 driver:
loaded: nvidia display-ID: :0 screens: 1
Screen-1: 0 s-res: 2560x1440 s-dpi: 122 s-size: 533x302mm (21.0x11.9")
s-diag: 613mm (24.1")
Monitor-1: DP-4 res: 2560x1440 dpi: 123 size: 527x296mm (20.7x11.7")
diag: 604mm (23.8")
OpenGL: renderer: NVIDIA GeForce RTX 2080/PCIe/SSE2
v: 4.6.0 NVIDIA 495.46 direct render: Yes
Audio:
Device-1: NVIDIA TU104 HD Audio vendor: ASUSTeK driver: snd_hda_intel
v: kernel bus-ID: 27:00.1 chip-ID: 10de:10f8 class-ID: 0403
Device-2: AMD Starship/Matisse HD Audio vendor: Micro-Star MSI
driver: snd_hda_intel v: kernel bus-ID: 29:00.4 chip-ID: 1022:1487
class-ID: 0403
Sound Server-1: ALSA v: k5.15.11-230-tkg-pds running: yes
Sound Server-2: JACK v: 1.9.19 running: no
Sound Server-3: PulseAudio v: 15.0 running: no
Sound Server-4: PipeWire v: 0.3.42 running: yes
Network:
Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
vendor: Micro-Star MSI driver: r8169 v: kernel port: f000 bus-ID: 22:00.0
chip-ID: 10ec:8168 class-ID: 0200
IF: enp34s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
Drives:
Local Storage: total: 1.56 TiB used: 875.37 GiB (54.6%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/sda maj-min: 8:0 vendor: Seagate model: ST1000DM003-1CH162
size: 931.51 GiB block-size: physical: 4096 B logical: 512 B
speed: 6.0 Gb/s type: HDD rpm: 7200 serial: <filter> rev: CC49
scheme: MBR
ID-2: /dev/sdb maj-min: 8:16 vendor: Kingston model: SA400S37480G
size: 447.13 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
type: SSD serial: <filter> rev: 1103 scheme: GPT
ID-3: /dev/sdc maj-min: 8:32 vendor: Kingston model: SUV400S37240G
size: 223.57 GiB block-size: physical: 4096 B logical: 512 B
speed: 6.0 Gb/s type: SSD serial: <filter> rev: 37R5 scheme: GPT
Partition:
ID-1: / raw-size: 223.31 GiB size: 223.31 GiB (100.00%)
used: 92.59 GiB (41.5%) fs: btrfs dev: /dev/dm-0 maj-min: 254:0
mapped: luks-53f62651-9e7c-4ac4-9ddc-9ae7a1225771
ID-2: /boot/efi raw-size: 260 MiB size: 256 MiB (98.45%)
used: 706 KiB (0.3%) fs: vfat dev: /dev/sdc1 maj-min: 8:33
ID-3: /home raw-size: 223.31 GiB size: 223.31 GiB (100.00%)
used: 92.59 GiB (41.5%) fs: btrfs dev: /dev/dm-0 maj-min: 254:0
mapped: luks-53f62651-9e7c-4ac4-9ddc-9ae7a1225771
ID-4: /var/log raw-size: 223.31 GiB size: 223.31 GiB (100.00%)
used: 92.59 GiB (41.5%) fs: btrfs dev: /dev/dm-0 maj-min: 254:0
mapped: luks-53f62651-9e7c-4ac4-9ddc-9ae7a1225771
ID-5: /var/tmp raw-size: 223.31 GiB size: 223.31 GiB (100.00%)
used: 92.59 GiB (41.5%) fs: btrfs dev: /dev/dm-0 maj-min: 254:0
mapped: luks-53f62651-9e7c-4ac4-9ddc-9ae7a1225771
Swap:
Kernel: swappiness: 133 (default 60) cache-pressure: 50 (default 100)
ID-1: swap-1 type: zram size: 15.61 GiB used: 1.69 GiB (10.8%)
priority: 100 dev: /dev/zram0
Sensors:
System Temperatures: cpu: N/A mobo: N/A gpu: nvidia temp: 47 C
Fan Speeds (RPM): cpu: 0 gpu: nvidia fan: 0%
Info:
Processes: 437 Uptime: 22m wakeups: 1 Memory: 15.61 GiB
used: 5.26 GiB (33.7%) Init: systemd v: 250 tool: systemctl Compilers:
gcc: 11.1.0 clang: 13.0.0 Packages: 1828 pacman: 1812 lib: 505 flatpak: 16
Shell: fish v: 3.3.1 running-in: konsole inxi: 3.3.11

I don't think this is possible.
See e.g. note "ending a session" below.
https://docs.fedoraproject.org/en-US/fedora/rawhide/system-administrators-guide/basic-system-configuration/Opening_GUI_Applications/

2 Likes

oooh, so using ALT+F2 to start the app works as i wanted, at least for the flatpak, thanks :smiley:

it's strange that with the console commands you can't do it, it should definitely be a thing

I think that's simply how x11 works.
The way I see it (but this could sound like a blasphemy to devs :blush:) is that the GUI apps are managed by X server. X server is connected to a terminal, which normally is tty7, which takes your graphical environment.
So if you launch from a console, that console session starts the X session for your GUI app. So, closing the console is like closing the session with the X server, so the app is dead.

Ok, that's enough with my fantasy.
Glad that at least the link gave you a good idea... :wink:

3 Likes

this sound so antiquated, i hope wayland fixes this, even tho i can't even use it -_-

Autostart that and you won’t have a problem, I should think. I’ve done something similar with the compositor in Xfce, for example. Just don’t use Konsole to do it.

1 Like

it is set up to autostart, but sometimes it doesn't keep running and it shuts down for some reason, i have to logout and login to make restart

Just to confirm, this isn’t (easily*) possible. Processes in Linux operate as a kind of tree, so when the parent process is terminated all child processes are terminated too.

If you want to run something from within a DE then using its “run application” dialogue is probably the best option, e.g. ALT-F2 (otherwise a runner like dmenu or rofi etc. would also work).

* OK, so it is possible, but there are easier ways.

4 Likes

yup yup the ALT-F2 works as i wanted, it starts flatpaks too...
nohup seems working, nice alternative for ALT-F2 thanks!

1 Like

Type
Command &

2 Likes

It's possible... I use nohup latte-dock replace & or Krunner latte-dock replace

2 Likes

Yup. Has to have the '--replace' part.

This is the easiest solution for most use cases (not so much for Latte). This puts the app in the background and if the terminal window is subsequently closed the app continues running in the background.

Example:

firefox &

Or, a more complicated but a bit better method:

/usr/lib/firefox/firefox --new-window %u > /dev/null 2 > & 1 & disown
3 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.