Run shell script after XServer is started? [closed] - linux

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
How to run shell script when XServer is started and lightdm also. I tried with init.d and rc.local in /etc directory, but my script is calling an gui application so that the reason I need to run it after XServer is started.
I am using Debian Jessie.

According to this link .xinitrc in your home directory will be read and executed, otherwise the default /etc/X11/xinit/xinitrc is used. So you should be able to create this file and have the shell script started.

Related

Make node.js to run on startup on unbuntu 14.4 [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 years ago.
Improve this question
I want to deploy a nodejs webapp .
And the nodejs server should be started on boot.
Is there any way to do that ?
You can use pm2 startup script for the same. Please refer the docs on below link
http://pm2.keymetrics.io/docs/usage/startup/
You can put your executable command for your nodejs server in sudo nano /etc/rc.local.
You can put your command in .bash_profile
it will execute when you login

Not getting proper prompt when using SHH [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I logged into my account on Bluehost using SSH and I got an unusual prompt.
I expected it to show the directory and a typical prompt but instead got some bash.
What you're seeing is the default bash prompt. This is what you get when the distro doesn't provide a better one in /etc/profile or similar. You can get it on any platform by ignoring the environment and config files:
env -i bash --norc
To get the user#host:dir$ prompt that Debian and derived distros use, you can add
export PS1='\u#\h:\w\$ '
to your .bash_profile

PuTTY : run knit when putty logs in [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
When I log onto remote linux host with putty ssh, it asks me to run "knit -f" (once a day)
if I don't run that command it starts asking me for password for all the git commands "git pull"
I want to know why does this happen, and if there is a way to automatically run this command every time my putty session starts.
You can add the command to the startup file of your shell on the linux host (e.g. .bash_profile if you use bash.)

Why use the service command in linux? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
What is the difference between
service apache2 restart
and
/etc/init.d/apache2 restart
So basically why is the service command recommended compared to directly invoking the appropriate command?
The service command runs the init scripts in a predictable environment:
service runs a System V init script in as predictable environment as possible, removing most environment variables and with current working directory set to /.
from: http://linux.die.net/man/8/service

How to modify .bash_login remotely? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I did something stupid which was adding the command exit 0 to .bash_login.
Now i'm stuck since whenever i try logging in, it just exits automatically.
Any ideas on how to resolve this? I'm currently using a windows PC to ssh to a linux plug computer.
ssh user#host "/bin/bash --noprofile"
See manpages for ssh and bash to see how this works. May need some modifications-- for example, if bash isn't in /bin on the remote machine. You will need a command-line ssh client, but I believe one is available for Cygwin on Windows.
After that, you should have a usable shell so you can fix your .bash_login.
Can you start a different shell?
ssh user#host tcsh
Then, in the different shell, fix or rename the file.

Resources