Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've created a script to set up my Intuos tablet at the start of a session:

#!/bin/sh

xsetwacom set "Wacom Intuos4 4x6 pad" AbsWheelUp "key ctrl minus";
xsetwacom set "Wacom Intuos4 4x6 pad" AbsWheelDown "key ctrl plus";
xsetwacom set "Wacom Intuos4 4x6 pad" Button 1 "key ctrl 0"; #touchring button

xsetwacom set "Wacom Intuos4 4x6 stylus" Button 2 3;
xsetwacom set "Wacom Intuos4 4x6 stylus" Button 3 2;
xsetwacom set "Wacom Intuos4 4x6 stylus" TabletPCButton on;

which I've saved as ~/bin/.wacomsetup.sh running chmod a+x ~/bin/.wacomsetup.sh. Checking the properties, shows that it's allowed to run as a program, but that my user account can only read/write to the file.

I've confirmed it works when I run it from Terminal using sh ~/bin/.wacomsetup.sh, but when I put the path as the command entry in a new entry in Startup Applications (is this specific to Cinnamon?), it doesn't run the script after logging in/restarting (I have to run it manually).

Edit Startup Program:
Name: Setup Wacom Intuos
Command: sh ~/bin/.wacomsetup.sh
Comment: ksdfk

Are there different permissions I need to apply to the script to allow it to run on startup this way?

Thanks
(I'd appreciate if someone could retag this question more appropriately, if there are better tags.)

share|improve this question
    
dpkg-reconfigure dash -> answer "No" to set as default. Verify /bin/sh points to Bash (ls -lh /bin/*sh). Verify you can run the script as executable: cd ~/bin/ && ./.wacomsetup.sh. Ideally, remove the ~ from the Startup Program Command. –  grs Jan 12 '13 at 5:17
    
What exactly is "Startup Applications"? –  terdon Jan 12 '13 at 16:35
    
@terdon It's an application in Linux Mint (pre-installed), presumably like the startup tab of msconfig on Windows –  ataulm Jan 12 '13 at 19:04
    
@ataulum, how can I run it? i am running mint debian and cinnamon myself and could not find it in the couple if minutes I spent looking. –  terdon Jan 12 '13 at 19:06
    
@terdon I found it by typing "Startu--" in the menu. It's also under the Preferences submenu in the menu applet. I'm running the non-Debian branch of Mint with Cinnamon. –  ataulm Jan 12 '13 at 19:13
add comment

2 Answers

up vote 1 down vote accepted
+150

Few things to try:

  1. Replace the "~" in the path in Startup Applications with the absolute path to your home folder (e.g. /home/whateveryourusernameis)

  2. Remove the sh in the path as it is not necessary; as long as the script is executable (with the "x" bit set in the DACLs for you), the #!/bin/sh at the start of the script will detect that it's a shell script and automatically start up the shell interpreter to execute the commands.

  3. Try moving the script to /usr/bin, making it world readable and executable, and setting the Command: in Startup Applications to just wacomsetup.sh. Although I doubt this step is necessary because Startup Applications execute under your user account after you login, and Xorg should already be started...

  4. Just to make sure the problem isn't that the script runs but the commands fail to execute for some reason: at the top of the script below the #!/bin/sh line, try to add: echo scripted > ~/scripted (change the "scripted" part if you already have a file of that name for some other use). Then make sure that file doesn't exist, then logoff/login and see if it writes that file. If not, the script isn't even running. If you DO see that file, then the script is running but the xsetwacom calls are failing.

share|improve this answer
    
Thanks. I used 1 and 2 but not 3, and 4 was a useful mechanism to find whether or not it was working! Will award the bounty in 53m. –  ataulm Jan 12 '13 at 19:14
add comment

I'm not sure what you mean by "Startup Applications". I assume it is a GUI frontend. Where did you find it?

Anyway, have you tried adding a new .desktop file to ~/.config/autostart? It should be something like this:

[Desktop Entry]
Name=wacomsetup
Type=Application
Exec=/home/your_user/bin/.wacomsetup.sh
X-GNOME-Autostart-enabled=true
Comment=Blah blah
Hidden=false

Save it as, for example, wacomsetup.desktop then log out and log back in.

share|improve this answer
    
"Startup Applications" is a front end for startup apps in Mint - it's been there since at least v14 (and I think Ubuntu too) –  ataulm Nov 23 '13 at 15:54
1  
@ataulm OK, it is actually gnome-session-properties. –  terdon Nov 23 '13 at 15:57
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.