Help newbie use Linux to make a Digital Picture Frame
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Help newbie use Linux to make a Digital Picture Frame
I have an old laptop, that I installed in a picture frame. It needs to boot, login, and run a slideshow of pictures from a flash drive, with no user intervention. The program 'feh' works perfect for this because of it's excellent command line options.
It has only a 1GB CF card for a flash drive. I gave up on using DSL and installed a command-line Hardy Heron system. I didn't do any stripping down after installing a command line system, then I basically just apt-get'd xorg and feh. Feh runs fine without a window manager.
The problems I have now are that I need it to auto-log me in, start x, and then run the slideshow, because I won't have a keyboard or mouse.
1. So I need to auto-login. I did a bit of searching but didn't find much.
2. I also need to place my 'startx' command somewhere, I'm not sure where.
3. And then, I need a permanent path for my 'start feh and play pictures' script, but I also need it to be on a flashdrive. So I think I might have to like add a 'mount flashdrive on boot' script in there somewhere, or put it in the fstab or something. I'm not sure if I'll be able to remove and reinstall the flashdrive (with updated pictures) with the system up and running, but I would like to.
Apparently a commandline Hardy install and X fit on a 1GB flashdrive, but how can I check my free space? I'm used to like, using konqueror or system monitor or something.
Is this because it says frame tty1, when I used tty2 in the /bin/autologin?
/bin/autologin has full permissions.
EDIT:
I realized that I can switch to tty2 by hitting ctrl+alt+f2. So I did. It does NOT display the frame login: _ prompt, but I also can't do anything. I can type whatever I want but nothing happens, it's not really a command prompt. Hitting ctrl+alt+Fn where n=1-6 takes me to a frame login: prompt except for tty2, which is kinda blank.
I'm confused. This might mean it worked, but I expected it to log me in and return to a command prompt.
Make sure you understand the instructions before you use them. "when I used tty2 in the /bin/autologin" - how did you use tty2 in that file? It does not specify tty at all - only in /etc/event.d you choose what tty you want to be logged in automatically so if you choose tty2 you obviously are not going to be auto logged in on tty1!
Make sure you understand the instructions before you use them. "when I used tty2 in the /bin/autologin" - how did you use tty2 in that file? It does not specify tty at all - only in /etc/event.d you choose what tty you want to be logged in automatically so if you choose tty2 you obviously are not going to be auto logged in on tty1!
Yes I do understand that. Sorry if I wasn't clear. What I meant was, I chose to be auto-logged into tty2 just like the instructions. I carried out the instructions exactly and tty2 no longer displays the login prompt, and all the rest of the tty's do. But I can't do anything with tty2, it's just like a blank screen I can type things into to no effect. This might mean it worked or it might not.
It didn't work - when everything is done correctly you will be logged in and seeing command prompt as normal. Check for mistakes.
You've modified 2 files: /bin/autologin should look like this:
Code:
#! /bin/bash
exec login -f daravon
(where daravon is the user name)
AND be executable;
And /etc/event.d/tty2 should look like this:
Code:
# tty2 - getty
#
# This service maintains a getty on tty2 from the point the system is
# started until it is shut down again.
start on runlevel 2
start on runlevel 3
stop on runlevel 0
stop on runlevel 1
stop on runlevel 4
stop on runlevel 5
stop on runlevel 6
respawn
exec /sbin/getty -l /bin/autologin -n 38400 tty2
No you don't need password anywhere. The user 'chaz' must already exist on the system - i.e. before you all the above the user 'chaz' must have already existed on the system. If not you need to add him.
Having said that could you post the output from your /var/log/auth.log file. The best way to do it is to run:
cat /var/log/auth.log | grep 'tty2'
and post it here.
I'm slightly worried if you followed everything correctly. For example, I don't understand how your /bin/autologin ended up chmoded to 777 (not that it matters - it still should work but ...)
Of course the #! /bin/bash line is there, sorry. It doesn't say exec login -f chaz in its entirety. I only posted the exec line because the /var/log/auth.log was complaining about exec format error.
to be explicit
Code:
#! /bin/bash
exec login -f chaz
I don't want to waste your time here. This is what I've done:
Created file /bin/autologin, containing
Code:
#! /bin/bash
exec login -f chaz
exactly as in post7.
I chmod 777'd it.
essentially, added the text
Code:
-l /bin/autologin -n
to /etc/event.d/tty2 so that it is now exactly like in post 7.
upon reboot this results in the blinking cursor screen on tty2 instead of the login prompt.
So i grepped from /var as per your instructions and got "can't exec /bin/autologin, Exec format error".
Well, at least we pinpointed a problem - albeit a strange one.
See if you can reproduce the problem. Log in as a normal user and create a file named, say, 'try'. Type in the contents of /bin/autologin (don't copy/paste just in case), make it executable and then (AS ROOT) try to execute it: ./try
If it works the output will look as if you just logged in. If the same error comes up then something in the environment of your system isn't right.
(By the way - these instructions are exactly how my Ubuntu Hardy is set up for autologin. Everything works as expected so I'm not advising you on something I haven't done myself.)
Last edited by klearview; 09-02-2008 at 12:56 AM.
Reason: Clarification - last sentence (in brackets) added.
Ubuntu comes with ABSOLUTELY NO WARRANTY, etc. came up.
I just less'd try and /bin/autologin back to back; they are identical.
EDIT: as a matter of fact they are not identical. /bin/autologin has a superfluous carriage return before #! /bin/bash. I have a feeling this is a problem; I did not see this before running less and noting the extra space.
EDIT: it works now, tty2 was logged in upon reboot. It was a sneaky extra blank line at the beginning of /bin/autologin. I'm sorry for wasting your time.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.