WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: FreeRDP and Auto Wifi Connect  (Read 4193 times)

Offline XFDesigns

  • Newbie
  • *
  • Posts: 3
FreeRDP and Auto Wifi Connect
« on: February 02, 2016, 04:20:13 PM »
Hey Guys,

First time using tiny core... coming from Thinstation which works great for my goal using a wired solution... but wireless is just not happening.  Keeps Dropping
As for tiny core.. installed it and the wifi works great.. never drops
problem 1: having a hard time setting up the wifi to automatically boot.  So wondering if there is a guide to setting it up for a WPA 2 .
problem 2: After it automatically boots to the correct wifi I need it to automatically boot into the free RDP with preloaded server and domain information... where the user just has to input the username and domain.

If anyone can point to the to the right direct for both problems.. it would be a big help.. I am not a Linux expert in anyway just a heads up...

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11581
Re: FreeRDP and Auto Wifi Connect
« Reply #1 on: February 02, 2016, 04:52:05 PM »
Hi XFDesigns
To start free RDP automatically, create a file under  /home/tc/.X.d  containing the command to start it. Something like:
Code: [Select]
xfreerdp -z -g 1280x1024 -u USERNAME -p PASSWORD --plugin cliprdr --plugin rdpdr --data disk:msrb:/home/tc/msrbcusips/templates disk:raw:/home/tc/msrbcusips/buffer -- xxx.xxx.xxx.xxx:3390 &

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 708
Re: FreeRDP and Auto Wifi Connect
« Reply #2 on: February 02, 2016, 05:10:03 PM »
I Don't I am the right guy to answer, but i am doing it this way on my pi.

tce-load wifi
add nodhcp to cmdline to not start dhcp server.

tc@box:/opt$ more wpa.conf
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=staff
ap_scan=1
network={
        ssid="User"
        psk="Password"
        group=CCMP
        pairwise=CCMP
        key_mgmt=WPA-PSK
        proto=RSN
}

tc@box:/opt$ more bootlocal.sh
#!/bin/sh
# put other system startup commands here
/usr/local/etc/init.d/openssh start
wpa_supplicant -iwlan0 -c/opt/wpa.conf -B -Dwext
/sbin/udhcpc -n -b -i wlan0 -p /var/run/udhcpc.wlan0.pid


Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: FreeRDP and Auto Wifi Connect
« Reply #3 on: February 02, 2016, 06:00:18 PM »
Hello XFDesigns
I'm guessing there are many methods available to start wifi on boot like the method I use in my traveling notebook which first determines if an Ethernet connection is available then if not will fire up wifi.sh in a terminal window with a list of available AP's to connect to.   But for a simple approach to start an auto wifi connection I'd install wifi.tcz extension and any dependencies, then

Create a file " wifi " in /home/tc/.Xd  with a simple command within it like  " cliorx sudo wifi.sh "  to open a terminal with a list of available AP's  or   " cliorx sudo wifi.sh -a " to auto-connect to the first AP listed in /home/tc/wifi.db

Then add /home/tc/.Xd/wifi  to your backup to be used on next bootup


Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11581
Re: FreeRDP and Auto Wifi Connect
« Reply #4 on: February 02, 2016, 08:19:19 PM »
Hi coreplayer2
He needs the network to be up prior to running  free RDP.

Quote
Then add /home/tc/.Xd/wifi  to your backup to be used on next bootup
By default,  /home  is backed up, as is everything under  /home  , unless excluded by  .xfiletool.lst.

Offline XFDesigns

  • Newbie
  • *
  • Posts: 3
Re: FreeRDP and Auto Wifi Connect
« Reply #5 on: February 03, 2016, 08:52:50 AM »
Guys thank you for the reply's also sorry for posting this in the wrong area.

Going to test out the automatic RDP boot which rich recommended. 

As for the wifi.. going to try out your methods offered.. if anyone else has any other suggestions please let me know

Thank you!

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: FreeRDP and Auto Wifi Connect
« Reply #6 on: February 03, 2016, 01:03:38 PM »
Hello Rich
Quote
By default,  /home  is backed up, as is everything under  /home  , unless excluded by  .xfiletool.lst.
Agreed, or by "home=" bootcode and removing home from backup..  but that's one of the beauties of TinyCore, there are various methods to achieve persistence   
What I should have said was "As long as you have persistence to ensure the contents of .Xd will be present on reboot"

Also if we need to wait for a wifi connection before running Free RDP then perhaps a script to launch FreeRDP after testing for a wifi connection

I use something more elaborate, but something as simple as
a script named launchFreeRDP
Code: [Select]
#!/bin/sh
CARRIER=0
DEVICE=$(iwconfig 2>/dev/null | awk '{if (NR==1)print $1}')
while [ "$CARRIER" = 0 ]; do
    sleep 2
    CARRIER=$(cat /sys/class/net/$DEVICE/carrier)
done
" FreeRDP launch command here "
exit
should suffice right?

the above script could be placed in /home/tc/scripts
called from a file /home/tc/.Xd/RDP with the entry " /home/tc/scripts/launchFreeRDP "



« Last Edit: February 03, 2016, 01:07:43 PM by coreplayer2 »

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: FreeRDP and Auto Wifi Connect
« Reply #7 on: February 03, 2016, 05:45:48 PM »
So I experimented with this a little and found adding a small delay works best

In the file installed at /home/tc/.Xd
Code: [Select]
sleep 3
/home/tc/scripts/startRDP

then in /home/tc/scripts/startRDP
Code: [Select]
#! /bin/sh -x
CARRIER=0
DEVICE=$(iwconfig 2>/dev/null | awk '{if (NR==1)print $1}')
while [ "$CARRIER" = 0 ]; do
    sleep 2
    CARRIER=$(cat /sys/class/net/$DEVICE/carrier)
done
[ "$CARRIER" = 1 ] && " FreeRDP launch command here "
exit

ok I got to go back to work..
« Last Edit: February 03, 2016, 06:00:06 PM by coreplayer2 »

Offline XFDesigns

  • Newbie
  • *
  • Posts: 3
Re: FreeRDP and Auto Wifi Connect
« Reply #8 on: February 04, 2016, 08:34:31 AM »
Thanks Coreplayer!

I got the Auto wifi working.. but it seems that it doesn't like my Wireless... the Public Wifi it connects to no problem.. but the password wifi it is having a problem.. it connects but it doesn't allow internet traffic.  So Trying different settings... will post my results. but thank u once again for the help!