One command line to rule them all [living without X via the framebuffer]
Linux - SoftwareThis 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
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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
One command line to rule them all [living without X via the framebuffer]
I am a card-carrying member of the Church of the Command Line. I would love to do away with X altogether, and just use the virtual consoles. What's stopping me is, of course, media. Images, movies and web browsing. I know about the framebuffer, and it seems promising but still kind of complicated. From what I've read it looks like I'd have to recompile my kernel everytime I wanted to change the background image. Not a showstopper, but more work than I would like.
Anyway, this post is about the possibilities, and hopefully some hints on how to get started. I know images are possible, and that there are codecs for mplayer to output to the framebuffer. What about web browsing? I've gotten into my gmail via elinks before.. although I can't remember if I was using the standard view or basic HTML.. probably basic HTML. Are things like inline images, javascript, embedded video and flash even theoretically possible in a console browser at this point? Or am I just talking fantasy here?
And, any guidance on getting started would be most appreciated, especially with background images. It looks like mplayer just needs the right codec and it'll work (correct me if I'm wrong please).. so that doesn't seem too bad. But the background images seem kind of involved. The only eye candy I even remotely want on my screen is a nice background image with the text floating on top. How can I accomplish this via the framebuffer? An overview of how it works would also be appreciated.
[sorry if this isn't the right forum for this post.. I wasn't sure if software or hardware made more sense]
[Edit: also, I should have made the title more descriptive, but apparently I can't edit that ]
No idea about the background images on a console only environment. I recall reading about it once, and as I recall it was fairly involved.
You can do graphical web browsing in the framebuffer. Links2 is the way to go there. http://pupnik.de/links2.html
Setting up the framebuffer depends on your distro and graphics card. I know in Arch, using the nouveau driver and an nvidia card, everything just worked after setting up kernel mode setting. No extra configuration with mplayer necessary. Links2 does require the gpm daemon running.
You might also be interested in dvtm as a console "window manager".
And of course screen is near indispensable. Although I don't believe mplayer will work while using screen.
You can do graphical web browsing in the framebuffer. Links2 is the way to go there. http://pupnik.de/links2.html
Really?! Amazing, thank you, I will check it out. I thought for sure that wouldn't be an option.
Quote:
Setting up the framebuffer depends on your distro and graphics card. I know in Arch, using the nouveau driver and an nvidia card, everything just worked after setting up kernel mode setting. No extra configuration with mplayer necessary. Links2 does require the gpm daemon running.
Hmmm, okay.. I am using slackware. I will look for some slackware specific resources. Are there any tips that are consistent between distros?
Quote:
You might also be interested in dvtm as a console "window manager".
Nice. I was planning on using screen, but options are always good.
Quote:
And of course screen is near indispensable. Although I don't believe mplayer will work while using screen.
Hmmmm.. does that apply to console viewing only? I started a screen session in urxvt, and launched a video and it worked fine. I wasn't viewing it in the terminal though, so maybe that's when it fails.
@ mattca -- if you cannot rename your thread by clicking EDIT --> ADVANCED and changing the title, feel free to hit the REPORT button and ask a moderator to rename it for you.
Oh, I think I'm wrong about screen and mplayer. I saw this blog post. I swear there was something that didn't work right with screen in the console. Maybe is was links in graphical mode? I don't know. Guess you'll just have to try and see.
And last (maybe) application recommendation, is fbida. It's the only program I've found to display pdf files in the framebuffer. (Needs ghostscript installed for that I believe.)
@ mattca -- if you cannot rename your thread by clicking EDIT --> ADVANCED and changing the title, feel free to hit the REPORT button and ask a moderator to rename it for you.
Sasha
Awesome, thanks! Haha, why didn't I think to try clicking on the advanced button?
And last (maybe) application recommendation, is fbida. It's the only program I've found to display pdf files in the framebuffer. (Needs ghostscript installed for that I believe.)
Oh man I didn't even think of documents. I guess I'll probably always have to fire up an X session if I want to edit, say, a word document But it's great to see that PDFs can be viewed in the console.
Oh man I didn't even think of documents. I guess I'll probably always have to fire up an X session if I want to edit, say, a word document But it's great to see that PDFs can be viewed in the console.
Ohoho, but you can. To a limited extent. You can at least extract and convert the document to text or a couple other formats.
MS Word Docs: http://www.winfield.demon.nl/
Oh my god, I feel like a kid on Christmas. Thank you so much.
Linux has given me a near-obsessive level of appreciation for plain text. It's so beautiful on a linux system, why would I want anything more around it? Window decorations, etc, to me, only detract from the beauty that's already there.
I don't really understand how the underlying technology here works.. is this a situation that is complicated because the tools to make it simple haven't been developed yet? Or is it complicated because the task is inherently complicated to perform?
ie, can we develop tools to make this a more natural and streamlined process? Or will it always be complicated?
I know how to code and this is something I'd love to contribute to, time permitting.
Here's a bit of Necromancy and forum witchcraft. Burn me at the stake at your convenience.
After a long time of trying different things to be a pure command line commando I have some things to tell you about.
Here is some gum for you to chew on as far as living on the command line goes. You can compile GTK to work in the framebuffer instead of X. There are actually tutorials on how to do this. Problem comes in when you try to use programs that are not entirely GTK.
This means that you could in theory run AbiWord in the framebuffer. I got frustrated half way though trying to compile everything in slackware and recompiling and reinstalling stuff all the time. But remember you cannot use openoffice as it is Java dependent and requires X.
I in my experiments with it was able to compile GTK for the framebuffer (not easy but not hard) but when I tried for certain apps like firefox they didn't work so great because of how it was designed to run in X.
But VLC, actually can go command line and work quite well in this regard.
Elinks is actually pretty good because you can extend its media functions pretty easy to use external players/viewers. Only trouble comes in when you want to use javascript based stuff. (flash, many websites)
Personally I tried to do all this with slack too. I have since then found that Gentoo and Linux From Scratch would do a much better job if you take the time.
The holy grail would be to make a distro specific to working on a command line using Gentoo or something as a base and including all those command line apps as part of the distro and using an installer instead of compiling all of that at install time.
I did this as an experiment to see if I could have a ancient computer do everything a modern computer could aside from 3d games and high-def videos. What I found is that you basically can do everything. Writing up a document is a pain in the butt with LaTex to me if I could take the time to compile abiword and all its dependencies that would be awesome. Now as it goes if you could get Firefox 3.x (maybe 3.6) to run properly in the framebuffer you'd be able to take advantage of stuff like google docs. Problem is I've only been able to get firefox 2 to run reliably. Firefox 3 and above use lots of X dependencies and make it hard to do anything with them short of rewriting large blocks of code.
Midori would be the only other one I could suggest that might be able to do that though I haven't personally tried it.
That's all I got really, if you're able to get somewhere with abiword, midori, or firefox please let me know. I'd like to see this stuff happen some day.
Last edited by Xovan; 10-07-2011 at 08:09 PM.
Reason: fixed a link
Distribution: Slackware (mainly) and then a lot of others...
Posts: 855
Rep:
@ OP try links -g <URL>, you would be amazed by the results. mplayer does play on a properly configured console. Atleast it playes (tested) the .mp4 and .avi (these are the only video formats I have).
There was also a tread about viewing images on the cli - but I am not able to find it. I am pretty sure it was solved .
(jokingly) you are on your wau to becoming an uber-geek.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.