This forum has been archived. All content is frozen. Please use KDE Discuss instead.

My script does not autorun

Tags: None
(comma "," separated)
User avatar
tassos
Registered Member
Posts
32
Karma
0
OS

My script does not autorun

Wed Feb 17, 2016 11:04 pm
Hello,
the following script
Code: Select all
#!/bin/sh
exec "/home/mr/dotfiles/disable_trackpad.sh"

placed in
Code: Select all
~/.config/autostart/disable_trackpad

Is not run.

The other one has code to disable the trackpad
Code: Select all
#!/usr/bin/env bash

xinput set-prop 11 'Device Enabled' 0
exit 0


Can someone explain as to why? It drives me nuts. If I manually run the command or the script it disables the trackpad but the script does not run on startup to do it automatically.
User avatar
google01103
Manager
Posts
6668
Karma
25

Re: My script does not autorun

Wed Feb 17, 2016 11:49 pm
you can disable trackpad when mouse is plugged in in systemsettings

no idea 'cause I don't write scripts, but:

1) I would have the 2nd script write a time stamp to file just to make sure it ran (or some other confirmation)
2) I would try sh instead of exec (and no I don't know the diff)
3) I would use /bin/sh instead of /bin/exec is both (again don't know the diff)
3) I would put everything in 1 script
4) I would add a sleep just in case there was a timing issue

yeah I tend to throw thing against the wall to see what sticks xD , maybe someone will have an actual idea


OpenSuse Leap 42.1 x64, Plasma 5.x

luebking
Karma
0

Re: My script does not autorun

Thu Feb 18, 2016 1:08 am
The autostart folder is for desktop services (*.desktop files), scripts are sourced from ~/.config/plasma-workspace/env/ (NOTICE that there's bee a bug in startkde that broke this and was at least released by ubuntu somewhen (bug story: https://bugs.kde.org/352491, first commit broke sourcing, second fixed it)
User avatar
tassos
Registered Member
Posts
32
Karma
0
OS

Re: My script does not autorun

Fri Feb 19, 2016 10:41 am
Thanks for the replies I will try these and report back when/if fixed.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]