Clicking on bash script doesn't run it after system update

I have very small bash script, that prior latest stable system update I double clicking on it, it worked, but now it does not any more. If I enter these 4 lines into the terminal one at a time, I get script to work. Since I need to run several of this, I would really like to be able to start them with mouse double-click. Can anyone help please?

#! /bin/bash
cd /home/mx/Desktop/script01/
conda activate myenv
python nparse.py

I know Pyton was upgradd to 10, but this is Conda’s virtual environment with Python 8, so it shouldn’t matter?

Don’t know if related/important but when I manually run script in the terminal, and script runs as before, I get this msg output:

QFileSystemWatcher::addPaths: list is empty
Attribute Qt::AA_EnableHighDpiScaling must be set before QCoreApplication is created.

This output may of been there before, I don’t know, since I wasn’t running script in the terminal before now

That would concern the file manager then.

1 Like

Hi @veleje,

It sounds like a permissions problem.

Nope, not any longer!

Please provide the output for:

stat <full/script/path.sh>

Where <full/script/path.sh> is the path, be it relative or absolute, to the script.

Tip:

When providing terminal output, paste the text and wrap it in three backticks (```) both before as well as after the pasted text. Like this:

```
pasted text
```

This will just cause it to be rendered like this:

Congue ex mi
scelerisque
eros sollicitudin
ac eget vivamus sem
bibendum
condimentum phasellus fusce nunc.

Instead of like this:

Congue ex mi scelerisque eros sollicitudin ac eget vivamus sem bibendum condimentum phasellus fusce nunc.

Thereby improving legibility and making it easier for those trying to be of assistance.

1 Like

My bad, I forgot to mention, that I have proper permission, it is set to be allowed to run as execute, that’s why I could run it beofre system update

Sorry I was so focusing on script running I forgot to provide system info
I also forgot to mention, this is pretty much vanilla install, I only added wine and one old program that uses wine

System:
  Kernel: 5.10.89-1-MANJARO x86_64 bits: 64 compiler: gcc v: 11.1.0
    Desktop: Xfce 4.16.0 tk: Gtk 3.24.29 info: xfce4-panel wm: xfwm 4.16.1 vt: 7
    dm: LightDM 1.30.0 Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Desktop System: Hewlett-Packard product: HP Compaq 6200 Pro MT PC
    v: N/A serial: <superuser required> Chassis: type: 6
    serial: <superuser required>
  Mobo: Hewlett-Packard model: 1497 serial: <superuser required>
    UEFI: Hewlett-Packard v: J01 v02.15 date: 11/10/2011
Battery:
  Device-1: hidpp_battery_0 model: Logitech Wireless Mouse B330/M330/M331
    serial: <filter> charge: 55% (should be ignored) rechargeable: yes
    status: Discharging
Memory:
  RAM: total: 7.73 GiB used: 2.39 GiB (30.9%)
  RAM Report:
    permissions: Unable to run dmidecode. Root privileges required.
CPU:
  Info: quad core model: Intel Core i7-2600 bits: 64 type: MT MCP smt: enabled
    arch: Sandy Bridge rev: 7 cache: L1: 256 KiB L2: 1024 KiB L3: 8 MiB
  Speed (MHz): avg: 1657 high: 1849 min/max: 1600/3800 cores: 1: 1597
    2: 1596 3: 1612 4: 1611 5: 1785 6: 1597 7: 1849 8: 1611 bogomips: 54310
  Flags: acpi aes aperfmperf apic arat arch_perfmon avx bts clflush cmov
    constant_tsc cpuid cx16 cx8 de ds_cpl dtes64 dtherm dts epb ept est
    flexpriority flush_l1d fpu fxsr ht ibpb ibrs ida lahf_lm lm mca mce
    md_clear mmx monitor msr mtrr nonstop_tsc nopl nx pae pat pbe pcid
    pclmulqdq pdcm pebs pge pln pni popcnt pse pse36 pti pts rdtscp rep_good
    sep smx ssbd sse sse2 sse4_1 sse4_2 ssse3 stibp syscall tm tm2 tpr_shadow
    tsc tsc_deadline_timer vme vmx vnmi vpid x2apic xsave xsaveopt xtopology
    xtpr
Graphics:
  Device-1: AMD Lexa PRO [Radeon 540/540X/550/550X / RX 540X/550/550X]
    vendor: Sapphire Limited driver: amdgpu v: kernel bus-ID: 01:00.0
    chip-ID: 1002:699f class-ID: 0300
  Display: x11 server: X.Org 1.21.1.2 compositor: xfwm4 v: 4.16.1 driver:
    loaded: amdgpu,ati unloaded: modesetting alternate: fbdev,vesa
    resolution: 1680x1050~60Hz s-dpi: 96
  Message: Unable to show advanced data. Required tool glxinfo missing.
Audio:
  Device-1: Intel 6 Series/C200 Series Family High Definition Audio
    vendor: Hewlett-Packard driver: snd_hda_intel v: kernel bus-ID: 00:1b.0
    chip-ID: 8086:1c20 class-ID: 0403
  Device-2: AMD Baffin HDMI/DP Audio [Radeon RX 550 640SP / RX 560/560X]
    vendor: Sapphire Limited driver: snd_hda_intel v: kernel bus-ID: 01:00.1
    chip-ID: 1002:aae0 class-ID: 0403
  Sound Server-1: ALSA v: k5.10.89-1-MANJARO running: yes
  Sound Server-2: JACK v: 1.9.19 running: no
  Sound Server-3: PulseAudio v: 15.0 running: yes
  Sound Server-4: PipeWire v: 0.3.42 running: no
Network:
  Device-1: Intel 82579LM Gigabit Network vendor: Hewlett-Packard
    driver: e1000e v: kernel port: f040 bus-ID: 00:19.0 chip-ID: 8086:1502
    class-ID: 0200
  IF: eno1 state: down mac: <filter>
  Device-2: Intel 82540EM Gigabit Ethernet driver: e1000 v: kernel
    port: d000 bus-ID: 06:00.0 chip-ID: 8086:100e class-ID: 0200
  IF: enp6s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
  IP v4: <filter> type: dynamic noprefixroute scope: global
    broadcast: <filter>
  IP v6: <filter> type: noprefixroute scope: link
  WAN IP: <filter>
Bluetooth:
  Message: No bluetooth data found.
Logical:
  Message: No logical block device data found.
RAID:
  Message: No RAID data found.
Drives:
  Local Storage: total: 960.17 GiB used: 37.9 GiB (3.9%)
  ID-1: /dev/sda vendor: Crucial model: CT1000MX500SSD1 size: 931.51 GiB
    speed: 6.0 Gb/s type: SSD serial: <filter> rev: 043 scheme: GPT
  ID-2: /dev/sdb type: USB vendor: SanDisk model: Cruzer Snap
    size: 28.65 GiB type: N/A serial: <filter> rev: 1.00 scheme: MBR
  Optical-1: /dev/sr0 vendor: hp model: DVD-RAM GH80N rev: RF03
    dev-links: cdrom
  Features: speed: 40 multisession: yes audio: yes dvd: yes
    rw: cd-r,cd-rw,dvd-r,dvd-ram state: running
Partition:
  ID-1: / size: 47.76 GiB used: 17.63 GiB (36.9%) fs: ext4 dev: /dev/sda6
    label: MO.takp uuid: 85b4c0cb-29cb-41e7-bd2e-b6b4e094efdc
  ID-2: /boot/efi size: 948.1 MiB used: 428 KiB (0.0%) fs: vfat
    dev: /dev/sda1 label: N/A uuid: 6DA1-7470
  ID-3: /run/media/mx/1DAB-83AC size: 28.64 GiB used: 461.9 MiB (1.6%)
    fs: vfat dev: /dev/sdb1 label: N/A uuid: 1DAB-83AC
  ID-4: /run/media/mx/DATA size: 575.68 GiB used: 19.81 GiB (3.4%) fs: ext4
    dev: /dev/sda3 label: DATA uuid: b5cb80f5-791e-40bb-a26d-63268006d8e0
Swap:
  Alert: No swap data was found.
Unmounted:
  ID-1: /dev/sda2 size: 58.59 GiB fs: ext4 label: MX21.Main
    uuid: 63cfca3b-a2ab-4ee1-96e4-620f01dc8172
  ID-2: /dev/sda4 size: 3.91 GiB fs: swap label: N/A
    uuid: cc1470d4-1c95-4099-a23e-f52f258418a9
  ID-3: /dev/sda5 size: 48.83 GiB fs: ext4 label: ENDV.takp
    uuid: c5d713cb-8a6b-4049-a144-c9ff9cbf6b99
  ID-4: /dev/sda7 size: 48.83 GiB fs: ext4 label: MX21.takp
    uuid: 24678105-3290-41dc-a0ca-a23d104d622f
  ID-5: /dev/sda8 size: 39.06 GiB fs: ext4 label: MX21.book
    uuid: 217ca6b1-bcf9-4849-b19c-843f1d0c0f75
  ID-6: /dev/sda9 size: 48.83 GiB fs: ext4 label: other
    uuid: bacb1f02-0625-4078-94cd-0d8e9918af91
USB:
  Hub-1: 1-0:1 info: Full speed or root hub ports: 3 rev: 2.0 speed: 480 Mb/s
    chip-ID: 1d6b:0002 class-ID: 0900
  Hub-2: 1-1:2 info: Intel Integrated Rate Matching Hub ports: 6 rev: 2.0
    speed: 480 Mb/s chip-ID: 8087:0024 class-ID: 0900
  Device-1: 1-1.3:3 info: Logitech Keyboard K120 type: Keyboard,HID
    driver: hid-generic,usbhid interfaces: 2 rev: 1.1 speed: 1.5 Mb/s
    power: 90mA chip-ID: 046d:c31c class-ID: 0300
  Hub-3: 2-0:1 info: Full speed or root hub ports: 3 rev: 2.0
    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Hub-4: 2-1:2 info: Intel Integrated Rate Matching Hub ports: 8 rev: 2.0
    speed: 480 Mb/s chip-ID: 8087:0024 class-ID: 0900
  Device-1: 2-1.5:3 info: Logitech Unifying Receiver type: Mouse,HID
    driver: logitech-djreceiver,usbhid interfaces: 2 rev: 2.0 speed: 12 Mb/s
    power: 98mA chip-ID: 046d:c52f class-ID: 0300
  Device-2: 2-1.8:4 info: SanDisk Cruzer Snap type: Mass Storage
    driver: usb-storage interfaces: 1 rev: 2.0 speed: 480 Mb/s power: 200mA
    chip-ID: 0781:55a5 class-ID: 0806 serial: <filter>
Sensors:
  System Temperatures: cpu: 43.0 C mobo: N/A gpu: amdgpu temp: 48.0 C
  Fan Speeds (RPM): N/A gpu: amdgpu fan: 1077
Info:
  Processes: 258 Uptime: 1h 5m wakeups: 6 Init: systemd v: 250 Compilers:
  gcc: N/A Packages: pacman: 1131 Shell: Bash v: 5.1.12
  running-in: xfce4-terminal inxi: 3.3.11

Does it work if you run it from the terminal?

Is this a correct shebang? #!/bin/bash might be better (no space).

1 Like

I considered this myself. But the error provided is not from bash, unfortunately. It seems to be from python, about Qt…

1 Like

Functions are not exported by default to be made available in subshells. I’d recommend you do:

source ~/anaconda3/etc/profile.d/conda.sh
conda activate my_env

replace ~/anaconda3/ with the path to your miniconda / anaconda installation. You can find that out by running: conda info | grep -i 'base environment'

3 Likes

Oh, right, the error message. It looks like warnings to me but I’m not familiar with QT.

I guess anaconda doesn’t provide all libraries and it probably still depends on os-level dependencies which might need to be rebuilt as well.

1 Like

Similar issue:

https://stackoverflow.com/questions/57457160/how-to-fix-attribute-qtaa-enablehighdpiscaling-must-be-set-before-qcoreappli

1 Like

Yes, it is working if I run it from the terminal.

But I need to run several of these and it would be time consuming run several copy/paste line by line into the terminal

This bash shebang worked before the syste update, but I will try without space and come back, to let you know

Well, I don’t think error matters since that msg, appears when i’m manually running script in terminal and then script works as intended.

Thank you will give it a try

Then it sounds like warning, and if the script then works as intended can be safely ignored, I believe.

1 Like

This did it, thank you very much, you are a life saver!

Also thanks for the extra step, to tell me how to properly get ‘source’ line, i wouldn’t know how to do it, thanks a bunch!

1 Like

Now double-clicking on bash script works, thanks to you.

But will check this also, thanks for looking it up!

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