Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
01-31-2013, 09:16 PM
|
#1
|
|
Member
Registered: Aug 2004
Distribution: Ubuntu 8.04.1 desk; Red Hat 9.0 server
Posts: 291
Rep:
|
Lubuntu 12.04 screen lock kills ssh session
Friends--
Lubuntu 12.04 fresh install. I login from the computer. I then login via ssh from another computer. When the first session screen locks after X minutes, my ssh session is killed or at least locked. When I go back to the physical machine and login, then I can continue my ssh session. How can I shut off this behavior so my ssh session is not interrupted? But I still want the screen saver/lock to work on this machine when I am accessing it remotely.
Thanks!
|
|
|
|
02-02-2013, 07:40 AM
|
#2
|
|
Moderator
Registered: May 2001
Posts: 24,969
|
Ssh into the machine then start a 'screen' session? (See 'man screen'.) Even if you get thrown out you can ssh back in again and re-connect to your screen session to find none of your work is lost. (Also see 'autossh' for keeping SSH sessions alive.)
|
|
|
|
02-02-2013, 05:11 PM
|
#3
|
|
Member
Registered: Aug 2004
Distribution: Ubuntu 8.04.1 desk; Red Hat 9.0 server
Posts: 291
Original Poster
Rep:
|
unSpawn--
Thanks!
So is this normal behavior for a host to kill an ssh session when the screensaver kicks in?
I was going to say that I have not had this before, but as I think about it, most of my ssh activity has been to login to headless boxes which are not running X. Or I am in and out quickly such as to run an apt-get upgrade. So maybe this is normal and I have just not seen it.
I will look into autossh and try that, too.
Thanks, unSpawn!
|
|
|
|
02-02-2013, 06:26 PM
|
#4
|
|
Moderator
Registered: May 2001
Posts: 24,969
|
If it's the screen saver kicking in I'm sure there's a workaround.
|
|
|
|
02-04-2013, 06:54 PM
|
#5
|
|
Member
Registered: Aug 2004
Distribution: Ubuntu 8.04.1 desk; Red Hat 9.0 server
Posts: 291
Original Poster
Rep:
|
unSpawn--
Thanks!
Well it sure seems to be the screen saver: it coincides with that kicking in.
Any ideas on where to look for a workaround, other than the one you gave me (autossh)? I have googled and asked at several forums, but you are the only person to respond! And I thank you for doing so!
|
|
|
|
02-04-2013, 08:00 PM
|
#6
|
|
Moderator
Registered: May 2001
Posts: 24,969
|
I have one Ubuntu LTS but it runs CLI only, no Desktop Environment at all, so no I don't have a clue but I'm willing to think along. Start by finding out what screen saver it runs (probably gnome-screensaver) and look with Gconf-tool (or equivalent) at its scheme, maybe it has some tweaks. If not we'll have to start looking for error messages in /var/log to see what actually kills the session.
|
|
|
|
02-04-2013, 08:09 PM
|
#7
|
|
Member
Registered: Aug 2004
Distribution: Ubuntu 8.04.1 desk; Red Hat 9.0 server
Posts: 291
Original Poster
Rep:
|
unSpawn--
Good thoughts! I will check those out and report back what I find. Thanks!
|
|
|
|
02-05-2013, 09:39 PM
|
#8
|
|
Member
Registered: Aug 2004
Distribution: Ubuntu 8.04.1 desk; Red Hat 9.0 server
Posts: 291
Original Poster
Rep:
|
Report
unSpawn--
Did as you suggested and checked out both dconf-editor and gconf-editor but found nothing. So I did tail -f /var/log/syslog and got some errors about network-manager.
Googling that, I found this: https://help.ubuntu.com/community/Lu...MinimalInstall (See the section toward the end about unmanaged wired networks.)
Although I had no file called /etc/NetworkManager/nm-system-settings.conf, I created one and put in the line about managed=true, and rebooted. But alas the same problem.
Here is what tail -f shows:
Code:
Feb 5 22:14:41 samba1 NetworkManager[769]: <info> sleep requested (sleeping: no enabled: yes)
Feb 5 22:14:41 samba1 NetworkManager[769]: <info> sleeping or disabling...
Feb 5 22:14:41 samba1 NetworkManager[769]: <info> (eth0): now unmanaged
Feb 5 22:14:41 samba1 NetworkManager[769]: <info> (eth0): device state change: unavailable -> unmanaged (reason 'sleeping') [20 10 37]
Feb 5 22:14:41 samba1 NetworkManager[769]: <info> (eth0): cleaning up...
Feb 5 22:14:41 samba1 NetworkManager[769]: <info> (eth0): taking down device.
Feb 5 22:14:41 samba1 NetworkManager[769]: <info> (eth1): now unmanaged
Feb 5 22:14:41 samba1 NetworkManager[769]: <info> (eth1): device state change: activated -> unmanaged (reason 'sleeping') [100 10 37]
Feb 5 22:14:41 samba1 NetworkManager[769]: <info> (eth1): deactivating device (reason 'sleeping') [37]
I'm giving up for tonight, and deleting the file I created, but wonder if you see something useful as a clue there?
Thanks for helping me noodle this around!
|
|
|
|
02-06-2013, 08:49 AM
|
#9
|
|
Moderator
Registered: May 2001
Posts: 24,969
|
I doubt that but lets try something else:
0.) stop the SSH daemon, then start it manually in debug mode: 'sudo /usr/sbin/sshd -ddd 2>&1 | tee /tmp/sshd.log'
1.) connect but run 'ssh -vvv user@host 2>&1 | tee /tmp/ssh.log' instead.
2.) Now wait until the screen saver kicks in, collect both logs and then check those for clues plus your ~/.xsession-error*, /var/log/auth.log, /var/log/Xorg.0.log, /var/log/messages, /var/log/daemon.log and /var/log/*dm/* log files (if they exist and the time stamps match with your ssh logs).
|
|
|
|
02-07-2013, 09:59 PM
|
#10
|
|
Member
Registered: Aug 2004
Distribution: Ubuntu 8.04.1 desk; Red Hat 9.0 server
Posts: 291
Original Poster
Rep:
|
unSpawn--
Thanks! That is a good suggestion. I will try it when I am not so tired.
Actually I went a step further after I posted the other night and found another file in the same directory which looked like the new name for this nm- file. So I put the entry in there instead, and it still gave me the same errors. So I think you are right about looking in the wrong place.
But I did see that in the gui on the Lubuntu box are power management settings which basically suspend the whole box at X minutes. I am thinking that that is the culprit.
But, for another night's playing....
Thanks, unSpawn!
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 05:03 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|