LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-30-2015, 01:10 AM   #1
thelynx
Member
 
Registered: Jan 2015
Location: Thailand
Distribution: Apricity OS
Posts: 35

Rep: Reputation: Disabled
How to automatically run a script on login


Good day,

I would like the following script to run automatically as soon as I log in:

Code:
#!/bin/bash
synclient TapButton1=1
syndaemon -i 1 -t -d
Is there a way to do this? Would setting up a cron job be the best option?

Any help would be most appreciated.

Thanks.
 
Old 01-30-2015, 01:33 AM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Hi,

if you are using a DE that follows the freedesktop standards you can put a .desktop file in ~/.config/autostart/. Eg make a file like:
Code:
[Desktop Entry]
Type=Application
Name=Synaptics
Comment=Setup and launch Synaptics
Exec=/path/to/myscript.sh
and put it at /.config/autostart/synaptics.desktop

However, you can likely put your synaptics configuration in /usr/share/X11/xorg.conf.d/50-synaptics.conf or similar and your DE may have a built in way of launching syndaemon. What distro and desktop (or window manager) are you using?

Evo2.
 
Old 01-30-2015, 02:59 AM   #3
thelynx
Member
 
Registered: Jan 2015
Location: Thailand
Distribution: Apricity OS
Posts: 35

Original Poster
Rep: Reputation: Disabled
Thanks for your reply, evo2. I'm running Sparky Linux 64-bit (Debian Jessie) with E17 desktop.

The "mouse and touchpad" settings, I can check enable tap touchpad for click, but it doesn't work.

I'll try making a .desktop entry and give it a shot. Thanks
 
Old 01-30-2015, 06:09 AM   #4
Head_on_a_Stick
Senior Member
 
Registered: Dec 2014
Location: London, England
Distribution: Arch & Debian
Posts: 1,183

Rep: Reputation: 283Reputation: 283Reputation: 283
For the tap-to-click setting, I would use a file at /etc/X11/xorg.conf.d/50-synaptics.conf:
Code:
Section "InputClass"
        Identifier "touchpad catchall"
        Driver "synaptics"
        MatchIsTouchpad "on"
        Option "TapButton1" "1"
        MatchDevicePath "/dev/input/event*"
EndSection
This would also work at the end of a pre-existing xorg.conf file.

However, I don't know if the Enlightenment desktop would over-ride these settings.
 
Old 01-30-2015, 06:58 AM   #5
thelynx
Member
 
Registered: Jan 2015
Location: Thailand
Distribution: Apricity OS
Posts: 35

Original Poster
Rep: Reputation: Disabled
Hi H on a S: Thanks. OK I'll put it in xorg.conf.d

Thanks
 
Old 01-30-2015, 07:07 AM   #6
thelynx
Member
 
Registered: Jan 2015
Location: Thailand
Distribution: Apricity OS
Posts: 35

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Head_on_a_Stick View Post
For the tap-to-click setting, I would use a file at /etc/X11/xorg.conf.d/50-synaptics.conf:
Code:
Section "InputClass"
        Identifier "touchpad catchall"
        Driver "synaptics"
        MatchIsTouchpad "on"
        Option "TapButton1" "1"
        MatchDevicePath "/dev/input/event*"
EndSection
This would also work at the end of a pre-existing xorg.conf file.

However, I don't know if the Enlightenment desktop would over-ride these settings.

Worked like a charm, thanks. Would there be something similar for
Code:
syndaemon -i 1 -t -d
?
 
Old 01-30-2015, 10:41 AM   #7
Head_on_a_Stick
Senior Member
 
Registered: Dec 2014
Location: London, England
Distribution: Arch & Debian
Posts: 1,183

Rep: Reputation: 283Reputation: 283Reputation: 283
Quote:
Originally Posted by thelynx View Post
Would there be something similar for
Code:
syndaemon -i 1 -t -d
?
I would just add that as an autostart program with the flags added.

However, I don't use Enlightenment (I don't trust anything that pulsates), so I'm not sure how you do that...

Something like Settings Panel → Apps → Startup Applications

A quick search suggests you may have to write a .desktop file after all.
http://www.gentoo-wiki.info/HOWTO_Au...ghtenment_DR17
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatically run rdesktop on login? MTWiley Linux - Desktop 1 09-20-2011 08:37 PM
Run a script automatically upon user login? FastFeet Linux - General 3 05-21-2009 06:23 AM
Run shell script automatically after Login. hnshashi Linux - Newbie 14 09-26-2008 05:43 AM
how can i run smbmount automatically when a user login rddreamz Linux - Networking 4 02-18-2006 04:10 AM
Where to run scripts automatically on login/logout hilltop*Tech Linux - General 2 02-06-2004 11:59 AM


All times are GMT -5. The time now is 01:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration