PuTTY : run knit when putty logs in [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 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.)

Related

Run shell script after XServer is started? [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 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.

Local Linux user that automatically executes a command thyat can't be turned off [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
I've spent last few hours looking for a solution for my problem which is:
I have my home server set up next to me with a small monitor attached to it. What i want to do is i want to create an additional user called "monitor" that executes command "nethogs eth1" straight after it has been logged one locally on the machine, and does not allow to turn off the script.
Basically i want nethogs running 24/7 on my monitor, without way to turn it off.
Please help me if you know the solution.
sudo adduser monitor
echo "sudo -u monitor nethogs eth1" >> /etc/rc.local
Each time your machine boots, it will execute nethogs eth1 as user monitor, and only root or monitor itself can stop that command.

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

SSH port forwarding [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'm using SSH port forwarding to connect to Windows Remote Desktop from my Linux machine, like this:
ssh -L 50000:192.0.2.10:3389 user#example.com
rdesktop -f localhost:50000 -u user -p password
Now, the first command opens the remote command line on my terminal, so I have to open another terminal to issue the second one. How can I make ssh go on the background so I wouldn't have to open a new terminal?
You can try ssh with -Nf flags. man ssh for more information.

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