LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-07-2013, 03:45 PM   #1
djmb
LQ Newbie
 
Registered: Feb 2011
Location: Paris
Distribution: Debian Wheezy amd64 xfce desktop
Posts: 23

Rep: Reputation: 0
scripts to work on login, only working after first terminal is open


Dear all,

I would like to run a few scritps on log-in (not before). Namely I want to disable my touchpad and open a terminal. Here are the lines I think:

Code:
xinput --set-prop "SynPS/2 Synaptics TouchPad" "Device Enabled" 0
and

Code:
xfce4-terminal --hide-menubar --hide-borders --hide-toolbars
So I added these two lines at the end of ~/.bashrc

Interestingly this is what happen (probably for a well deserved reason...):
- none of the commands are started when I login, however, both commands start once I open a terminal for the first time. At that time my touchpad is disabled (which is OK by me) but also the computer keeps on opening up new terminal (like 10 per seconds) and I have to turn off the computer.

So here are my questions:
- how do I get these commands to start when I log in? and
- how do I get only 1 single terminal opening up?

thanks for your time and help,
 
Old 10-07-2013, 04:06 PM   #2
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
https://wiki.debian.org/Xinitrc
BUT pay attention to the note
Quote:
Note that ~/.xinitrc is only for configuring the initialization of xinit. If you want the script to be called when ever an X Session is started, then you should instead use ~/.xsession. Most WindowManagers also have a method of starting programs when they first startup.
the reason you have terminals spawning, is each one is again running xfce4-terminal ( since they source .bashrc )
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto open and arrange terminal and editor on login richman1234 Linux - Newbie 2 07-05-2013 05:22 PM
Is it possible to open a terminal from the login screen in MacOS? ThePreacher Other *NIX 3 06-06-2012 07:33 PM
automatically open terminal at login time. gardenair Linux - Newbie 13 06-09-2011 10:13 PM
Can remote login via ssh terminal but can't open volume in Krusader (via FISH) CyyberspaceCowboy Linux - Networking 0 05-28-2011 04:04 PM
Over 100 terminal windows open automatically after login kimbergross Linux - Newbie 1 10-01-2003 01:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:03 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
Open Source Consulting | Domain Registration