Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Some Screen (the application) questions.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
janosh
Tux's lil' helper
Tux's lil' helper


Joined: 28 Jul 2004
Posts: 80
Location: Oslo, Norway

PostPosted: Fri Jan 26, 2007 10:28 am    Post subject: Some Screen (the application) questions. Reply with quote

In the last weeks, I've started using screen when doing large emerges like update world.
At the moment, I'm reemerging 114 packages to remove some use-flags.

To check the progress of the emerge, i find my self constantly login in to a root-shell and reopening screen.
Just to get the window-title of the terminal to tell me how many packages it have emerged, and how many to go.
Then I log out.

I'm wondering if there is some way to just get the current window title out of the screen session, and display it somewhere.
Ideally I should be able to do this as a regular user i.e. not root.

The coolest thing would be if I was able to run a small application in the task-bar that on mouse over would pop-up the current screen-session window-title.

Any ideas?

--
Jonarne
Back to top
View user's profile Send private message
Letharion
Veteran
Veteran


Joined: 13 Jun 2005
Posts: 1344
Location: Sweden

PostPosted: Fri Jan 26, 2007 8:19 pm    Post subject: Reply with quote

Hmmm, I'm not sure how much this helps, but I'll give you what I have :-)

(1) If you run screen as root your regular user probably won't be able to see anything from the screens.
(2) If the progress is less relevant that when it finishes, you could make a php-script to mail yourself when emerge is done. That should be VERY basic, and I could help you write it myself.
(3) If you make some sort of script (php/bash/whatever) then you could run the script as root and feed info to your user.
This is however limited by the fact that "screen -list" doesn't show the title of the screens. Perhaps that can be overcome.
If a script could extract the title, the script could create a file on your desktop and update the name of the relevant info.
(4) An application with on mouse over effect I have no idea how to create, so your on your own there ^^

My 2 cents :-)
Back to top
View user's profile Send private message
janosh
Tux's lil' helper
Tux's lil' helper


Joined: 28 Jul 2004
Posts: 80
Location: Oslo, Norway

PostPosted: Sun Jan 28, 2007 1:03 pm    Post subject: Reply with quote

Everything helps :),
I know that you can set up screen so other people can have read-only access to it, so I think I should be able to log in to the root screen as a user.

Also, it's the progress I'm interested in. Especially the window title, because it tells me if something has gone wrong.

I guess my original question runs down to this:
How do you get the window title out of a screen session?

Anyone else done something like this?
Back to top
View user's profile Send private message
janosh
Tux's lil' helper
Tux's lil' helper


Joined: 28 Jul 2004
Posts: 80
Location: Oslo, Norway

PostPosted: Sat Feb 03, 2007 12:29 pm    Post subject: Reply with quote

I found a solution:
I just have screen log its output to a file, and then i can cat the logfile as a regular user.

--
Jonarne
Back to top
View user's profile Send private message
ok
Guru
Guru


Joined: 11 Jul 2006
Posts: 390
Location: germany

PostPosted: Sat Feb 03, 2007 4:36 pm    Post subject: Reply with quote

To check the progress of emerge you can use the logfile: /var/log/emerge.log
grep '>>> emerge' /var/log/emerge.log | sed 'H;/(1 of/h;$!d;g' | cut -d " " -f 5-8
if you emerge genlop you can use the following script:
Code:
grep '>>> emerge' /var/log/emerge.log | sed 'H;/(1 of/h;$!d;g' | cut -d " " -f 5-8
if pgrep sandbox &> /dev/null
then
        genlop -c
else
        echo -e "\nno package compiling..."
fi
echo
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum