Demon Posted January 14, 2008 Share Posted January 14, 2008 (edited) Hi there! How do I start lynx at system boot, but to close it again so it doesn't work in background? I need to open a page with lynx at the system start, so I added this line in /etc/rc.d/rc.local: lynx 'http://www.some_address.com' This works, but then lynx stays working in background. How to close it after loading the link? Thanks in advance [moved from Software by spinynorman] Edited January 14, 2008 by Demon Link to comment Share on other sites More sharing options...
tyme Posted January 14, 2008 Share Posted January 14, 2008 how long does the page have to stay open? if it just needs to open and then close, you could always just add killall lynx to startup. But this is kind of a dirty way to do whatever it is you're trying to do...perhaps if you explain what you are trying to do we can find a better way. Link to comment Share on other sites More sharing options...
Demon Posted January 14, 2008 Author Share Posted January 14, 2008 (edited) It just needs to open the page, and then to exit. Edit: page loads very quickly... Edited January 14, 2008 by Demon Link to comment Share on other sites More sharing options...
Greg2 Posted January 14, 2008 Share Posted January 14, 2008 You could make a small bash script using sleep and pkill. Make the script executable and place it in /usr/local/bin. Then in your rc.local add /usr/local/bin/script-name. Link to comment Share on other sites More sharing options...
Demon Posted January 14, 2008 Author Share Posted January 14, 2008 You could make a small bash script using sleep and pkill. Make the script executable and place it in /usr/local/bin. Then in your rc.local add /usr/local/bin/script-name. Nice idea! But how to do that? :D (I'm quite familiar with shell scripting but never used "sleep" and "pkill" commands before...) Link to comment Share on other sites More sharing options...
Demon Posted January 14, 2008 Author Share Posted January 14, 2008 I've found a solution! It is incredible simple! lynx -dump 'http://www.link...com...' Link to comment Share on other sites More sharing options...
Greg2 Posted January 14, 2008 Share Posted January 14, 2008 I still don't know what you're trying to do. However you may want to take a look at this in a terminal lynx -dump http://www.google.com/ | head -n 17 you are piping the dump through head, exiting lynx, and adjusting the line output with the '-n 17' for the first 17 lines, you can change that for your needs. Please see 'man head'. Link to comment Share on other sites More sharing options...
Demon Posted January 14, 2008 Author Share Posted January 14, 2008 Thanks, but there's no need for this. Let me explain exactly: I have set a web server on my computer. I'm using free co.nr domain for that (http://www.freedomain.co.nr). I have no statical IP address, but my IP changes every time I restart computer. Now, each time I want to update my IP for the domain I must visit a link (provided by freedomain.co.nr, which contains my username and password) to update my current IP. Then I can access my domain name (www.demon.co.nr). :D Now it updates automatically! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now