Results 1 to 1 of 1

Thread: XFCE Desktop from Powershell with WSL success.

  1. #1
    Join Date
    2018-Apr
    Location
    Austin Texas
    Posts
    1

    XFCE Desktop from Powershell with WSL success.

    I'm likely the last person here to figure this out, but for my own posterity if nothing else here's the breadcrumbs....this has been whipping my **** entirely too long for a 5 minute project.

    Downloaded Kali from Windows store, mostly common sense stuff all the way until configuring XRDP for remote connection to desktop (final result is accessing GUI with Windows Remote Desktop...I'm sure there's a slicker solution, please share if you know it.)

    Transcript(ish):
    I'm assuming you have installed Windows Subsystem for Linux and acquired and installed Kali from Windows Store.

    Open Powershell64 as Admin
    "Kali" commands the instance awake and the Powershell to a bash terminal.

    sudo apt-get update
    sudo apt-get dist-upgrade -y
    sudo apt-get clean
    sudo apt-get install webshells
    sudo wget https://kali.sh/xfce4.sh
    sudo sh xfce4.sh
    sudo apt-get upgrade -y
    sudo apt-get dist-upgrade -y
    sudo apt-get install xrdp


    sudo update-alternatives --config x-session-manager
    # option 5 for XFCE4


    # change settings to autorun sesman*

    sudo nano /etc/xrdp/xrdp.ini
    autorun=sesman-any #*PROOF-READING EDIT---THIS (very obviously) DOESN'T AUTORUN SESMAN, IT DEFAULTS THE MENU TO SESMAN-ANY IN XRDP, MYSTERY SOLVED.
    max_bpp=16
    ---
    #"sesman-any"
    ip=127.0.0.1
    ---
    #create passwd/user (i matched the powershell unix session info...maybe req'd, maybe not?)

    ^X


    # xrdp session manager edits:
    sudo nano /etc/xrdp/sesman.ini
    #"Globals"
    listenaddress=127.0.0.1

    listenport=3390

    EnableUserWindowManager=true

    UserWindowManager=startwm.sh

    DefaultWindowManager=startwm.sh

    ^X


    # set fire to your monitor(s!!!!) ...or "fire up the services"
    #Ultimately this was entirely simple, but I could not get XRDP to run if my life depended on it. I revisited my edits and googled and gitted for what fealt like days....
    #...then I found an appropriate query and realized it's been awesomely documented.
    #I've been too defeated by this problem to even try to explain it my own words with any kind of dignity so check out the excellent explanation and write up I used from 'Griffin's IT Library' @ http://c-nergy.be/blog/?p=8316. I'm sure the #corpse has been #flogged here too, I just owe them (at least) a citation, probably a beer.

    sudo nano /lib/systemd/system/xrdp.service
    #this file was already existing and I wasn't expecting it to be. Your mileage may vary...you may need to mkfile.
    #copy below text into file-- don't forget to save when you're done.
    --------------------------------------------------------------------------

    [Unit]
    Description=xrdp daemon
    Requires=xrdp-sesman.service
    After=syslog.target network.target xrdp-sesman.service


    [Service]
    Type=forking
    PIDFile=/var/run/xrdp.pid
    #EnvironmentFile=/etc/sysconfig/xrdp
    ExecStart=/usr/local/sbin/xrdp $XRDP_OPTIONS
    ExecStop=/usr/local/sbin/xrdp $XRDP_OPTIONS –kill


    [Install]
    WantedBy=multi-user.target

    ----------------------------------------------------------
    #repeat for sessionmanager Xrdp-sesman.service
    sudo nano /lib/systemd/system/xrdp-sesman.service


    [Unit]
    Description=xrdp session manager
    After=syslog.target network.target
    StopWhenUnneeded=true


    [Service]
    Type=forking
    PIDFile=/var/run/xrdp-sesman.pid
    #EnvironmentFile=/etc/sysconfig/xrdp
    ExecStart=/usr/sbin/xrdp-sesman $SESMAN_OPTIONS
    ExecStop=/usr/sbin/xrdp-sesman $SESMAN_OPTIONS –kill


    [Install]
    WantedBy=multi-user.target
    --------------------------------------------------------------------

    #at this point I 'rebooted' for good luck


    #open new powershell terminal


    sudo su
    service xrdp start
    service xrdp-sesman start #(probably not necessary for you.) (Probably is, actually.)


    uname -a (just to make sure)


    ------------------------------------------------------------


    From there I opened a Windows Remote Desktop session, steered it towards 127.0.0.1:3390 and fired.


    Select 'sesman-any' from the xrdp dropdown, enter, and you should be there.


    Mine is surprisingly snappy and seems to work full-featured.

    Hopefully this helps anyone avoid a bit of frustration like I endured. This is my first post here and that's a very accurate measure of my Linux experience, I've been playing with VM's and several distros for a couple months...suffice it to say I know that there's a bunch of horrendous inefficiency in the way I went, roll your eyes all you like, just let me know at which parts so I can figure this out quicker next time.

    proof: https://imgur.com/gallery/Zhydtxl

    Cheers!
    Last edited by revoltrise; 2018-04-25 at 14:22.

Similar Threads

  1. Customize the Kali Desktop KDE, Gnome, Mate, XFCE, LXDE, e17, etc
    By muts in forum Building Custom Kali Images
    Replies: 44
    Last Post: 2022-11-01, 06:47
  2. Love the new Kali Linux and xfce desktop
    By stevegardner in forum Community Feedback
    Replies: 2
    Last Post: 2020-04-11, 14:03
  3. Problem with XFCE desktop on WSL
    By CunningDesire in forum TroubleShooting Archive
    Replies: 0
    Last Post: 2018-09-26, 14:57
  4. Replies: 3
    Last Post: 2015-11-13, 21:21

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •