Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Automate command line at startup

Programming languages, Coding, Executables, Package Creation, and Scripting.
Post Reply
Message
Author
jemdem
Posts: 7
Joined: 2015-01-26 12:44

Automate command line at startup

#1 Post by jemdem »

Hi all,

(I don't know if we can call this programming, but didn't know where to put it.)

I'm trying to automate two command lines, a synclient and a syndaemon. They both work well if I type them manually in a terminal, but if I do a littre script to do this, tap to click and scrolling don't work anymore.

This is the script I wrote:

Code: Select all

#!/bin/bash

synclient VertEdgeScroll=1
syndaemon -d -t -K

exit 0
So I made a chmod +x on the file, placed it in ~/bin then change PATH to include the directory. Then I added this file in "Startup applications".
The scripts run ok, mais it has a different effect than if I run the commands manually.

Doees someone know why and how to fix it?


Code: Select all

Linux Mint 17.1 Cinnamon 
Last edited by jemdem on 2015-01-26 18:57, edited 2 times in total.

User avatar
Ardouos
Posts: 1077
Joined: 2013-11-03 00:30
Location: Elicoor II
Has thanked: 1 time
Been thanked: 4 times

Re: Automate command line at startup

#2 Post by Ardouos »

You're using Mint? It would probably be more helpful to you if you post here:

http://forums.linuxmint.com/
There is only one Debian | Do not break Debian | Stability and Debian | Backports

⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Automate command line at startup

#3 Post by Head_on_a_Stick »

Mint will have a GUI to change your touchpad options, use that instead.
deadbang

jemdem
Posts: 7
Joined: 2015-01-26 12:44

Re: Automate command line at startup

#4 Post by jemdem »

The mint GUI for touchpad doesn't allow those settings.

I think script writing is common to all debian distro aren't there? So people here can help as well as people at linuxmint.com no?

User avatar
aicardi
Posts: 388
Joined: 2009-11-18 01:30
Location: Chicago

Re: Automate command line at startup

#5 Post by aicardi »

jemdem wrote:
I think script writing is common to all debian distro aren't there? So people here can help as well as people at linuxmint.com no?
So you haven't even bothered to ask at either Linux Mint or Ubuntu?
Jessie/Xfce

jemdem
Posts: 7
Joined: 2015-01-26 12:44

Re: Automate command line at startup

#6 Post by jemdem »

Yes I did at both, is there a problem for me posting here?

User avatar
Ardouos
Posts: 1077
Joined: 2013-11-03 00:30
Location: Elicoor II
Has thanked: 1 time
Been thanked: 4 times

Re: Automate command line at startup

#7 Post by Ardouos »

jemdem wrote:Yes I did at both, is there a problem for me posting here?
It is frowned upon, even though there are users willing to help. Just because something is based on Debian, doesn't mean it runs exactly like Debian (see sig).

Mint has its own forums for a reason.
There is only one Debian | Do not break Debian | Stability and Debian | Backports

⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

jemdem
Posts: 7
Joined: 2015-01-26 12:44

Re: Automate command line at startup

#8 Post by jemdem »

ok

aplistir
Posts: 141
Joined: 2014-03-26 22:11

Re: Automate command line at startup

#9 Post by aplistir »

I run a similar "script" on starup as you.
There are some minor differences, which shouldn't matter but here they are anyway:

Here is my whole "script". It works

Code: Select all

synclient TapButton3=2

I dont have the "exit 0" at the end.. because if I run it from terminal, the exit would kill the terminal...
I dont even have the " #!/bin/bash ", which I should have written, but hey it works.. lazy me..

I also added this launch command in startup aplications
/home/myusername/bin/add_middle_button_emulation.sh
Didnt use PATH in there

The main thing is that it works for me.
Hope this helps.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Automate command line at startup

#10 Post by Head_on_a_Stick »

aplistir wrote:I run a similar "script" on starup as you.
There are some minor differences, which shouldn't matter but here they are anyway:

Here is my whole "script". It works

Code: Select all

synclient TapButton3=2

I dont have the "exit 0" at the end.. because if I run it from terminal, the exit would kill the terminal...
I dont even have the " #!/bin/bash ", which I should have written, but hey it works.. lazy me..

I also added this launch command in startup aplications
/home/myusername/bin/add_middle_button_emulation.sh
Didnt use PATH in there

The main thing is that it works for me.
Hope this helps.
For basic setup options such as this, you could use a file at /etc/X11/xorg.conf.d/50-synaptics.conf (or at the end of xorg.conf) like this:

Code: Select all

Section "InputClass"
        Identifier "touchpad catchall"
        Driver "synaptics"
        MatchIsTouchpad "on"
        Option "TapButton3" "2"
        MatchDevicePath "/dev/input/event*"
EndSection
deadbang

aplistir
Posts: 141
Joined: 2014-03-26 22:11

Re: Automate command line at startup

#11 Post by aplistir »

Head_on_a_Stick wrote: For basic setup options such as this, you could use a file at /etc/X11/xorg.conf.d/50-synaptics.conf (or at the end of xorg.conf) like this: .......
Thanks for the tip!

Post Reply