Xfce Forum

Sub domains
 

You are not logged in.

#1 2026-02-26 12:20:19

Fragrant1470
Member
From: Poland
Registered: 2025-03-01
Posts: 47
LinuxFirefox 140.0

Autostarted scripts/commands behaving differently than manual CLI exec

System Information:

System:
Host: debian Kernel: 6.12.38+deb13-amd64 arch: x86_64 bits: 64
Desktop: Xfce v: 4.20.1 Distro: Debian GNU/Linux 13 (trixie)

The Problem:
I am experiencing a consistent issue where commands/scripts added to Session and Startup -> Application Autostart do not function as expected, despite running perfectly when executed manually in a terminal immediately after login.

Case 1: DavMail
Command: davmail ~/.config/davmail/davmail.properties
Symptoms: The process starts, but it ignores the specified ports in the config file and uses defaults instead.
Verification: ps shows the process is running with the correct arguments:

kamil 2033 0.5 1.0 5037428 158248 ? Sl 12:50 0:05 /usr/bin/java ... -jar /usr/share/davmail/davmail.jar ~/.config/davmail/davmail.properties

Case 2: Wacom Setup Script
Command: /home/kamil/.local/bin/wacom-setup.sh
Symptoms: This script uses xsetwacom and includes a sleep 2 at the start. When autostarted, the top button (mapped to Ctrl+Z) does not work. When run manually, it works perfectly. It seems like the settings are either not applied or are being overridden by the session/apps.

Observations:

- I use absolute paths for scripts.
- Manual execution (copy-pasting the exact string from the Autostart entry into Alacritty) works 100% of the time.
-  have had similar "fighting" issues with Redshift in the past (infinite restart loops when autostarted).
- The processes are spawning, but their behavior is divergent from a standard shell execution.

Is there a known issue with the environment or timing in Xfce 4.20 autostart that would cause applications to ignore configuration files or X11 input settings?

Offline

#2 2026-03-07 15:26:24

Fragrant1470
Member
From: Poland
Registered: 2025-03-01
Posts: 47
LinuxFirefox 140.0

Re: Autostarted scripts/commands behaving differently than manual CLI exec

I am still experiencing the problem, please help.

If something is not clear, let me know and I'll provide more information!

Offline

#3 2026-03-07 20:50:37

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 12,562
LinuxFirefox 148.0

Re: Autostarted scripts/commands behaving differently than manual CLI exec

Can you post back your ~/.xsession-errors file?

You could try adding or extending the sleep delay - to 10 seconds just in case something is overwritting your settings for xsetwatcom.


Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#4 2026-03-30 14:20:43

Fragrant1470
Member
From: Poland
Registered: 2025-03-01
Posts: 47
LinuxFirefox 140.0

Re: Autostarted scripts/commands behaving differently than manual CLI exec

ToZ wrote:

Can you post back your ~/.xsession-errors file?

You could try adding or extending the sleep delay - to 10 seconds just in case something is overwritting your settings for xsetwatcom.

Xsession: X session started for kamil at Mon 30 Mar 11:31:09 CEST 2026
dbus-update-activation-environment: setting DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
dbus-update-activation-environment: setting DISPLAY=:0
dbus-update-activation-environment: setting XAUTHORITY=/home/kamil/.Xauthority
localuser:kamil being added to access control list
dbus-update-activation-environment: setting XDG_DATA_DIRS=/usr/share/xfce4:/home/kamil/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share
dbus-update-activation-environment: setting GTK_MODULES=gail:atk-bridge
dbus-update-activation-environment: setting QT_ACCESSIBILITY=1
/usr/bin/x-session-manager: X server already running on display :0
** Message: 11:31:09.725: Failed to fetch _NET_NUMBER_OF_DESKTOPS; assuming 1
** Message: 11:31:09.725: Failed to get _NET_WORKAREA; using full screen dimensions
** Message: 11:31:09.725: Failed to fetch _NET_CURRENT_DESKTOP; assuming 0
** Message: 11:31:09.725: Failed to fetch _NET_CURRENT_DESKTOP; assuming 0
/usr/bin/iceauth:  creating new authority file /run/user/1000/ICEauthority
xfce4-session-Message: 11:31:09.729: SSH authentication agent is already running
gpg-agent: a gpg-agent is already running - not starting a new one
** Message: 11:31:09.948: Failed to fetch _NET_CURRENT_DESKTOP; assuming 0
Waiting for initial location to become available...
Location: 54.29 N, 18.60 E
[monitor] 2026/03/30 11:31:10 INFO: Log output saved to file "/home/kamil/.local/state/syncthing/syncthing.log"
[start] 2026/03/30 11:31:10 INFO: syncthing v1.30.0 "Gold Grasshopper" (go1.24.4 linux-amd64) debian@github.syncthing.net 2025-06-20 09:17:23 UTC [noupgrade, noupgrade]
[ULG3H] 2026/03/30 11:31:10 INFO: My ID: x
Cannot register authentication agent: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: An authentication agent already exists for the given subject
[ULG3H] 2026/03/30 11:31:11 INFO: Hashing performance is 1027.18 MB/s
[ULG3H] 2026/03/30 11:31:11 INFO: Overall send rate is unlimited, receive rate is unlimited
[ULG3H] 2026/03/30 11:31:11 INFO: Relay listener (dynamic+https://relays.syncthing.net/endpoint) starting
[ULG3H] 2026/03/30 11:31:11 INFO: Using discovery mechanism: global discovery server https://discovery-lookup.syncthing.net/v2/?noannounce
[ULG3H] 2026/03/30 11:31:11 INFO: Using discovery mechanism: global discovery server https://discovery-announce-v4.syncthing.net/v2/?nolookup
[ULG3H] 2026/03/30 11:31:11 INFO: Using discovery mechanism: global discovery server https://discovery-announce-v6.syncthing.net/v2/?nolookup
[ULG3H] 2026/03/30 11:31:11 INFO: Using discovery mechanism: IPv4 local broadcast discovery on port 21027
[ULG3H] 2026/03/30 11:31:11 INFO: Using discovery mechanism: IPv6 local multicast discovery on address [ff12::8384]:21027
[ULG3H] 2026/03/30 11:31:11 INFO: TCP listener ([::]:22000) starting
[ULG3H] 2026/03/30 11:31:11 INFO: QUIC listener ([::]:22000) starting
[ULG3H] 2026/03/30 11:31:11 INFO: Detected 0 NAT services
[ULG3H] 2026/03/30 11:31:11 INFO: GUI and API listening on 127.0.0.1:8384
[ULG3H] 2026/03/30 11:31:11 INFO: Access the GUI via the following URL: http://127.0.0.1:8384/
[ULG3H] 2026/03/30 11:31:11 INFO: My name is "debian"
[ULG3H] 2026/03/30 11:31:11 INFO: Device x is "redfin" at [dynamic]
[ULG3H] 2026/03/30 11:31:11 INFO: Relay listener (dynamic+https://relays.syncthing.net/endpoint) shutting down
[ULG3H] 2026/03/30 11:31:11 INFO: Relay listener (dynamic+https://relays.syncthing.net/endpoint) starting
[ULG3H] 2026/03/30 11:31:11 INFO: listenerSupervisor@dynamic+https://relays.syncthing.net/endpoint: service dynamic+https://relays.syncthing.net/endpoint failed: Get "https://relays.syncthing.net/endpoint": dial tcp: lookup relays.syncthing.net on [::1]:53: read udp [::1]:33856->[::1]:53: read: connection refused
[ULG3H] 2026/03/30 11:31:11 INFO: Relay listener (dynamic+https://relays.syncthing.net/endpoint) shutting down
[ULG3H] 2026/03/30 11:31:11 INFO: listenerSupervisor@dynamic+https://relays.syncthing.net/endpoint: service dynamic+https://relays.syncthing.net/endpoint failed: Get "https://relays.syncthing.net/endpoint": dial tcp: lookup relays.syncthing.net on [::1]:53: read udp [::1]:43907->[::1]:53: read: connection refused
[ULG3H] 2026/03/30 11:31:11 INFO: Relay listener (dynamic+https://relays.syncthing.net/endpoint) starting
[ULG3H] 2026/03/30 11:31:11 INFO: Relay listener (dynamic+https://relays.syncthing.net/endpoint) shutting down
[ULG3H] 2026/03/30 11:31:11 INFO: listenerSupervisor@dynamic+https://relays.syncthing.net/endpoint: service dynamic+https://relays.syncthing.net/endpoint failed: Get "https://relays.syncthing.net/endpoint": dial tcp: lookup relays.syncthing.net on [::1]:53: read udp [::1]:49567->[::1]:53: read: connection refused
[ULG3H] 2026/03/30 11:31:11 INFO: Ready to synchronize "DCIM" (3doyj-3yj2o) (sendreceive)
[ULG3H] 2026/03/30 11:31:11 INFO: Ready to synchronize "Podcasts" (94bhm-wkh39) (sendreceive)
[ULG3H] 2026/03/30 11:31:11 INFO: Ready to synchronize "Audiobooks" (audiobooks) (sendreceive)
[ULG3H] 2026/03/30 11:31:11 INFO: Completed initial scan of sendreceive folder "Podcasts" (94bhm-wkh39)
[ULG3H] 2026/03/30 11:31:11 INFO: Ready to synchronize "Pictures" (ixk2m-eqxgh) (sendreceive)
[ULG3H] 2026/03/30 11:31:11 INFO: Ready to synchronize "Documents" (kps3d-h3pz3) (sendreceive)
[ULG3H] 2026/03/30 11:31:11 INFO: Completed initial scan of sendreceive folder "Audiobooks" (audiobooks)
[ULG3H] 2026/03/30 11:31:11 INFO: Ready to synchronize "Vaults" (m9sza-x6cmo) (sendreceive)
[ULG3H] 2026/03/30 11:31:11 INFO: Ready to synchronize "Videos" (movies) (sendreceive)
[ULG3H] 2026/03/30 11:31:11 INFO: Ready to synchronize "Downloads" (qsc6h-egxsh) (sendreceive)
[ULG3H] 2026/03/30 11:31:11 INFO: Ready to synchronize "Resources" (resources) (sendreceive)
[ULG3H] 2026/03/30 11:31:11 INFO: Ready to synchronize "Studia" (studia) (receiveonly)
[ULG3H] 2026/03/30 11:31:11 INFO: Ready to synchronize "syncthing" (syncthing) (sendreceive)
[ULG3H] 2026/03/30 11:31:11 INFO: Ready to synchronize "UG" (ug) (sendreceive)
[ULG3H] 2026/03/30 11:31:11 INFO: Completed initial scan of sendreceive folder "syncthing" (syncthing)
[ULG3H] 2026/03/30 11:31:11 INFO: Ready to synchronize "Music" (xwxcg-y7zkt) (sendreceive)
[ULG3H] 2026/03/30 11:31:11 INFO: Completed initial scan of sendreceive folder "Videos" (movies)
[ULG3H] 2026/03/30 11:31:11 INFO: Completed initial scan of sendreceive folder "UG" (ug)
[ULG3H] 2026/03/30 11:31:11 INFO: Completed initial scan of sendreceive folder "Resources" (resources)
[ULG3H] 2026/03/30 11:31:11 INFO: Completed initial scan of sendreceive folder "DCIM" (3doyj-3yj2o)
[ULG3H] 2026/03/30 11:31:11 INFO: Completed initial scan of sendreceive folder "Downloads" (qsc6h-egxsh)
[ULG3H] 2026/03/30 11:31:11 INFO: Completed initial scan of sendreceive folder "Pictures" (ixk2m-eqxgh)
[ULG3H] 2026/03/30 11:31:11 INFO: Puller (folder "Pictures" (ixk2m-eqxgh), item "Support material/last-dilemma-v3"): syncing: delete dir: directory has been deleted on a remote device but is not empty; the contents are probably ignored on that remote device, but not locally
[ULG3H] 2026/03/30 11:31:11 INFO: Puller (folder "Pictures" (ixk2m-eqxgh), item "Support material/dlugopis-znaleziony"): syncing: delete dir: directory has been deleted on a remote device but is not empty; the contents are probably ignored on that remote device, but not locally
[ULG3H] 2026/03/30 11:31:11 INFO: Puller (folder "Pictures" (ixk2m-eqxgh), item "Support material/aplikacja-lidl"): syncing: delete dir: directory has been deleted on a remote device but is not empty; the contents are probably ignored on that remote device, but not locally
[ULG3H] 2026/03/30 11:31:11 INFO: Puller (folder "Pictures" (ixk2m-eqxgh), item "Support material/Xppen-deco-03"): syncing: delete dir: directory has been deleted on a remote device but is not empty; the contents are probably ignored on that remote device, but not locally
[ULG3H] 2026/03/30 11:31:11 INFO: "Pictures" (ixk2m-eqxgh): Failed to sync 4 items
[ULG3H] 2026/03/30 11:31:11 INFO: Folder "Pictures" (ixk2m-eqxgh) isn't making sync progress - retrying in 1m0s.
[ULG3H] 2026/03/30 11:31:11 INFO: Completed initial scan of sendreceive folder "Music" (xwxcg-y7zkt)
[ULG3H] 2026/03/30 11:31:11 INFO: Completed initial scan of receiveonly folder "Studia" (studia)
[ULG3H] 2026/03/30 11:31:11 INFO: Completed initial scan of sendreceive folder "Vaults" (m9sza-x6cmo)
[ULG3H] 2026/03/30 11:31:12 INFO: Completed initial scan of sendreceive folder "Documents" (kps3d-h3pz3)

I have fixed problems with xsetwacom by importing some env variables, creating udev rule and adding 2 second delay before adjusting default settings. I still have a problem with davmail.

I thought that the problem with davmail is that it is launched by something else first so that's why the command which is supposed to make davmail run with the right config file appears to not work.


But the command spawns a new process instead of modifying the existing one. The process is not spawned at all when the command is in Session & Startup:

davmail home/kamil/.config/davmail/davmail.properties &

:

Offline

#5 2026-03-30 16:21:45

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 12,562
LinuxFirefox 149.0

Re: Autostarted scripts/commands behaving differently than manual CLI exec

Fragrant1470 wrote:

But the command spawns a new process instead of modifying the existing one. The process is not spawned at all when the command is in Session & Startup:

davmail home/kamil/.config/davmail/davmail.properties &

Try this command instead in the autostart:

sh -c "davmail home/kamil/.config/davmail/davmail.properties > /tmp/davmail.txt 2>&1"

...then after the next startup, post back the contents of /tmp/davmail.txt (make sure there is no confidential information in that file).


Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#6 2026-03-30 17:46:30

Fragrant1470
Member
From: Poland
Registered: 2025-03-01
Posts: 47
LinuxFirefox 140.0

Re: Autostarted scripts/commands behaving differently than manual CLI exec

ToZ wrote:
Fragrant1470 wrote:

But the command spawns a new process instead of modifying the existing one. The process is not spawned at all when the command is in Session & Startup:

davmail home/kamil/.config/davmail/davmail.properties &

Try this command instead in the autostart:

sh -c "davmail home/kamil/.config/davmail/davmail.properties > /tmp/davmail.txt 2>&1"

...then after the next startup, post back the contents of /tmp/davmail.txt (make sure there is no confidential information in that file).

Hey, wrapping it all in a shell script bash -c "command" actually worked... I feel stupid for not having tried it earlier.

I appreciate all your help!

Offline

#7 2026-03-30 19:01:07

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 12,562
LinuxFirefox 149.0

Re: Autostarted scripts/commands behaving differently than manual CLI exec

That is really odd. It shouldn't have made any difference. But, glad it works.


Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.017 seconds, 7 queries executed - Memory usage: 576.88 KiB (Peak: 593.86 KiB) ]