LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-02-2016, 10:41 AM   #16
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872

Quote:
Originally Posted by donald3.heckel View Post
Hello Keefaz,

In regards to the X11 forwarding,

it seems as if it will only forward if I am logged in to a TTY or something to that effect. It keeps giving me those messages. It would be nice to be able to forward over SSH without having to log in locally on the machine.
I don't understand this part, X is forwarded to remote client or to local client?

For the runlevel you have to find a way to start X on runlevel 3 (startx command run as your user, not as root)
 
Old 05-06-2016, 09:16 AM   #17
donald3.heckel
Member
 
Registered: Aug 2014
Posts: 60

Original Poster
Rep: Reputation: Disabled
Hello Emerson and Keefaz,

I am attempting to forward applications from the server to (remote) client over WAN. I use it from time to time on my LAN, but the same issue persists. The main purpose is to forward graphical applications from my server to the outside of my home network. As for Keefaz, to forward entire X sessions instead of single applications, I close down lightdm on the client, start xinit, and then secure shell into my server and pull the desktop by using:

Code:
xinit # and then

exec startxfce4 # or
exec startlxde # or
exec startkde # and maybe even
exec enlightenment_start # However, I don\'t really use this one.
As for single applications:

Code:
ssh -C -X user@server -p 2222

xclock &
disown
xload &
disown
xtron &
disown
firefox &
disown

# Just an example of commands that I would run
I hope this explains it better. Thank you.

Sincerely,

donald3.heckel

Last edited by donald3.heckel; 05-06-2016 at 09:18 AM.
 
Old 05-09-2016, 10:43 PM   #18
donald3.heckel
Member
 
Registered: Aug 2014
Posts: 60

Original Poster
Rep: Reputation: Disabled
Hello all,

It seems as if xauth times out right at login. I asked another guy about it and he might've said that I could write a script to decrypt my home directory, and set my environment variable to bash to establish an X connection.

The script is as follows:

Code:
#!/bin/sh

ecryptfs-mount-private
cd ~

/usr/bin/env bash
I then set this as a login shell using chsh. I am still working on that.

Any thoughts and/or suggestions?

Sincerely,

donald3.heckel
 
Old 05-10-2016, 01:48 AM   #19
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Maybe you could put your ~/.Xauthority elsewhere on your system, in a non encrypted place, then symlink it from here to your encrypted home dir.
(ln -s /some/place/.Xauthority ~/)

edit:
...but xauth has to know where this file is...
I found a relevant post here (cool, same OS it seems)
http://stackoverflow.com/questions/2...g-in-via-ssh-x

edit2:
...but .ssh/rc won't be available at the time you login with ssh, no?
It's getting complicated, a simpler way would be to set up an user account in the server with a non-encrypted home directory for X forwarded sessions

Last edited by keefaz; 05-10-2016 at 07:51 AM.
 
Old 05-12-2016, 03:30 PM   #20
donald3.heckel
Member
 
Registered: Aug 2014
Posts: 60

Original Poster
Rep: Reputation: Disabled
Hello Keefaz,

The thought of moving over my .Xauthority and setting the variables accordingly did cross my mind. I will look into different ways of trying to implement that. Thank you very much. I will give it a try and let you know the results.

Sincerely,

donald3.heckel
 
Old 01-12-2019, 05:35 PM   #21
donald3.heckel
Member
 
Registered: Aug 2014
Posts: 60

Original Poster
Rep: Reputation: Disabled
Post [SOLVED]

Hello again gentlemen,

Sorry for the long delay, but I thought it would be good to post what I found out a long time after this in the event that others find it helpful.


This issue was actually a simple fix. You have to SSH in with a separate terminal and decrypt the directory first in order to forward X11.


I will close the thread as Solved. Thanks again gentlemen.



Sincerely,

D3H
 
  


Reply

Tags
auth, server, ssh, x11



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Decrypting my home directory ffolder fagin Linux - Security 5 12-24-2012 12:00 PM
How to recover my encrypted Home directory pazzport Linux - Desktop 7 05-14-2012 11:30 PM
Cannot mount unencrypted directory to encrypted home directory with fstab? Daravon Ubuntu 35 09-14-2010 03:50 AM
Unable to get X11 port forwarding to work in SSH Windowns Solaris / OpenSolaris 19 09-28-2006 05:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration