I'm trying to get this working: http://micrux.net/?p=66, essentially a screensaver of the kernel. I'm fine up to the last part, where it asks me to input.
This wouldn't be a problem if I knew where to input this. I do not know how to access screensaver settings through the terminal.Code:cat `find /usr/src/linux-source/ -name *.c | argshuf`
If you really want to help me, could you also tell me where/how to tweak speed, scale, and fade settings.
Thanks!
-
inspirations365 Notebook Consultant
-
proxima_centauri Notebook Consultant
Without speaking towards what you are actually doing;
The command you posted would be used in Terminal. Just copy and paste that code into the terminal and hit enter. -
inspirations365 Notebook Consultant
Hm...the context of the page doesn't make me think that, although that is the obvious answer, isn't it?
Here's what it says: -
proxima_centauri Notebook Consultant
In the future, most cases, just think command = terminal
-
inspirations365 Notebook Consultant
Sorry for the multiple posts, but I input the command into the terminal for kicks and it made all the prompts turn into symbols instead of text. I closed it and reopened it and everything seems fine. But when I go to the screensaver menu, it's still listing the same few lines (it's supposed to be random).
That, and I don't know how to edit ANY of the screensavers settings like speed, etc. If I can solve this problem, I think everything else will fall into place. -
inspirations365 Notebook Consultant
Okay, I think I half solved the problem: I needed xscreensaver to edit the settings. I still don't know where to enter that command, but that's the last thing I need to solve. If anyone can help me answer that, I think I'm golden.
-
proxima_centauri Notebook Consultant
Yes you are right, I should have taken a look at the link in the first place.
"Now we’re ready to put it all together. Go into your screensaver preferences, and go into the phosphor setup. You can set up the speed, scale and fade settings however you like. The important part is the “text program” box. Here’s the command:"
So in screensaver preferences, there should be something called "phosphor setup" with somesort of input interface, aka "text program" box.
Do you see anything like that? -
proxima_centauri Notebook Consultant
Somethign like this I'm guessing
http://eddie.niese.net/images/phosphor-settings.png -
inspirations365 Notebook Consultant
If I go into Xscreensaver and select Phosphor and settings, it lists options for Frame rate, Font scale, and Fade. If I select the button for "Documentation" towards the bottom of this window, it will open a terminal. If I do not do this and instead select "Advanced" at the bottom if this window, it has a "Command Line:" option where it lists "phosphor -root" in the box. I actually have already placed that wandering piece of code into both of these places.
If I go into the "Documentation" box, and cd to /usr/src/linux-source and input the code, the terminal will be busy, but I don't think it will finish anything.
If I place that bit of code into the "Command Line:" box, nothing will show up in the preview box. I don't the proper screensaver will be called if I change this line. This is also where options are modified (scale, etc.). -
inspirations365 Notebook Consultant
Wow, i'm not getting anything like that link at all.
-
proxima_centauri Notebook Consultant
This is the webpage where that image was linked from if it helps
http://eddie.niese.net/20080110/cool-linux-screensaver/ -
inspirations365 Notebook Consultant
I've been asking this same question on Ubuntu Forums. Someone realized that the picture you posted is for KDE, not Gnome like I'm using. I found where I'm supposed to input the command, "You need to go tho the Advanced-tab of the screensaver dialog, and under "Text Manipulation" enable "Program" and type that command into the command field."
The relatively small problem now is, the command doesn't work as it should. Instead, it gives "no such file or directory".
There must be something I we should append to the command to make it direct to the /usr/src/linux-source directory... if we can solve this problem, the issue is resolved! -
inspirations365 Notebook Consultant
I'm so close I can taste it. Okay, so in that program box listed above, you go to browse, and navigate to the proper directory. Then paste in the command in my original post AFTER the directory in the box.
NOW the only issue I see standing between me and awesome is that permission is denied. putting "sudo" in front of the command won't work since I can't enter my password. Can anyone think of a workaround for this? -
proxima_centauri Notebook Consultant
can you open the program itself with "sudo"?
-
inspirations365 Notebook Consultant
I'm not sure what you mean by program. Please elaborate. I'm sure this thing will work if I can give the command permissions to open the files.
-
inspirations365, this is a long response to your thread because after checking it out, I think this screensaver is perfect for the uber geek. So I thought I would explain it in a thorough way so that others can try it out if they want, and then towards the end of the post, when we go step by step, you can look at which steps aren't working, and then examine from there forward.
First a level set. The phosphor xscreensaver is a cool screensaver that imitates the early computer CRT screens by "printing" text across the screen using green "CRT" characters on a black background. The coolest thing about the phosphor screensaver is that you can pipe lots of different kinds of text for displaying, when in screensaver mode. The trickiest bit about doing this is configuring the screensaver correctly. Some installations install a phosphor configuration where you can't enter in any command for text input for the screensaver, or at least you can't do it from the GUI screensaver settings. (I tried to set it on my KDE 4.2.1 environment and the advanced settings configuration wasn't enabled) This is controlled by a configuration file that comes with the phosphor screensaver and is stored here;
Code:/usr/share/xscreensaver/config/phosphor.xml
1) Displaying text from the Linux fortune program. Of course the fortune program must be installed;
Code:fortune
Code:lynx -dump -nolist http://en.wikipedia.org/wiki/Special:Random | sed '/Retrieved from/,$ d' | sed '/Jump to/d' | sed '/Links/,$ d' | sed 's/"[edit]|"/ ""/g'
Code:wget -q -O - http://tickers.bbc.co.uk/tickerdata/story2.dat | grep '^[HB]' | perl -p -i -e 's/HEADLINE/BBC>/g'
Another uber-geeky cool phosphor mod, which is the subject of this thread, is to pipe random linux source code files, to phosphor. In addition to installing the linux source code files, you need a method for randomly selecting a file, and then piping it to phosphor. So I took a look at the two howto pages referenced in this thread for accomplishing this. The first page describes a method that uses the linux find command to locate all of the installed linux source files, and then pipe the entire list of filenames to a program called argshuf, (argument shuffle), which picks one of the filenames, which can then be piped to the cat command. It's a usable method for piping the source file contents to phosphor, but (as the second howto page below points out), it does need to do a 'find' for every linux source file, each time phosphor needs new text. You also need to compile and install the additional argshuf program. Kudos to the developer for developing this program, but I think that the second solution is an easier, lower overhead, solution.
This second page shows a method for creating a script that when run, will scan your system for all installed linux source code files, and then build a simple perl script that includes a list of all of the installed linux source code files. Then whenever the perl script is run, it randomly chooses one of the source files, and then simply prints out the complete filename. Then all you need to do is pipe that output to cat, and it achieves the same thing as the first method, only with less overhead. If it matters, the only thing you need to do is rerun the script when you install a newer version of the source code to get an up to date file listing in the perl script. (I liked this method so much that I just did it on my own system.)
So now lets trace the steps necessary on how to make this work for either method, (specifically tailored for an Ubuntu user). Regardless of which method is chosen, the first step necessary is to install the linux source code files. So first change to your system's source code directory;
Code:cd /usr/src
Code:sudo apt-get install linux-source
Code:ls -al
Code:linux-source-2.6.28.tar.bz2
Code:sudo tar -xvjf linux-source-2.6.28.tar.bz2
Code:sudo ln -s linux-source-2.6.28 linux
Code:/usr/src/linux
Code:sudo apt-get install build-essentials
Code:cat `find . -type f | argshuf`
Code:echo `find . -type f | argshuf`
Once you've got the argshuf command properly installed, you're ready to complete the last step. The howto author, (and as you've pointed out previously in this thread), states that in order to pipe this output correctly to phosphor you need to enter the following into the phosphor screensaver settings, Text Program option dialog box;
Code:cat `find /usr/src/linux/ -name *.c | argshuf`
Code:cat `find /usr/src/linux/ -name *.c | argshuf`
If this is true, you can consider compiling and installing argshuf to fix this, or you can consider the second method, outlined on this webpage, as an easier alternative to achieving the same thing. These are the steps necessary, (I've made some slight changes to the original author's script here). I first recommend storing this shell script in the /usr/local/bin directory, (along with the perl script it will create). So first change to that directory;
Code:cd /usr/local/bin
Code:sudo nano phosphor-kernel-script.sh
Code:#!/bin/sh file=/usr/local/bin/phosphor-kernel-src.pl # script to create linux_src_dir=/usr/src/linux # location of kernel src cat << EOF > "$file" #!/usr/bin/perl srand; rand(\$.) < 1 && (\$line = \$_) while <DATA>; print \$line; __DATA__ EOF find -L "$linux_src_dir" -name \*.c >> $file chmod 755 $file
Code:sudo chmod 755 phosphor-kernel-script.sh
Code:sudo /usr/local/bin/phosphor-kernel-script.sh
Code:phosphor-kernel-src.pl
Code:/usr/local/bin/phosphor-kernel-src.pl
Code:/usr/src/linux/arch/x86/kernel/kprobes.c
Code:/usr/local/bin/phosphor-kernel-src.pl| xargs cat
Good Luck..
(For anyone who got put out with the length of this post, sorry. It was a cool subject, I had the time, was feeling especially verbose, and I figured I needed to do something special for my 400th post here..) -
Sweet guide man. Good to see some verbose posts on the linux forum.
-
inspirations365 Notebook Consultant
Ugh....i wanted to start over, but after rm linux-source I can't get it back! If I try it again I get
Code:Reading package lists... Done Building dependency tree Reading state information... Done linux-source is already the newest version. The following packages were automatically installed and are no longer required: libraw1394-dev libdc1394-22-dev libtheora-dev libgsm1-dev Use 'apt-get autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
-
Try these commands to clean up your system configuration;
Code:sudo apt-get autoremove
Code:sudo dpkg --configure -a
Code:sudo apt-get clean
Code:sudo apt-get update
Code:sudo apt-get install linux-source
Good Luck.. -
inspirations365 Notebook Consultant
Output:
Code:Reading package lists... Done Building dependency tree Reading state information... Done linux-source is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
But if I can just get someone to send me the file linux-source-2.6.22.tar.bz2, that would be all I'd need. -
inspirations365 Notebook Consultant
Wouldn't someone else just have to input the same command and copy the .tar.bz2 file to an accessible directory and then upload it?
-
Again, since I don't run Ubuntu, I'm not sure of the correct answer here, but this blog suggests that you may already have the archive file still on your system. You can try the suggestion there of issuing this command;
Code:sudo apt-get install no-download linux-source
Code:/var/cache/apt/archives/
Code:sudo apt-get remove linux-source
Code:sudo apt-get --purge remove linux-source
Code:sudo apt-get install linux-source
Good Luck.. -
http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.22.tar.bz2 -
inspirations365 Notebook Consultant
Thank you both! I got the file that I needed (I actually posted that I needed the wrong kernel version, so thankfully that site has all of them!) and thanks to Jas's instructions I got it working. Thanks a ton everyone!!! -
YouTube Vid !!!
-
Sorry to bring up an old thread however i found this on google and there doesn't seem to be a whole lot more information available. I've followed Jas's guide and been playing with it for a while now and everything is working well however the problem I am having is that the screensaver is only printing the names of the files rather than the source contained in those files. I have been trying for a while now to fix this and tried a lot of different things but nothing seems to be working. The only two possible problems I could find are that when I put "/usr/local/bin/phosphor-kernel-src.pl| xargs cat" into the program field it doesn't work (however it does work and prints the source code correctly when I enter it into the terminal) and the other possible reason its not working is that I don't have the Dump Pipe option field that is shown in the picture from the link for the second method jas mentioned in his guide and I have no idea how to get that field, I looked in the /config/phosphor.xml file but there was nothing in there.
I would appreciate it if anyone had any ideas or suggestions I could try, thanks.
Edit:
Of Course as soon as I post i figure it out, never fails.
Anyway for anyone else you comes across this awesome post Jas's guide on the second page is excellent just a few notes though:
Code:srand; rand(\$.) < 1 && (\$line = \$_) while ; print \$line;
Code:srand; rand(\$.) < 1 && (\$line = \$_) while <DATA>; print \$line;
and also the code to put in the program text box is:
Code:/usr/local/bin/phosphor-kernel-src.pl | xargs cat
this screensaver setup is awesome, I have dual monitors setup and it even prints two different files on each monitor at the same time. Very cool.
and again I apolagize for bumping this thread.
Quick Kernel Screensaver Help Needed
Discussion in 'Linux Compatibility and Software' started by inspirations365, Mar 18, 2009.