WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: ~/.X.d script executes but called program doesn't, only at boot  (Read 1744 times)

Offline lphilpot

  • Newbie
  • *
  • Posts: 2
~/.X.d script executes but called program doesn't, only at boot
« on: November 23, 2015, 01:23:53 PM »
(I've searched and looked in the book, but if I've overlooked the answer, please point me in the right direction. I'm not unfamiliar with Linux in general, but am new to TC.)

Booting TinyCore 6.4.1 (w/GUI) from a USB stick and want to automatically connect straight away to a Windows Terminal Server. So, I've put the rdesktop call into a script: ~/.X.d/autordp.sh:

Code: (bash) [Select]
/usr/local/bin/rdesktop -u "" -d <domain> -f -a 16 192.168.x.y &
(reason for the null user is to prevent pre-populating the login field)

Boots normally and ~/.X.d/autordp.sh runs automatically, but rdesktop apparently does not execute. I've confirmed this as much as possible via debugging output from the script to a logfile. I've redirected all script output to a log (STDOUT and STDERR) and get nothing from rdesktop. If I run rdesktop from autordp.sh with no parameters and capture the output, I get the usual help screen. With full parameters, nothing.

However, if I immediately run the same rdesktop command (with parameters) either by itself or by running ~/.X.d/autordp.sh, it executes and connects properly. So what's different about the script executing automatically after boot vs. manually running it?

I thought it might be ownership/perms, but no luck. I tried putting the rdesktop line in ~/.xsession, but all that did was either prevent booting or prompt me for X parameters (resolution, etc.) at boot. Once booted, there's a .xsession in /home/tc, but it's not there when I'm editing the environment offline.

I realize this might (?) be due to something with rdesktop, but I'm trying to rule out variables. If anyone can point me to a known-working solution, even if it's something else, I'd be hugely appreciative.

Many thanks in advance.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: ~/.X.d script executes but called program doesn't, only at boot
« Reply #1 on: November 23, 2015, 01:36:00 PM »
Load up strace, and make that "strace -o /tmp/rdesktop.log /usr/local/bin/rdesktop -u ...".
The only barriers that can stop you are the ones you create yourself.

Offline lphilpot

  • Newbie
  • *
  • Posts: 2
Re: ~/.X.d script executes but called program doesn't, only at boot
« Reply #2 on: November 27, 2015, 09:10:39 AM »
I'll check it out. I'm also retracing our steps in creating the boot image in the first place to make sure we didn't do anything amiss. If necessary I'll follow the exact procedure in the projects section of the book.

Thanks!