LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 01-31-2013, 09:16 PM   #1
dgermann
Member
 
Registered: Aug 2004
Distribution: Ubuntu 8.04.1 desk; Red Hat 9.0 server
Posts: 298

Rep: Reputation: 30
Question 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!
 
Old 02-02-2013, 07:40 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,140
Blog Entries: 54

Rep: Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791
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.)
 
Old 02-02-2013, 05:11 PM   #3
dgermann
Member
 
Registered: Aug 2004
Distribution: Ubuntu 8.04.1 desk; Red Hat 9.0 server
Posts: 298

Original Poster
Rep: Reputation: 30
Question

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!
 
Old 02-02-2013, 06:26 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,140
Blog Entries: 54

Rep: Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791
If it's the screen saver kicking in I'm sure there's a workaround.
 
Old 02-04-2013, 06:54 PM   #5
dgermann
Member
 
Registered: Aug 2004
Distribution: Ubuntu 8.04.1 desk; Red Hat 9.0 server
Posts: 298

Original Poster
Rep: Reputation: 30
Question

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!
 
Old 02-04-2013, 08:00 PM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,140
Blog Entries: 54

Rep: Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791
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.
 
Old 02-04-2013, 08:09 PM   #7
dgermann
Member
 
Registered: Aug 2004
Distribution: Ubuntu 8.04.1 desk; Red Hat 9.0 server
Posts: 298

Original Poster
Rep: Reputation: 30
Smile

unSpawn--

Good thoughts! I will check those out and report back what I find. Thanks!
 
Old 02-05-2013, 09:39 PM   #8
dgermann
Member
 
Registered: Aug 2004
Distribution: Ubuntu 8.04.1 desk; Red Hat 9.0 server
Posts: 298

Original Poster
Rep: Reputation: 30
Question 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!
 
Old 02-06-2013, 08:49 AM   #9
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,140
Blog Entries: 54

Rep: Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791
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).
 
Old 02-07-2013, 09:59 PM   #10
dgermann
Member
 
Registered: Aug 2004
Distribution: Ubuntu 8.04.1 desk; Red Hat 9.0 server
Posts: 298

Original Poster
Rep: Reputation: 30
Question

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!
 
  


Reply

Tags
lubuntu, screen locks, ssh


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Disable lock session (lock screen) when switch user in KDE 4.x Murz Linux - Desktop 4 12-01-2010 08:28 AM
KDE lock/unlock session problem with screen saver timeout [ kdesktop_lock ] Askmethod Linux - Newbie 4 11-15-2010 07:50 AM
Lock after invalid login attempts, session lock, minimum password length nstarz Linux - Security 1 06-24-2010 05:36 PM
Lock the screen (no close session) Jose Rivas Fedora 1 08-03-2006 09:47 AM
Telnet/SSH screen stops responding after a while but the session is still active alllle Linux - Networking 4 05-04-2004 12:52 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration