Where does Dolphin execute scripts?

I want to execute a python script directly by clicking on it in Dolphin.

I've made it executable and added #!/usr/bin/python3 in the file, so now I'm able to execute it simply via ./script.py, but when I open it via Dolphin and choose to execute it, I don't see a terminal window, nor does the built-in terminal show anything, so i wanted to know where (if it is being executed at all) the script is being run.

Any way to make Dolphin execute scripts on konsole/fish would be nice too.

Thanks in advance

System:
Kernel: 5.17.1-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 11.2.0
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
root=UUID=d4f71312-d373-4bbb-8f13-b65701e08cf0 rw [email protected]
quiet quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0
loglevel=3
Desktop: KDE Plasma v: 5.24.4 tk: Qt v: 5.15.3 info: latte-dock
wm: kwin_x11 vt: 1 dm: SDDM Distro: Garuda Linux base: Arch Linux
Machine:
Type: Desktop System: HP product: HP EliteDesk 800 G4 DM 35W v: N/A
serial: <superuser required> Chassis: type: 6 serial: <superuser required>
Mobo: HP model: 83E2 v: KBC Version 07.D1.00 serial: <superuser required>
UEFI: HP v: Q21 Ver. 02.15.00 date: 12/28/2020
CPU:
Info: model: Intel Core i5-8500 bits: 64 type: MCP arch: Coffee Lake
family: 6 model-id: 0x9E (158) stepping: 0xA (10) microcode: 0xEC
Topology: cpus: 1x cores: 6 smt: <unsupported> cache: L1: 384 KiB
desc: d-6x32 KiB; i-6x32 KiB L2: 1.5 MiB desc: 6x256 KiB L3: 9 MiB
desc: 1x9 MiB
Speed (MHz): avg: 4000 high: 4001 min/max: 800/4100 scaling:
driver: intel_pstate governor: performance cores: 1: 4001 2: 4001 3: 4001
4: 4001 5: 4001 6: 4000 bogomips: 36000
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Vulnerabilities:
Type: itlb_multihit status: KVM: VMX disabled
Type: l1tf
mitigation: PTE Inversion; VMX: conditional cache flushes, SMT disabled
Type: mds mitigation: Clear CPU buffers; SMT disabled
Type: meltdown mitigation: PTI
Type: spec_store_bypass
mitigation: Speculative Store Bypass disabled via prctl
Type: spectre_v1
mitigation: usercopy/swapgs barriers and __user pointer sanitization
Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, IBRS_FW,
STIBP: disabled, RSB filling
Type: srbds mitigation: Microcode
Type: tsx_async_abort mitigation: TSX disabled
Graphics:
Device-1: Intel CoffeeLake-S GT2 [UHD Graphics 630] vendor: Hewlett-Packard
driver: i915 v: kernel ports: active: HDMI-A-2
empty: DP-1, DP-2, DP-3, HDMI-A-1, HDMI-A-3 bus-ID: 00:02.0
chip-ID: 8086:3e92 class-ID: 0300
Display: x11 server: X.Org v: 1.21.1.3 compositor: kwin_x11 driver: X:
loaded: intel unloaded: modesetting alternate: fbdev,vesa gpu: i915
display-ID: :0 screens: 1
Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.00x11.22")
s-diag: 582mm (22.93")
Monitor-1: HDMI-A-2 mapped: HDMI2 model: Dell S2421HN serial: <filter>
built: 2021 res: 1920x1080 dpi: 92 gamma: 1.2
size: 530x300mm (20.87x11.81") diag: 604mm (23.8") ratio: 16:9 modes:
max: 1920x1080 min: 720x400
OpenGL: renderer: Mesa Intel UHD Graphics 630 (CFL GT2)
v: 4.6 Mesa 22.0.1 direct render: Yes
Audio:
Device-1: Intel Cannon Lake PCH cAVS vendor: Hewlett-Packard
driver: snd_hda_intel v: kernel
alternate: snd_soc_skl,snd_sof_pci_intel_cnl bus-ID: 00:1f.3
chip-ID: 8086:a348 class-ID: 0403
Sound Server-1: ALSA v: k5.17.1-zen1-1-zen running: yes
Sound Server-2: sndio v: N/A running: no
Sound Server-3: PulseAudio v: 15.0 running: no
Sound Server-4: PipeWire v: 0.3.49 running: yes
Network:
Device-1: Intel Ethernet I219-LM vendor: Hewlett-Packard driver: e1000e
v: kernel port: N/A bus-ID: 00:1f.6 chip-ID: 8086:15bb class-ID: 0200
IF: eno1 state: up speed: 100 Mbps duplex: full mac: <filter>
Bluetooth:
Device-1: Cambridge Silicon Radio Bluetooth Dongle (HCI mode) type: USB
driver: btusb v: 0.8 bus-ID: 1-8:4 chip-ID: 0a12:0001 class-ID: e001
Report: bt-adapter ID: hci0 rfk-id: 0 state: up address: <filter>
Drives:
Local Storage: total: 238.47 GiB used: 122.37 GiB (51.3%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung
model: MZVLB256HAHQ-000H1 size: 238.47 GiB block-size: physical: 512 B
logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
rev: EXD70H1Q temp: 53.9 C scheme: GPT
Partition:
ID-1: / raw-size: 238.17 GiB size: 238.17 GiB (100.00%)
used: 122.37 GiB (51.4%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
used: 576 KiB (0.2%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
ID-3: /home raw-size: 238.17 GiB size: 238.17 GiB (100.00%)
used: 122.37 GiB (51.4%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
ID-4: /var/log raw-size: 238.17 GiB size: 238.17 GiB (100.00%)
used: 122.37 GiB (51.4%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
ID-5: /var/tmp raw-size: 238.17 GiB size: 238.17 GiB (100.00%)
used: 122.37 GiB (51.4%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
Swap:
Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
ID-1: swap-1 type: zram size: 15.41 GiB used: 2.5 MiB (0.0%)
priority: 100 dev: /dev/zram0
Sensors:
System Temperatures: cpu: 30.0 C pch: 61.0 C mobo: N/A
Fan Speeds (RPM): N/A
Info:
Processes: 279 Uptime: 3h 45m wakeups: 1 Memory: 15.41 GiB
used: 3.56 GiB (23.1%) Init: systemd v: 250 tool: systemctl Compilers:
gcc: 11.2.0 Packages: pacman: 1511 lib: 348 Shell: fish v: 3.4.1
default: Bash v: 5.1.16 running-in: konsole inxi: 3.3.14
Garuda (2.5.8-1):
System install date:     2022-04-03
Last full system update: 2022-04-06 ↻
Is partially upgraded:   No
Relevant software:       NetworkManager
Windows dual boot:       No/Undetected
Snapshots:               Snapper
Failed units:

The terminal is more accurately referred to as a terminal emulator, and it typically only displays output for a process if you launch it from the terminal.

Why don't you launch the script from the terminal, so you can keep an eye on it and see what it is doing? You can always toss it into a different workstation if it is in the way.

Edit: another option would be to run ps and just watch while execute the script.

Why don't you try creating a desktop file for it?

1 Like

Will a desktop file launch the script on a terminal emulator?

It was just an idea.
You have to try...
https://wiki.archlinux.org/title/Desktop_entries#File_example
You could try with
Terminal=true

1 Like

yes just successfully ran it before your edit lol
Thanks a lot

1 Like

can you please elaborate a bit on your edit, I'm a newbie to most commands for now
(I successfully did what I wanted to do and am just trying to understand that path so is low priority)

You should be able to right-click on it and select "run in konsole" as opposed to having to create a desktop file for each script.

4 Likes

Exactly , could be a cool feature...

If you run the command ps, it shows in real time the processes running on your machine--whether they were launched from the terminal or not. So you could run ps, then launch your script however you like and see what happens.

It is a feature already.....

3 Likes

oh wait how did my stupid ass not find it before

1 Like

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