You are not logged in.
OK, I know the title doesn't quite explain my question, so let me clarify this: I have set gnome-terminal to close after a command has been executed (in its profile settings). I like it that way. The thing is - it closes after some commands but it remains open after other commands. Since some commands are insanely long, I've put them in scripts ('.sh' files) and here's the weird part: the script for making a backup of thunderbird settings runs its course and then gnome-terminal exits, as it should be. But the script to create a backup of my megamod for Scania Streamline (Euro Truck Simulator 2) runs its course and gnome-terminal remains open indefinitely.
Why is that? What is it that's keeping it open when it SHOULD exit?
I must note that this started happening recently, like 2-3 months ago. I've been using these scripts for a few years already and never had a case where gnome-terminal would remain open after executing the command in the script.
At first I thought what kept the terminal open was the Scania script's header: #!/bin/bash, so I removed it from the sh file but that didn't change anything and the Scania script still keeps Gnome Terminal open and running, even after the task has been completed.
Here are the two scripts - for thunderbird and for Scania, cuz I have a feeling you'll ask for their content. They're basically normal terminal commands put together in a single file for conveniency and for using as aliases.
The thunderbird backup script:
rm -v /media/1000GB/PROGRAMS/INTERNET/BROWSERS/THUNDERBIRD/thunderbird-config.7z && profile-cleaner t && 7z a /media/1000GB/PROGRAMS/INTERNET/BROWSERS/THUNDERBIRD/thunderbird-config.7z .thunderbird -mx=0 -mmt=8The Scania backup script:
rm -v "/media/1000HD/ИГРИ/TRUCK GAMES/ETS 2/MY MODS/SCANIA STREAMLINE/Scania Streamline v1.5.6 - EU3 sound + Supergirl.7z" && cd /media/1000GB/GAMES_1000/ETS2_Linux_146_MODS_and_SAVES/mod && 7z a "/media/1000HD/ИГРИ/TRUCK GAMES/ETS 2/MY MODS/SCANIA STREAMLINE/Scania Streamline v1.5.6 - EU3 sound + Supergirl.7z" "Scania Streamline v1.5.6 - EU3 sound + Supergirl/" -mx=0 -mmt=8[rado@arch]: ~>$ gnome-terminal --version
# GNOME Terminal 3.48.2 using VTE 0.72.2 +BIDI +GNUTLS +ICU +SYSTEMDI also tried adding "&& exit" at the end of each command but gnome-terminal seems to be ignoring it completely, so I removed it.
I asked the same question on Gnome's forum a few hours ago but there's still no answer and considering how "helpful" they've been so far, I doubt they'll ever answer, so I'm hoping someone here might ideas or workarounds.
Last edited by rado84 (2023-09-02 18:26:23)
Core i7-4770, GTX 1660 Ti, 32 GB RAM, Arch 6.x LTS, Cinnamon 5.2.7, GDM
Offline
Instead of " && exit" did you try "&& echo script finally done" to see whether the previous commands actually return at some point?
Also check "ps fax" to see what parameters apply to the gnome-terminal instance and how the scripts are actually invoked (because if one of them runs nested inside an interactive shell, you'll just return to that shell)
At first I thought what kept the terminal open was the Scania script's header: #!/bin/bash, so I removed it from the sh file
No, and please return the shebang.
Offline
Both scripts return "Everything is OK" after they're done. The only difference is that scania script doesn't close the terminal. I ran that script and after that I ran your "ps fax" and I don't see gnome-terminal anywhere in that... list, or whatever that is.
[rado@arch]: ~>$ scania
„'/media/1000HD/ИГРИ/TRUCK GAMES/ETS 2/MY MODS/SCANIA STREAMLINE/Scania Streamline v1.5.6 - EU3 sound + Supergirl.7z'“ е изтрит
7-Zip [64] 17.04 : Copyright (c) 1999-2021 Igor Pavlov : 2017-08-28
p7zip Version 17.04 (locale=bg_BG.UTF-8,Utf16=on,HugeFiles=on,64 bits,8 CPUs x64)
Scanning the drive:
133 folders, 672 files, 455499889 bytes (435 MiB)
Creating archive: /media/1000HD/ИГРИ/TRUCK GAMES/ETS 2/MY MODS/SCANIA STREAMLINE/Scania Streamline v1.5.6 - EU3 sound + Supergirl.7z
Items to compress: 805
Files read from disk: 672
Archive size: 455508662 bytes (435 MiB)
Everything is Ok
[rado@arch]: ~>$ ps fax
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 2 0.0 0.0 0 0 ? S авг31 0:00 [kthreadd]
root 3 0.0 0.0 0 0 ? I< авг31 0:00 \_ [rcu_gp]
root 4 0.0 0.0 0 0 ? I< авг31 0:00 \_ [rcu_par_gp]
root 5 0.0 0.0 0 0 ? I< авг31 0:00 \_ [slub_flushwq]
root 6 0.0 0.0 0 0 ? I< авг31 0:00 \_ [netns]
root 10 0.0 0.0 0 0 ? I< авг31 0:00 \_ [mm_percpu_wq]
root 12 0.0 0.0 0 0 ? I авг31 0:00 \_ [rcu_tasks_kthread]
root 13 0.0 0.0 0 0 ? I авг31 0:00 \_ [rcu_tasks_rude_kthread]
root 14 0.0 0.0 0 0 ? I авг31 0:00 \_ [rcu_tasks_trace_kthread]
root 15 0.0 0.0 0 0 ? S авг31 0:01 \_ [ksoftirqd/0]
root 16 0.0 0.0 0 0 ? I авг31 0:10 \_ [rcu_preempt]
root 17 0.0 0.0 0 0 ? S авг31 0:00 \_ [migration/0]
root 18 0.0 0.0 0 0 ? S авг31 0:00 \_ [idle_inject/0]
root 20 0.0 0.0 0 0 ? S авг31 0:00 \_ [cpuhp/0]
root 21 0.0 0.0 0 0 ? S авг31 0:00 \_ [cpuhp/1]
root 22 0.0 0.0 0 0 ? S авг31 0:00 \_ [idle_inject/1]
root 23 0.0 0.0 0 0 ? S авг31 0:00 \_ [migration/1]
root 24 0.0 0.0 0 0 ? S авг31 0:00 \_ [ksoftirqd/1]
root 26 0.0 0.0 0 0 ? I< авг31 0:00 \_ [kworker/1:0H-events_highpri]
root 27 0.0 0.0 0 0 ? S авг31 0:00 \_ [cpuhp/2]
root 28 0.0 0.0 0 0 ? S авг31 0:00 \_ [idle_inject/2]
root 29 0.0 0.0 0 0 ? S авг31 0:00 \_ [migration/2]
root 30 0.0 0.0 0 0 ? S авг31 0:00 \_ [ksoftirqd/2]
root 32 0.0 0.0 0 0 ? I< авг31 0:00 \_ [kworker/2:0H-events_highpri]
root 33 0.0 0.0 0 0 ? S авг31 0:00 \_ [cpuhp/3]
root 34 0.0 0.0 0 0 ? S авг31 0:00 \_ [idle_inject/3]
root 35 0.0 0.0 0 0 ? S авг31 0:00 \_ [migration/3]
root 36 0.0 0.0 0 0 ? S авг31 0:00 \_ [ksoftirqd/3]
root 38 0.0 0.0 0 0 ? I< авг31 0:00 \_ [kworker/3:0H-events_highpri]
root 39 0.0 0.0 0 0 ? S авг31 0:00 \_ [cpuhp/4]
root 40 0.0 0.0 0 0 ? S авг31 0:00 \_ [idle_inject/4]
root 41 0.0 0.0 0 0 ? S авг31 0:00 \_ [migration/4]
root 42 0.0 0.0 0 0 ? S авг31 0:00 \_ [ksoftirqd/4]
root 44 0.0 0.0 0 0 ? I< авг31 0:00 \_ [kworker/4:0H-kblockd]
root 45 0.0 0.0 0 0 ? S авг31 0:00 \_ [cpuhp/5]
root 46 0.0 0.0 0 0 ? S авг31 0:00 \_ [idle_inject/5]
root 47 0.0 0.0 0 0 ? S авг31 0:00 \_ [migration/5]
root 48 0.0 0.0 0 0 ? S авг31 0:00 \_ [ksoftirqd/5]
root 51 0.0 0.0 0 0 ? S авг31 0:00 \_ [cpuhp/6]
root 52 0.0 0.0 0 0 ? S авг31 0:00 \_ [idle_inject/6]
root 53 0.0 0.0 0 0 ? S авг31 0:00 \_ [migration/6]
root 54 0.0 0.0 0 0 ? S авг31 0:00 \_ [ksoftirqd/6]
root 56 0.0 0.0 0 0 ? I< авг31 0:00 \_ [kworker/6:0H-events_highpri]
root 57 0.0 0.0 0 0 ? S авг31 0:00 \_ [cpuhp/7]
root 58 0.0 0.0 0 0 ? S авг31 0:00 \_ [idle_inject/7]
root 59 0.0 0.0 0 0 ? S авг31 0:00 \_ [migration/7]
root 60 0.0 0.0 0 0 ? S авг31 0:00 \_ [ksoftirqd/7]
root 62 0.0 0.0 0 0 ? I< авг31 0:00 \_ [kworker/7:0H-kblockd]
root 63 0.0 0.0 0 0 ? S авг31 0:00 \_ [kdevtmpfs]
root 64 0.0 0.0 0 0 ? I< авг31 0:00 \_ [inet_frag_wq]
root 65 0.0 0.0 0 0 ? S авг31 0:00 \_ [kauditd]
root 66 0.0 0.0 0 0 ? S авг31 0:00 \_ [khungtaskd]
root 68 0.0 0.0 0 0 ? S авг31 0:00 \_ [oom_reaper]
root 69 0.0 0.0 0 0 ? I< авг31 0:00 \_ [writeback]
root 70 0.0 0.0 0 0 ? S авг31 0:16 \_ [kcompactd0]
root 71 0.0 0.0 0 0 ? SN авг31 0:00 \_ [ksmd]
root 73 0.0 0.0 0 0 ? SN авг31 0:03 \_ [khugepaged]
root 74 0.0 0.0 0 0 ? I< авг31 0:00 \_ [kintegrityd]
root 75 0.0 0.0 0 0 ? I< авг31 0:00 \_ [kblockd]
root 76 0.0 0.0 0 0 ? I< авг31 0:00 \_ [blkcg_punt_bio]
root 77 0.0 0.0 0 0 ? I< авг31 0:00 \_ [tpm_dev_wq]
root 78 0.0 0.0 0 0 ? I< авг31 0:00 \_ [ata_sff]
root 79 0.0 0.0 0 0 ? I< авг31 0:00 \_ [edac-poller]
root 80 0.0 0.0 0 0 ? I< авг31 0:00 \_ [devfreq_wq]
root 81 0.0 0.0 0 0 ? S авг31 0:00 \_ [watchdogd]
root 83 0.0 0.0 0 0 ? I< авг31 0:00 \_ [kworker/2:1H-kblockd]
root 84 0.0 0.0 0 0 ? S авг31 0:02 \_ [kswapd0]
root 90 0.0 0.0 0 0 ? I< авг31 0:00 \_ [kthrotld]
root 97 0.0 0.0 0 0 ? I< авг31 0:00 \_ [acpi_thermal_pm]
root 99 0.0 0.0 0 0 ? S авг31 0:00 \_ [scsi_eh_0]
root 100 0.0 0.0 0 0 ? I< авг31 0:00 \_ [scsi_tmf_0]
root 101 0.0 0.0 0 0 ? S авг31 0:00 \_ [scsi_eh_1]
root 102 0.0 0.0 0 0 ? I< авг31 0:00 \_ [scsi_tmf_1]
root 103 0.0 0.0 0 0 ? S авг31 0:00 \_ [scsi_eh_2]
root 104 0.0 0.0 0 0 ? I< авг31 0:00 \_ [scsi_tmf_2]
root 105 0.0 0.0 0 0 ? S авг31 0:00 \_ [scsi_eh_3]
root 106 0.0 0.0 0 0 ? I< авг31 0:00 \_ [scsi_tmf_3]
root 107 0.0 0.0 0 0 ? S авг31 0:00 \_ [scsi_eh_4]
root 108 0.0 0.0 0 0 ? I< авг31 0:00 \_ [scsi_tmf_4]
root 109 0.0 0.0 0 0 ? S авг31 0:00 \_ [scsi_eh_5]
root 110 0.0 0.0 0 0 ? I< авг31 0:00 \_ [scsi_tmf_5]
root 116 0.0 0.0 0 0 ? I< авг31 0:00 \_ [mld]
root 117 0.0 0.0 0 0 ? I< авг31 0:00 \_ [kworker/3:1H-kblockd]
root 118 0.0 0.0 0 0 ? I< авг31 0:00 \_ [ipv6_addrconf]
root 123 0.0 0.0 0 0 ? I< авг31 0:00 \_ [kstrp]
root 129 0.0 0.0 0 0 ? I< авг31 0:00 \_ [zswap1]
root 130 0.0 0.0 0 0 ? I< авг31 0:00 \_ [zswap1]
root 131 0.0 0.0 0 0 ? I< авг31 0:00 \_ [zswap-shrink]
root 132 0.0 0.0 0 0 ? I< авг31 0:00 \_ [kworker/u17:0]
root 171 0.0 0.0 0 0 ? I< авг31 0:00 \_ [charger_manager]
root 174 0.0 0.0 0 0 ? I< авг31 0:00 \_ [kworker/4:1H-kblockd]
root 176 0.0 0.0 0 0 ? I< авг31 0:00 \_ [kworker/7:1H-kblockd]
root 193 0.0 0.0 0 0 ? I< авг31 0:00 \_ [kworker/1:1H-kblockd]
root 206 0.0 0.0 0 0 ? I< авг31 0:00 \_ [kworker/0:1H-kblockd]
root 210 0.0 0.0 0 0 ? I< авг31 0:00 \_ [kworker/6:1H-kblockd]
root 241 0.0 0.0 0 0 ? S авг31 0:00 \_ [scsi_eh_6]
root 242 0.0 0.0 0 0 ? I< авг31 0:00 \_ [scsi_tmf_6]
root 243 0.0 0.0 0 0 ? S авг31 0:01 \_ [usb-storage]
root 244 0.0 0.0 0 0 ? I< авг31 0:00 \_ [uas]
root 258 0.0 0.0 0 0 ? I< авг31 0:00 \_ [xfsalloc]
root 259 0.0 0.0 0 0 ? I< авг31 0:00 \_ [xfs_mru_cache]
root 260 0.0 0.0 0 0 ? I< авг31 0:00 \_ [xfs-buf/sdc1]
root 261 0.0 0.0 0 0 ? I< авг31 0:00 \_ [xfs-conv/sdc1]
root 262 0.0 0.0 0 0 ? I< авг31 0:00 \_ [xfs-reclaim/sdc]
root 263 0.0 0.0 0 0 ? I< авг31 0:00 \_ [xfs-blockgc/sdc]
root 264 0.0 0.0 0 0 ? I< авг31 0:00 \_ [xfs-inodegc/sdc]
root 265 0.0 0.0 0 0 ? I< авг31 0:00 \_ [xfs-log/sdc1]
root 266 0.0 0.0 0 0 ? I< авг31 0:00 \_ [xfs-cil/sdc1]
root 267 0.0 0.0 0 0 ? S авг31 0:03 \_ [xfsaild/sdc1]
root 344 0.0 0.0 0 0 ? S авг31 0:00 \_ [psimon]
root 391 0.0 0.0 0 0 ? I< авг31 0:00 \_ [kworker/5:2H-kblockd]
root 393 0.0 0.0 0 0 ? S авг31 0:00 \_ [nv_queue]
root 394 0.0 0.0 0 0 ? S авг31 0:00 \_ [nv_queue]
root 396 0.0 0.0 0 0 ? I< авг31 0:00 \_ [xfs-buf/sda1]
root 397 0.0 0.0 0 0 ? I< авг31 0:00 \_ [xfs-conv/sda1]
root 398 0.0 0.0 0 0 ? I< авг31 0:00 \_ [xfs-reclaim/sda]
root 399 0.0 0.0 0 0 ? I< авг31 0:00 \_ [xfs-blockgc/sda]
root 400 0.0 0.0 0 0 ? I< авг31 0:00 \_ [xfs-inodegc/sda]
root 402 0.0 0.0 0 0 ? I< авг31 0:00 \_ [xfs-log/sda1]
root 403 0.0 0.0 0 0 ? I< авг31 0:00 \_ [xfs-cil/sda1]
root 404 0.0 0.0 0 0 ? S авг31 0:01 \_ [xfsaild/sda1]
root 406 0.0 0.0 0 0 ? I< авг31 0:00 \_ [xfs-buf/sdd1]
root 407 0.0 0.0 0 0 ? I< авг31 0:00 \_ [xfs-conv/sdd1]
root 408 0.0 0.0 0 0 ? I< авг31 0:00 \_ [xfs-reclaim/sdd]
root 409 0.0 0.0 0 0 ? I< авг31 0:00 \_ [xfs-blockgc/sdd]
root 410 0.0 0.0 0 0 ? I< авг31 0:00 \_ [xfs-inodegc/sdd]
root 411 0.0 0.0 0 0 ? I< авг31 0:00 \_ [xfs-log/sdd1]
root 413 0.0 0.0 0 0 ? I< авг31 0:00 \_ [xfs-cil/sdd1]
root 415 0.0 0.0 0 0 ? S авг31 0:00 \_ [xfsaild/sdd1]
root 416 0.0 0.0 0 0 ? I< авг31 0:00 \_ [xfs-buf/sde1]
root 417 0.0 0.0 0 0 ? I< авг31 0:00 \_ [xfs-conv/sde1]
root 418 0.0 0.0 0 0 ? I< авг31 0:00 \_ [xfs-reclaim/sde]
root 419 0.0 0.0 0 0 ? I< авг31 0:00 \_ [xfs-blockgc/sde]
root 420 0.0 0.0 0 0 ? I< авг31 0:00 \_ [xfs-inodegc/sde]
root 421 0.0 0.0 0 0 ? I< авг31 0:00 \_ [xfs-log/sde1]
root 422 0.0 0.0 0 0 ? I< авг31 0:00 \_ [xfs-cil/sde1]
root 423 0.0 0.0 0 0 ? S авг31 0:00 \_ [xfsaild/sde1]
root 425 0.0 0.0 0 0 ? I< авг31 0:00 \_ [xfs-buf/sdb1]
root 426 0.0 0.0 0 0 ? I< авг31 0:00 \_ [xfs-conv/sdb1]
root 427 0.0 0.0 0 0 ? I< авг31 0:00 \_ [xfs-reclaim/sdb]
root 428 0.0 0.0 0 0 ? I< авг31 0:00 \_ [xfs-blockgc/sdb]
root 429 0.0 0.0 0 0 ? I< авг31 0:00 \_ [xfs-inodegc/sdb]
root 435 0.0 0.0 0 0 ? I< авг31 0:00 \_ [xfs-log/sdb1]
root 436 0.0 0.0 0 0 ? I< авг31 0:00 \_ [xfs-cil/sdb1]
root 437 0.0 0.0 0 0 ? S авг31 0:00 \_ [xfsaild/sdb1]
root 481 0.0 0.0 0 0 ? S авг31 0:00 \_ [UVM global queue]
root 482 0.0 0.0 0 0 ? S авг31 0:00 \_ [UVM deferred release queue]
root 483 0.0 0.0 0 0 ? S авг31 0:00 \_ [UVM Tools Event Queue]
root 502 0.0 0.0 0 0 ? I< авг31 0:00 \_ [cryptd]
root 535 0.0 0.0 0 0 ? S авг31 1:04 \_ [nvidia-modeset/kthread_q]
root 536 0.0 0.0 0 0 ? S авг31 0:00 \_ [nvidia-modeset/deferred_close_kthread_q]
root 544 0.4 0.0 0 0 ? S авг31 11:14 \_ [irq/35-nvidia]
root 547 0.0 0.0 0 0 ? S авг31 0:08 \_ [nv_queue]
root 662 0.0 0.0 0 0 ? S авг31 0:00 \_ [psimon]
root 17196 0.0 0.0 0 0 ? I< авг31 0:00 \_ [kworker/5:1H-kblockd]
root 206679 0.0 0.0 0 0 ? S сеп01 0:00 \_ [irq/33-mei_me]
root 206680 0.0 0.0 0 0 ? S сеп01 0:00 \_ [nvidia]
root 245029 0.0 0.0 0 0 ? I сеп01 0:00 \_ [kworker/6:1-mm_percpu_wq]
root 245307 0.0 0.0 0 0 ? I сеп01 0:00 \_ [kworker/3:0-mm_percpu_wq]
root 259683 0.0 0.0 0 0 ? I сеп01 0:00 \_ [kworker/5:2-mm_percpu_wq]
root 263901 0.0 0.0 0 0 ? I< сеп01 0:00 \_ [kworker/0:2H-kblockd]
root 265569 0.0 0.0 0 0 ? I сеп01 0:00 \_ [kworker/4:1-mm_percpu_wq]
root 269152 0.0 0.0 0 0 ? I 00:02 0:00 \_ [kworker/u16:3-events_power_efficient]
root 270699 0.0 0.0 0 0 ? I 00:11 0:00 \_ [kworker/2:2-mm_percpu_wq]
root 270700 0.0 0.0 0 0 ? I 00:11 0:00 \_ [kworker/7:2-events]
root 278637 0.0 0.0 0 0 ? I 00:59 0:00 \_ [kworker/u16:1-events_power_efficient]
root 282352 0.0 0.0 0 0 ? I 01:22 0:00 \_ [kworker/u16:0-events_unbound]
root 282811 0.0 0.0 0 0 ? I 01:24 0:00 \_ [kworker/0:2-events]
root 283240 0.0 0.0 0 0 ? I 01:25 0:00 \_ [kworker/5:1]
root 283427 0.0 0.0 0 0 ? I 01:26 0:00 \_ [kworker/3:1-mm_percpu_wq]
root 283428 0.0 0.0 0 0 ? I 01:26 0:00 \_ [kworker/6:2-events]
root 283790 0.0 0.0 0 0 ? I 01:27 0:00 \_ [kworker/1:1-mm_percpu_wq]
root 283848 0.0 0.0 0 0 ? I 01:27 0:00 \_ [kworker/u16:2-events_freezable_power_]
root 286052 0.0 0.0 0 0 ? I 01:37 0:00 \_ [kworker/0:1-events]
root 286212 0.0 0.0 0 0 ? I 01:37 0:00 \_ [kworker/1:2]
root 286213 0.0 0.0 0 0 ? I 01:37 0:00 \_ [kworker/2:0-events]
root 286508 0.0 0.0 0 0 ? I 01:39 0:00 \_ [kworker/4:2]
root 286509 0.0 0.0 0 0 ? I 01:39 0:00 \_ [kworker/7:1-events]
root 287258 0.0 0.0 0 0 ? I 01:42 0:00 \_ [kworker/0:0-mm_percpu_wq]
root 1 0.0 0.0 22192 12912 ? Ss авг31 0:02 /sbin/init
root 308 0.0 0.1 71284 42792 ? Ss авг31 0:16 /usr/lib/systemd/systemd-journald
root 342 0.0 0.0 36192 10348 ? Ss авг31 0:00 /usr/lib/systemd/systemd-udevd
dbus 601 0.0 0.0 11676 6664 ? Ss авг31 0:14 /usr/bin/dbus-daemon --system --address=systemd: -
root 602 0.0 0.0 18056 8016 ? Ss авг31 0:00 /usr/lib/systemd/systemd-logind
root 622 0.0 0.0 418064 23736 ? Ssl авг31 0:02 /usr/bin/NetworkManager --no-daemon
root 631 0.0 0.0 315640 13056 ? Ssl авг31 0:00 /usr/bin/gdm
root 656 0.0 0.0 244764 12168 ? Sl авг31 0:00 \_ gdm-session-worker [pam/gdm-autologin]
rado 675 0.0 0.0 235236 8160 tty2 Ssl+ авг31 0:00 \_ /usr/lib/gdm-x-session --register-session
rado 677 1.1 1.4 25859228 487148 tty2 Sl+ авг31 28:10 \_ /usr/lib/Xorg vt2 -displayfd 3 -auth /
rado 684 0.0 0.1 508212 48432 tty2 Sl+ авг31 0:10 \_ cinnamon-session --session cinnamon
rado 729 0.0 0.1 524568 42376 tty2 Sl+ авг31 0:03 \_ csd-background
rado 730 0.0 0.0 383824 28272 tty2 Sl+ авг31 0:09 \_ csd-clipboard
rado 732 0.0 0.0 383532 30716 tty2 Sl+ авг31 0:04 \_ csd-screensaver-proxy
rado 733 0.0 0.0 461280 32372 tty2 Sl+ авг31 0:03 \_ csd-sound
rado 735 0.0 0.1 532896 36316 tty2 Sl+ авг31 0:02 \_ csd-color
rado 737 0.0 0.0 383820 31376 tty2 Sl+ авг31 0:02 \_ csd-cursor
rado 738 0.0 0.0 463016 30800 tty2 Sl+ авг31 0:02 \_ csd-wacom
rado 739 0.0 0.1 457780 34836 tty2 Sl+ авг31 0:02 \_ csd-xsettings
rado 740 0.0 0.1 458604 34224 tty2 Sl+ авг31 0:02 \_ csd-xrandr
rado 741 0.0 0.0 457904 31136 tty2 Sl+ авг31 0:04 \_ csd-housekeeping
rado 748 0.0 0.1 457900 33976 tty2 Sl+ авг31 0:14 \_ csd-keyboard
rado 752 0.0 0.0 797908 31332 tty2 Sl+ авг31 0:02 \_ csd-media-keys
rado 756 0.0 0.1 457904 32856 tty2 Sl+ авг31 0:02 \_ csd-mouse
rado 757 0.0 0.1 457904 33724 tty2 Sl+ авг31 0:02 \_ csd-a11y-keyboard
rado 759 0.0 0.1 606412 38780 tty2 Sl+ авг31 0:05 \_ csd-power
rado 771 0.0 0.0 392064 31784 tty2 Sl+ авг31 0:02 \_ csd-print-notifications
rado 783 0.0 0.0 457880 31268 tty2 Sl+ авг31 0:02 \_ csd-a11y-settings
rado 789 0.0 0.0 458024 31484 tty2 Sl+ авг31 0:02 \_ csd-automount
rado 797 0.0 0.0 457884 28572 tty2 Sl+ авг31 0:02 \_ csd-orientation
rado 1069 0.0 0.1 532160 40920 tty2 Sl+ авг31 0:04 \_ /usr/lib/xapps/xapp-sn-watcher
rado 1078 0.0 0.0 312352 7572 tty2 Sl+ авг31 0:00 \_ /usr/lib/geoclue-2.0/demos/agent
rado 1083 0.0 0.1 1095880 64560 tty2 Sl+ авг31 0:09 \_ nemo-desktop
rado 2921 0.0 0.0 11108 4568 tty2 S+ авг31 0:00 | \_ bash /home/rado/.local/share/S
rado 3057 0.8 0.8 1126376 287236 tty2 Sl+ авг31 20:01 | \_ /home/rado/.local/share/St
rado 3063 0.3 1.4 894272 489344 ? Ssl авг31 9:20 | \_ /home/rado/.local/shar
rado 3120 0.0 0.1 228592 54204 ? S авг31 0:00 | | \_ /home/rado/.local/
rado 3151 0.0 0.3 366448 106584 ? Sl авг31 0:11 | | | \_ /home/rado/.lo
rado 3124 0.0 0.1 228592 54596 ? S авг31 0:00 | | \_ /home/rado/.local/
rado 3129 0.0 0.0 228592 14524 ? S авг31 0:00 | | | \_ /home/rado/.lo
rado 3188 0.0 1.6 5059040 540428 ? Sl авг31 1:04 | | | \_ /home/rado
rado 3259 0.0 0.2 4565676 75368 ? Sl авг31 0:00 | | | \_ /home/rado
rado 3170 0.0 0.2 308512 83016 ? Sl авг31 0:00 | | \_ /home/rado/.local/
rado 3196 0.0 0.0 255676 8388 tty2 Sl+ авг31 0:05 | \_ steam-runtime-launcher
rado 1086 0.0 0.1 450376 34804 tty2 Sl+ авг31 1:14 \_ parcellite
rado 1088 0.0 0.1 551260 45216 tty2 Sl+ авг31 2:09 \_ pamac-tray
rado 1089 0.0 0.2 1594224 85528 tty2 Sl+ авг31 0:40 \_ audacious
rado 1090 0.1 0.5 1248052 175252 tty2 Sl+ авг31 3:14 \_ pcmanfm
rado 1092 0.0 0.1 474272 47320 tty2 Sl+ авг31 0:01 \_ cinnamon-killer-daemon
rado 1093 0.0 0.0 381864 30052 tty2 Sl+ авг31 0:01 \_ /usr/lib/polkit-gnome/polkit-gnome
root 641 0.0 0.0 314648 10024 ? Ssl авг31 0:00 /usr/lib/accounts-daemon
polkitd 646 0.0 0.0 384608 9368 ? Ssl авг31 0:01 /usr/lib/polkit-1/polkitd --no-debug
rado 664 0.0 0.0 21084 11852 ? Ss авг31 0:00 /usr/lib/systemd/systemd --user
rado 665 0.0 0.0 25572 3444 ? S авг31 0:00 \_ (sd-pam)
rado 682 0.0 0.0 10176 5728 ? Ss авг31 0:40 \_ /usr/bin/dbus-daemon --session --address=syste
rado 700 0.0 0.0 320260 11560 ? Ssl авг31 0:02 \_ /usr/lib/gvfsd
rado 1217 0.0 0.0 615936 18720 ? Sl авг31 0:01 | \_ /usr/lib/gvfsd-trash --spawner :1.4 /org/g
rado 10781 0.0 0.0 615892 14676 ? Sl авг31 0:00 | \_ /usr/lib/gvfsd-network --spawner :1.4 /org
rado 10801 0.0 0.0 396536 12108 ? Sl авг31 0:00 | \_ /usr/lib/gvfsd-dnssd --spawner :1.4 /org/g
rado 133658 0.0 0.0 326836 14588 ? Sl авг31 0:00 | \_ /usr/lib/gvfsd-http --spawner :1.4 /org/gt
rado 706 0.0 0.0 459264 8528 ? Sl авг31 0:00 \_ /usr/lib/gvfsd-fuse /run/user/1000/gvfs -f
rado 715 0.0 0.0 382480 7456 ? Ssl авг31 0:00 \_ /usr/lib/at-spi-bus-launcher
rado 722 0.0 0.0 9468 4812 ? S авг31 0:10 | \_ /usr/bin/dbus-daemon --config-file=/usr/sh
rado 725 0.0 0.0 235496 8048 ? Sl авг31 0:11 \_ /usr/lib/at-spi2-registryd --use-gnome-session
rado 755 0.7 0.0 1892996 31912 ? Ssl авг31 19:17 \_ /usr/bin/pulseaudio --daemonize=no --log-targe
rado 1040 0.0 0.0 312276 7804 ? Sl авг31 0:00 | \_ /usr/lib/pulse/gsettings-helper
rado 828 0.0 0.0 1051768 17412 ? Ssl авг31 0:00 \_ /usr/lib/gvfs-udisks2-volume-monitor
rado 872 0.0 0.0 230252 6136 ? Ssl авг31 0:00 \_ /usr/lib/dconf-service
rado 1033 0.0 0.0 309484 8168 ? Ssl авг31 0:00 \_ /usr/lib/gvfs-mtp-volume-monitor
rado 1156 0.0 0.0 623140 15504 ? Ssl авг31 0:04 \_ /usr/lib/xdg-desktop-portal
rado 1182 0.0 0.0 610208 10548 ? Ssl авг31 0:03 \_ /usr/lib/xdg-document-portal
root 1195 0.0 0.0 2916 1004 ? Ss авг31 0:00 | \_ fusermount3 -o rw,nosuid,nodev,fsname=port
rado 1187 0.0 0.0 309148 8108 ? Ssl авг31 0:00 \_ /usr/lib/xdg-permission-store
rado 1202 0.0 0.0 383240 10724 ? Ssl авг31 0:01 \_ /usr/lib/xdg-desktop-portal-xapp
rado 1250 0.0 0.0 236624 9280 ? Ssl авг31 0:03 \_ /usr/lib/gvfsd-metadata
rado 3381 0.1 1.7 1494976 584512 ? Sl авг31 3:06 \_ /usr/bin/telegram-desktop
rado 3400 0.0 0.0 108768 7092 ? Ssl авг31 0:01 \_ /usr/bin/pipewire
rado 160720 0.0 0.0 18564 6648 ? S сеп01 0:00 \_ /usr/lib/gconfd-2
rado 287801 2.8 0.1 622360 48476 ? Ssl 01:46 0:00 \_ /usr/lib/gnome-terminal-server
rado 287835 0.0 0.0 11632 5580 pts/0 Ss 01:46 0:00 \_ bash
rado 287877 0.0 0.0 14692 5216 pts/0 R+ 01:46 0:00 \_ ps auxf fax
rtkit 794 0.0 0.0 89024 1548 ? SNsl авг31 0:00 /usr/lib/rtkit-daemon
root 832 0.0 0.0 469236 17740 ? Ssl авг31 0:25 /usr/lib/udisks2/udisksd
root 847 0.0 0.0 317660 11532 ? Ssl авг31 0:16 /usr/lib/upowerd
rado 860 0.0 0.0 456836 18816 tty2 Sl+ авг31 0:00 /usr/lib/cinnamon-settings-daemon/csd-printer
colord 861 0.0 0.0 321200 16560 ? Ssl авг31 0:00 /usr/lib/colord
rado 1619 0.8 0.0 741532 15300 tty2 Sl+ авг31 20:35 conky --daemonize --pause=5 --config=/home/rado/.c
rado 158043 0.0 0.1 623964 47600 tty2 Sl+ сеп01 0:01 cinnamon-launcher
rado 158053 2.3 0.6 4720688 220044 tty2 Sl+ сеп01 15:44 \_ cinnamon --replace
rado 255627 4.7 31.7 18128596 10394280 tty2 Sl+ сеп01 8:01 \_ /usr/lib/firefox/firefox
rado 255698 0.0 0.1 237612 42800 tty2 Sl+ сеп01 0:00 | \_ /usr/lib/firefox/firefox -contentproc
rado 255718 0.0 0.2 2441672 83604 tty2 Sl+ сеп01 0:00 | \_ /usr/lib/firefox/firefox -contentproc
rado 255764 1.1 0.8 19881360 280380 tty2 Sl+ сеп01 1:57 | \_ /usr/lib/firefox/firefox -contentproc
rado 257107 0.4 0.1 584028 64556 tty2 Sl+ сеп01 0:43 | \_ /usr/lib/firefox/firefox -contentproc
rado 257118 0.0 0.1 461376 50692 tty2 Sl+ сеп01 0:00 | \_ /usr/lib/firefox/firefox -contentproc
rado 283707 0.1 0.5 2585708 172504 tty2 Sl+ 01:27 0:01 | \_ /usr/lib/firefox/firefox -contentproc -ch
rado 284134 0.9 1.0 2873572 328372 tty2 Sl+ 01:28 0:10 | \_ /usr/lib/firefox/firefox -contentproc -ch
rado 284195 5.2 1.2 3292460 421064 tty2 Sl+ 01:28 0:54 | \_ /usr/lib/firefox/firefox -contentproc -ch
rado 284664 0.2 0.4 2542844 138820 tty2 Sl+ 01:30 0:02 | \_ /usr/lib/firefox/firefox -contentproc -ch
rado 284720 0.0 0.2 2441452 78176 tty2 Sl+ 01:30 0:00 | \_ /usr/lib/firefox/firefox -contentproc -ch
rado 284966 0.0 0.2 2441452 77696 tty2 Sl+ 01:31 0:00 | \_ /usr/lib/firefox/firefox -contentproc -ch
rado 286607 0.0 0.2 2442508 77600 tty2 Sl+ 01:39 0:00 | \_ /usr/lib/firefox/firefox -contentproc -ch
rado 284270 2.0 1.2 11639964 415396 tty2 SLl+ 01:29 0:20 \_ /usr/lib/thunderbird/thunderbirdCore i7-4770, GTX 1660 Ti, 32 GB RAM, Arch 6.x LTS, Cinnamon 5.2.7, GDM
Offline
The output makes it look like you ran the "scania" script in an interactive shell and then the "ps fax" in that same interactive shell?
Do you expect the script tobe started from an interactive shell inside a gnome-terminal and then close that terminal or do you want to popup a new terminal with it where exclusively that script runs and then the new terminal closes when the script is done?
How do you usually invoke the script?
Offline
Like any other script - as an alias.
alias scania="/media/1000GB/PROGRAMS/CLI-SCRIPTS/scs-games/scania.sh"I really don't care WHERE the script is started, for as long as the terminal closes after that.
Edit: I just read what "interactive shell" meant and apparently the most of my scripts are interactive, except for these two scripts where everything is predetermined. Other scripts require some user input. But these two don't need user input, which means they're NOT interactive, so I don't see a reason for the terminal not to close after executing one of them.
Last edited by rado84 (2023-09-02 15:25:38)
Core i7-4770, GTX 1660 Ti, 32 GB RAM, Arch 6.x LTS, Cinnamon 5.2.7, GDM
Offline
No, an interactive shell is the black box where you type commands.
alias scania="exec /media/1000GB/PROGRAMS/CLI-SCRIPTS/scs-games/scania.sh"Running that alias will replace the interactive shell where you entered it and when the script (now the child process of the VTE) is done, the gnome-terminal will exit.
Is that what you're trying to achieve?
Offline
Yes, that's what I'm trying to achieve. But gnome-terminal DOESN'T exit, for some reason.
Core i7-4770, GTX 1660 Ti, 32 GB RAM, Arch 6.x LTS, Cinnamon 5.2.7, GDM
Offline
exec /media/1000GB/PROGRAMS/CLI-SCRIPTS/scs-games/scania.shnb. the "exec"
There's no way that script exists and gnome-terminal returns to an interactive shell unless you've been nested one before (ie. "exec ls" will quit gome-terminal, but a preceeding "bash" will open a subshell and "exec ls" will only replace that subshell and return to the parenting shell)
Offline
IDK what "nb" is but adding "exec" in front of the script path now causes GT to close after the task has been completed, which is what I wanted in the first place, so thank you!
I didn't know "exec" could be added to aliases, I thought it was just a '.desktop' thing.
Core i7-4770, GTX 1660 Ti, 32 GB RAM, Arch 6.x LTS, Cinnamon 5.2.7, GDM
Offline
"nota bene" - it's latin.
That's (probably) not the kind of "exec" you're thinking about, https://man.archlinux.org/man/core/man-pages/exec.1p.en
Offline