WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: rdesktop to start automatically at startup and reboot at logoff  (Read 4991 times)

Offline get2guy

  • Newbie
  • *
  • Posts: 12
rdesktop to start automatically at startup and reboot at logoff
« on: November 20, 2014, 02:46:25 PM »
Hi, I seen and follow the install shown on this link:

"Thin Client with Tiny Core Linux for RDC"
http://www.youtube.com/watch?v=B_nCG0r74PU

but something dosent work for me
Is it something else beside what shown in the video that I'm missing?

my autostart file content is:
------------------------------------------------
#!/bin/sh
while true
do
        rdesktop -f 10.0.0.7
done
------------------------------------------------
my .xsession file content is:
----------------------------------------------------------------------------------------------------------------------------------------------
Xvesa -br -screen 1024x768x32 -shadow -2button -mouse /dev/input/mice,5 -nolisten tcp -I>/dev/null 2>&1 & export XPID=$!
waitforX || ! echo faild in waitforX || exit
"$DESKTOP" 2>/tmp/wm_errors &
export WM_PID=$!
[ -x $HOME/.setbackground ] && $HOME/.setbackground
[ -x $HOME/.mouse_config ] && $HOME/.mouse_config &
[ $(which "$ICONS".sh) ] && ${ICONS}.sh &
[ -d "$HOME/.X.d" ] && find "$HOME/.X.d" -type f -print l while read F; do . "$F"; &
./autostart &
done
---------------------------------------------------------------------------------------------------------------------------------------------
« Last Edit: November 24, 2014, 12:48:24 PM by get2guy »

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
If you have a question, please state it clearly.

Offline get2guy

  • Newbie
  • *
  • Posts: 12
im trying to configure rdesktop to run automatically at startup to a specified ip.
which dosent seems to work for me.

i dont know what is wrong with my editing.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Please read the book. http://tinycorelinux.net/book.html

Programs to run when starting X are placed in ~/.X.d

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
You put your start script in between the parameters of another command.

Change this:
Code: [Select]
[ -d "$HOME/.X.d" ] && find "$HOME/.X.d" -type f -print l while read F; do . "$F"; &
./autostart &
done

To this:
Code: [Select]
[ -d "$HOME/.X.d" ] && find "$HOME/.X.d" -type f -print | while read F; do . "$F"; done
$HOME/autostart &


Ironically, the comand you messed up is just what you need. q:
Download a copy and keep it handy: Core book ;)

Offline get2guy

  • Newbie
  • *
  • Posts: 12
Thanks for the help Misalf & gerald_clark! I managed to make it work.

But... currently it start automatically but when I logoff it starting the script again.

What should I do in order to reboot the local machine when the user logoff from the terminal server?

B.T.W my scripts and texts are here:

Created the file /home/tc/myrdesktop
-------------------------------------------------
#!/bin/sh
# myrdesktop
while true
do
   rdesktop -f -u XXXX -p XXXX 10.10.10.10
done
-------------------------------------------------
Edited the file /home/tc/.xsession
-------------------------------------------------
Xvesa -br -screen 1024x768x32 -shadow -2button -mouse /dev/input/mice,5 -nolisten tcp -I>/dev/null 2>&1 & export XPID=$!
waitforX || ! echo faild in waitforX || exit
"$DESKTOP" 2>/tmp/wm_errors &
export WM_PID=$!
[ -x $HOME/.setbackground ] && $HOME/.setbackground
[ -x $HOME/.mouse_config ] && $HOME/.mouse_config &
[ $(which "$ICONS".sh) ] && ${ICONS}.sh &
[ -d "$HOME/.X.d" ] && find "$HOME/.X.d" -type f -print l while read F; do . "$F"; &
$HOME/autostart &
done
-------------------------------------------------------
Created the file /home/tc/.X.d/myrdesktop.sh
-------------------------------------------------------
#!/bin/sh
# myrdesktop
while true
do
   rdesktop -f -u XXXX -p XXXX 10.10.10.10
done
-------------------------------------------------------