LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-19-2012, 04:57 PM   #1
Shimdidly
LQ Newbie
 
Registered: Mar 2012
Posts: 21

Rep: Reputation: Disabled
Is it possible to view a screen process started by another user?


Hi, my friend has a minecraft server process running under a screen. Typing 'screen -r' tells me there's no screen to be resumed. However, 'ps aux' shows this.
Code:
david     1340  0.0  0.0   5384   152 ?        Ss   Apr08   0:00 SCREEN -dmS minecraft java -Xms256M -Xmx256M -jar minecraft_server.jar nogui
david     1341  6.0 61.7 570560 313080 pts/2   Ssl+ Apr08 1018:18 java -Xms256M -Xmx256M -jar minecraft_server.jar nogui
Is there any way for me (root) to grab/view this screen?
 
Old 04-19-2012, 05:01 PM   #2
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 415Reputation: 415Reputation: 415Reputation: 415Reputation: 415
Use screen -ls to list all screens. You can then rejoin a screen by specifying its number with screen -r. By default screen -r will look to rejoin a screen previously started by your user. I use this method every day when handing off projects from one team member to another.
 
Old 04-19-2012, 05:03 PM   #3
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 415Reputation: 415Reputation: 415Reputation: 415Reputation: 415
Bookmark http://www.rackaid.com/resources/lin...al-and-how-to/
 
Old 04-19-2012, 06:39 PM   #4
Shimdidly
LQ Newbie
 
Registered: Mar 2012
Posts: 21

Original Poster
Rep: Reputation: Disabled
It says,
Code:
shimdidly@diwars:~$ screen -ls S-david
No Sockets found in /var/run/screen/S-shimdidly.
Same story for root. I looked in the /var/run/screen folder and found S-david/1340.minecraft. I've tried 'screen -r 1340.minecraft' and I've tried:
Code:
shimdidly@diwars:~$ sudo screen -r david/1340.minecraft
[sudo] password for shimdidly: 
There is a screen on:
	1340.minecraft	(04/08/2012 12:37:51 AM)	(Private)
There is no screen to be attached matching 1340.minecraft.
I feel like I'm getting close but it's still not letting me attach to the screen.
 
Old 04-20-2012, 09:08 AM   #5
Shimdidly
LQ Newbie
 
Registered: Mar 2012
Posts: 21

Original Poster
Rep: Reputation: Disabled
What I don't understand is why there is support for a feature that doesn't work? The manual lays it out plainly:
Code:
screen -r sessionowner/[[pid.]tty[.host]]
However, any combination of
'sudo screen -r david/1340.minecraft'
'sudo screen -r david/minecraft'

doesn't let me do anything. (As seen on the previous post). Why is there allegedly multi-user support when it won't let you view another user's process anyway? Seems so pointless.
 
Old 04-20-2012, 09:22 AM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
The remote user needs to enter
:multiuser
:acladd yourusername
before you can attach to its screen session.
 
Old 04-20-2012, 11:08 AM   #7
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 415Reputation: 415Reputation: 415Reputation: 415Reputation: 415
You can create a .screenrc file in the home directory of your users specifying those options as well. The default screen install I have always done allows other users to take over sessions by default so I've never ran into that issue.
 
  


Reply



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
How to find which process started a daemon process in autostart? indiajoe Linux - Desktop 4 10-25-2011 02:19 AM
[SOLVED] Date and time of a process when it was started mario.almeida Linux - General 1 03-19-2010 10:46 AM
how to known when a process was started ? marozsas Linux - General 8 01-07-2010 07:17 AM
How can you view the progress of a process started in a non-interactive shell? timingalls Linux - General 1 04-21-2009 02:29 PM
[SOLVED] what/who started that process unkie888 Linux - General 2 11-05-2007 08:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:44 AM.

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