0
1
In tiny core linux, I have the following script:
#!/bin/sh
# ~/.X.d/freerdp.sh
rdp(){
while true
do
xfreerdp -f [IP Address]
done
}
rdp &
It's pretty simple; when X starts up and checks the .X.d directory (as is the case in tiny core) it finds and executes this script. The script starts up freerdp and keeps a connection open to the server by restarting it whenever it closes. As you can see from the rdp &
line, the function is run in the background to allow X to continue its startup routine.
The problem is that whenever I cancel X with a CTRL+ALT+BACKSPACE the rdp process doesn't die.
I'm looking for a way to kill the process as soon as X finishes, either through:
A) a script, executed on X closing, which kills the process
or
B) by modifying the script to check the return value of the xfreerdp
command.
NB - if the solution does check the return value, it must only end if the command fails to open the X display. For that reason, if you could point me to a reference for xfreerdp
return values I'd be grateful.
Does Ctrl+Alt+Backspace actually terminate the X process (and another process restarts it), or does it do a soft restart? – Darth Android – 2012-06-25T15:51:08.347
It fully terminates X. That is to say that if I run
startx
from the shell, waiting for X to start and pressing CTRL+ALT+BACKSPACE means the X display closes and the shell resumes. Also note that the shell I refer to is the only TTY on the system. – jackweirdy – 2012-06-25T15:57:17.640