LinuxQuestions.org
Help answer threads with 0 replies.
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 08-15-2007, 12:10 PM   #1
TheDirtyScreech
Member
 
Registered: Jul 2007
Distribution: Gentoo, LFS
Posts: 42

Rep: Reputation: 15
Anyone display console output to screensaver?


I'm wondering if anyone has a way of displaying a console session to a screensaver in KDE. This would allow me to do two things: first, I could use it to watch log files passively as my compy goes to screensaver mode. Second, I could use it to watch the IRC channel we have at work without needing to have the machine logged in.

Anybody know how to do this one?

-TheDirtyScreech-
 
Old 08-16-2007, 11:37 AM   #2
monsm
Member
 
Registered: Feb 2005
Location: London, UK
Distribution: Gentoo
Posts: 568

Rep: Reputation: 37
I was just setting up xscreensaver to run electricsheep and had to edit the .desktop file for it. I wonder if something like this would work:

[Desktop Entry]
Encoding=UTF-8
Name=TailingLog
Comment=Testing using tail in screensaver
TryExec=tail
Exec=tail -f /var/log/messages
StartupNotify=false
Terminal=false
Type=Application
Categories=Screensaver

I haven't tried though. I'll leave that to you
 
Old 08-17-2007, 08:03 AM   #3
TheDirtyScreech
Member
 
Registered: Jul 2007
Distribution: Gentoo, LFS
Posts: 42

Original Poster
Rep: Reputation: 15
I'll try that as soon as I get enough free time today. Thanks for the reply! I'll let you know how it goes.

-TheDirtyScreech
 
Old 08-17-2007, 08:19 AM   #4
maroonbaboon
Senior Member
 
Registered: Aug 2003
Location: Sydney
Distribution: debian
Posts: 1,495

Rep: Reputation: 48
Hmm. If 'tail' does not work (perhaps it can only be run in a console) you could try 'root-tail' instead. This is like 'tail -f' except it draws on the root window.

If you look at the man page for xscreensaver you see that a program needs two properties to work as a screensaver plugin: (1) the program needs to draw on the root window and (2) it needs to understand 'virtual root' windows. Root-tail has (1) but I don't know about (2).

The other thing that confuses me here is that it seems like KDE screensavers have to follow possibly different rules. But if you are not even logged in (so looking at the kdm login) then I don't think KDE is even running, and I don't know what screensaver would be operative in that situation.
 
Old 09-12-2017, 01:33 PM   #5
mkbel
LQ Newbie
 
Registered: Nov 2014
Posts: 2

Rep: Reputation: Disabled
My solution under XFCE

My solution to this problem is:

Bind script start_screensaver.sh to keyboard shortcut used to lock my session.
Script start_screensaver.sh:
  1. Opens terminal in my GUI and runs script_to_tty1.sh in that terminal, so I can close that terminal (terminating the script) when I log in to my session again.
  2. Locks the gui session.
  3. Switches to virtual console TTY1

script_to_tty1.sh is wrapper around the script doing the useful work and writing the progress on std out.
script_to_tty1.sh:
  1. Invokes useful script.
  2. Pipes its output to tee command.
  3. tee command passes its input to its output and copies it to /dev/tty1

You need grant your user right to write to /dev/tty1. In my case I need to add myself to group tty.
Code:
sudo usermod -a -G tty myUserName
You need to allow your user to run chvt without password promt.
Code:
sudo visudo
add line
Code:
%username  ALL= NOPASSWD: /bin/chvt
For KDE, you need to replace xfce4-terminal command with your command to start terminal window and xflock4 command with your command to lock KDE session. In my case xflock4 command calls
Code:
light-locker-command --lock
If you wish to use light-locker, just install the package light-locker.
Code:
sudo apt-get install light-locker
To end such "screen saver" hit ctrl + alt + F7 to switch from virtual console 1 to virtual console 7 (X11) and login as usual.
(I am using lightdm as my login screen manager)

start_screensaver.sh content:
Code:
#!/bin/bash
xfce4-terminal --command=/path/to/script/script_to_tty1.sh&
xflock4
sudo chvt 1
script_to_tty1.sh content:
Code:
#!/bin/bash
/path/to/script/useful_script.sh | tee /dev/tty1
 
Old 09-12-2017, 07:43 PM   #6
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mageia, and whatever VMs I happen to be playing with
Posts: 12,620
Blog Entries: 16

Rep: Reputation: 3245Reputation: 3245Reputation: 3245Reputation: 3245Reputation: 3245Reputation: 3245Reputation: 3245Reputation: 3245Reputation: 3245Reputation: 3245Reputation: 3245
In Xscreensaver, you could try using the "Starwars" screensaver and, under Xscreensaver's advanced tab, point the "Text Manipulation" dialog at the file in question.

Whether or not the text would update dynamically while the screensaver is running is a different question. I suspect that the screensaver reads the text file at startup and caches it.
 
Old 09-13-2017, 12:18 PM   #7
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 6,430
Blog Entries: 2

Rep: Reputation: 1559Reputation: 1559Reputation: 1559Reputation: 1559Reputation: 1559Reputation: 1559Reputation: 1559Reputation: 1559Reputation: 1559Reputation: 1559Reputation: 1559
^ that's a good and simple solution.

however, i've been playing with custom screensavers.
it is possible.
i managed to make a figlet screensaver some time ago, i.e. a terminal window screensaver.
i just made it into a git repository.
hope this helps.
 
  


Reply


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
Disabling screensaver on tty1 (virtual console) ElectroLinux Linux - General 11 05-02-2006 09:22 PM
Disabled screensaver, no output to monitor mfitzpat Linux - General 0 03-10-2006 08:28 AM
Console Screensaver TomalakBORG Linux - General 0 07-19-2005 11:48 AM
Changing the timing of the screensaver from the kernel console and X11??? Shagrath239 Slackware 8 02-22-2005 09:51 PM
Console screensaver won't disable jev-bird Linux - Software 0 10-13-2004 12:51 PM

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

All times are GMT -5. The time now is 06:03 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration