Ah, stupid typo
I was getting pumped up that there was a new interface I hadn't heard of. Generally speaking, even if I don't "need" non-default options, I'll have to eventually tweak with something. It's in my nature to poke and prod things. Thanks for the info on that one Unia, as many times I get especially comfortable doing things a certain way and not looking into all of the options.
Day 25: sc (spreadsheets can be cool)
I sometimes realize that my particular brand of humor is self depreciating, but it's actually an "anti-elitist" take on life. It would be really easy for me to become one of those guys who simply tells people "RTFM" and doesn't share things that I learn on my own. Where as a lot of people are "Help Vampires," there are some genuinely sincere questions that some people don't know, and I think it's good to try and help others. The reason I tend to shy away from help and support, though, is that I'm lazy when it comes to other people's issues and end up not really being any help at all. When I do try to help someone out with an issue, as rare as that may be, I cannot stand when someone fails to read the previous info and just slaps some BS suggestion into print. This is a short caveat from the normal flow of the reviews to offer a sincere "thanks" to those soldiers who brave everyone's problems on a regular basis. I couldn't do it day in and day out like some of you guys.
On to the awesome!
It's hard to get excited about spreadsheets. I've never seen an energy drink advertisement with a guy who is wearing Under-Armor and running shoes slam his Vitamin-Enhanced Caffeine-Enriched-Sugar-Juice + coffee and throw on some Dubstep and sit down to maintain his spreadsheet. They're not that kind of exciting. I had a professor once who might have gotten really excited about spreadsheets, but he was also covered in chalk around 90% of the time and didn't have a sense of humor.
Writing about spreadsheets isn't really exciting either. I had to choose between Teapot and SC, and SC won out by a slim margin just because it's a really brutal little guy. Pretty sure this one is in the Debian repos, so you won't have to build it like I did. When it opens up, you've got a row and column layout just like any spreadsheet should. The key bindings are vi-influenced, so you can use the arrows (if supported) or "hjk & l" (also, C^n, C^p, C^f, C^b work...I didn't know this until I screwed up and started using emacs chain commands out of habit) to navigate. If you want to jump to a cell, "g + d3" for example would move you to cell D3. C^g will interrupt a command chain if you've made a mistake in your key presses (which I used often while playing with it.) "ir" and "ic" insert rows and columns.
To enter in a number, string, or equation, the "=" key will pull you out of control mode and allow you to edit the individual cell. You can even use "<" and ">" to justify strings within each cell to the left or right.
I ran across a pretty decent PDF that introduces a lot of what's possible in SC from an economics page. I can just see these guys sitting around, slamming Redbull, moshing, and talking about how to add hex color to a cell. On the other hand, if you're into cli or no-X systems, this is really a must-have program for spreadsheets. Not that it's fun, but neither is a wrench. You use them to do things, not to just enjoy on their own.
If you're interesting in further reading on SC, there's a great write-up over at the Linux Journal regarding SC. I could simply detail hotkeys or how this one is programmed, but I'm sure that if it's somehting you'd be interested in, you'll go get it...and by proxy, use it to do some EXTREME spreadsheeting. It's pretty cool.
Day 25 pt 2: --dstat
Or....the day that Joe decided to start acting like a Crunchbanger!
I have been here a short spell and in this time I've learned a few things. First, if there's one thing that the Crunchbangers LOVE, it's "ricing desktops" (also known as "Customizing" because it's possibly more politically correct). The first append to this list would be that specifically, Crunchbangers LOVE Conky. There is more information on Conky on the #! forums than possibly anywhere else on the internet. For whatever reason, a system monitor is like one of the signature parts of any desktop configuration in the Crunchbang world.
Well, from cli, we can't have conky. It ends in null termination because the argument "top, left, right, bottom" gets the value "NO" which is going to be a minor problem. So, since I want to be cool and fit in with the cool guys, I need a totally sweet system monitor that I can put on my desktop so that when I take screenshots, everyone can know that I'm using about 1% of my total system resources...but it only counts if it's colorful and awesome looking and shows that I have taste in artwork and drink high quality merlot and smoke cuban cigars while listening to John Coltrane while taking my scrots. So I broke out Aptitude from my no-X sid and started looking around for something that would fit the bill. Check out what I found:
Man, that's cool. Dstat is at its core, a python implementation of vmstat, iostat, ifstat, and netstat information. It simply sits there and clicks off system stats at regular intervals. Now, my fbgrabbin' (new cli slang for "scrots", I'm making this stuff up as I go) only shows the default setup, but within my first few minutes looking into it, this little guy was DESIGNED to be hacked. I thought about listing all of the options, but it was far simpler for me to just kick over to a different tty and post the output of "dstat --list" for you to just take a glance at.
Seriously, read that plugin list!
I also included a short snippet of code from one of the plug-ins. They're all pretty much Python scripts with decent commenting, much like what you'd expect from a system monitor that was designed for customization. This is possibly the jumping-off point that I needed to start REALLY getting into customizing my very sparse no-X desktop. I plan on playing around with some of the multi-color setups (like what Unia outlined above) and seeing about getting mplayer to give me decent feedback in the framebuffer. As wux mentioned above, it doesn't "just werk" (tm) (c) OOTB, but I will see if I can outline what all it takes for me to get it to do what I want out of it.
Beware scrot-bangers! I'm coming for you.
you really need to pimp those colours, joe...
maybe not like my 'goldmember' server. (GSlob colours)
did you build fbgrab, or get a .deb for it? couldn't find it in the sid repos only fbcat... odd.
you'll notice there's no command left over in that grab, by accident i used fbcat in X and it pulled tty3!
oh here's one (non productivity cli app) bacon dropped -
sudo apt-get install bb
Last edited by wuxmedia (2013-05-23 22:21:55)
@ wux. Just use the tar.gz for fbgrab. It's got like 3 dependencies that aren't too difficult to satisfy. The only issue that I may have created for myself is using kernel modesetting for the framebuffer. I've not been able to come up with a way to get mplayer to open yet. I spent a few hours on that one today, and I can't seem to get it to open my -vo. It's possible that I have created my own monster there in an attempt to make capturing screens easy. O_o
Day 26: Graphical Tiling WM in Framebuffer
aka: Hold on to your wigs ladies, this is about to get rough.
Okay Bangers, normally, these things don't take too long. I slap together something small, showcase it, tweak it, and then roll on. This one has been on my mind and I spent HOURS making it happen. It started off simply enough, I have to prove that cli interfaces can look good. I first off changed my PS1 variable to something that was a little nicer to look at. I then got back to trying to think about some of the eyecandy that is possible. Since we looked at a simple stat counter yesterday it got me to thinking, "I bet that I could do more."
So I knocked out a little CPU monitor in curses that is formatted to fit in 1/8 of my screen. This wasn't a big deal, except when I went to troubleshoot it. I brought it up, and it was reading both of my cores at 1%...forever. I went back and checked my coding at least 10 times, convinced that I must be missing something. Turns out, as one of them FINALLY went up to 2%, that no...I'm just really not using that much processor. I should have used floats instead of ints because of the rounding. Dstat showed the same thing, 99% free most of the time.
So, now I had that, I got to thinking "If I can get photos in the framebuffer, I should also be able to set a desktop wallpaper without X." This is where it started to get really ugly. I first needed a way to write the entire tmux layout over a pre-existing framebuffer. I found a pretty easy answer in fbterm, which is a terminal emulator designed to run in framebuffer mode. Cool, it looks like crap right now, but I'll configure it once I get this whole "background" thing taken care of.
So, I did a little research and found a guy running Crux linux who had used fbv to set a framebuffer image as a background to his terminal. Since fbv isn't a debian package in any shape, I first tried to do the same thing with fbi. Well, fbi puts this disgusting "what file am I looking at" thing at the bottom of the screen, and I couldn't figure out how to get rid of that...plus, it doesn't like to integrate with other commands well and crashes out like a drunk in a race-car.
I went back to looking at fbv, and decided to give it a shot. I found some source code on someone's github and pulled the tarball. I unpacked that and checked dependencies. Well, 1 out of 3 of them are in the Debby repos, so I grabbed it first. Then I went to try to at least find some .deb 's of the others. No luck. I found one and managed to compile it without much difficulty from source, and then cam "libungif." This thing was DESIGNED to make you pull out your hair (I'm luckily shaved bald, but...if I had hair I would have certainly pulled it out." I found the 4.1.4 file and spent the better part of an hour creating directories for the make file to package all of my cool TINY sources into. Finally I got to ./configure -> make -> make install and surprisingly...it worked. Now, I went back to my fbv package and started the same process for it and, what do you know (FATAL ERROR.)
I managed to track down that the make was trying to put things in areas that I didn't yet have, so I put out a nice little roadmap for it to install into. It only took another few minutes to created the needed directory structure, and on my final fun, fbv installed. (Keep in mind, this is all command-line based...so no fancy drag-n-drop of anything here.) I was so excited that I almost forced myself into a heart-attack by trying to just launch "fbv" instead of providing an argument for it. After swearing under my breath, I realized that I'd simply jumped the gun and that the man page wasn't another error message. I added the path to the file I wanted and fired it up, and BOOM I had a full-screen image in the framebuffer.
To get it to pull this up and then launch my fbterm, I hacked in this little bash script with emacs.
#!/bin/bash # fbterm-bi: a wrapper script to enable background image with fbterm # usage: fbterm-bi /path/to/image fbterm-options echo -ne "\e[?25l" # hide cursor fbv -ciuker "$1" << EOF q EOF shift export FBTERM_BACKGROUND_IMAGE=1 exec fbterm "$@"
I ran my script, and to my great pleasure, I was presented with my new PS1 over an image outside of X. I went ahead and used my normal TMUX layout to showcase this so far. It's a terrible image, the fonts look horrific, and I need to redo my color scheme...but finally:
EDIT: I feel the need to once again point out...this is my fbgrabbin' in no-X Debian Sid 3.8.whatever.
Last edited by DebianJoe (2013-05-24 16:19:24)
So did you PKG up the .deb?
I didn't, sorry. Once I got it running, I threw up a fbgrabbin' and put the laptop away for a bit. I'm tired of looking at it today. I figure that from here out, it will be a LOT easier to configure things, though. Thanks for the kind words.
Day 27: Playing with colors and fonts
I believe that it's official, everything I make is ugly. I tried out all sorts of different colors and fonts, and I ended up with monospace and cyan. I have got to be the worst at this part of it all. Perhaps I sould consult Gslob on how to make things look better. I used telnet to connect to an i-ching server to ask what colors I should use (pictured in the far-left terminal of today's fbgrabbin'.)
It says, "Abundance has success, the king has abundance. Be not sad. Be like the sun at midday. Both thunder and lightning come: the image of abundance. Thus the superior man decides lawsuits and carries out punishments." Cool story, i-ching across telnet, but WHAT COLORS WOULDN'T LOOK SO BAD?
Perhaps, it's the background...let's try something else. In theory, I should be able to change the argument for my bash script and get a totally different photo in the background. I'm going to get on a box with a web browser that actually looks nice to find a new one. Then, I should be able to "wget" it and load it up into the framebuffer. I don't get the option to scale things (or at least I haven't figured that part out yet.)
That's a little better. I can at least read the text on her. I may get an export from gimp where it's darkened up and see how that looks soon enough, but this takes far longer to configure than a GUI equivalent.
Fun fact: If you search for "Bond girls" you'll get a bunch of women who are still younger than me, and they're all posing with this guy in a tux who isn't Sean Connery. I do not approve. Next, I may see about getting a web-browser with some framebuffer support up and running. Also, if anyone has suggestions for colors, I'm all ears.
Day-28...settled with pretty simple colors, but now adding functionality.
One of the things on my TO-DO list is to "shine up" my little system monitor. I need to start tweaking that little guy like the conky-config bros/sisters do.
Beyond that, I tried using a bunch of the different console colors provided in the link above. I even came across the fact that once you're booted into fbterm, you can use (echo -en "e]P7######") where the "#'s" are your color code to shift them on the fly if you set text-fg coloring in .fbtermrc to be "white-7." I attempted a lot of different setups, but honestly, I like light blue. I ended up sticking with a more "mild" version of cyan for base text. Another cool thing that I found while playing around is that you're not limited to normal console fonts using the fbterm/tmux setup. I like small fonts with ease-of-readability, but you can get pretty crazy with fonts because it relies on "fontconfig" for the potential for fonts that can be set. Perhaps some day, a guy with an eye for art will pick up where I leave off and make this entire setup really shine.
So, I decided to play with some framebuffer-based applications (and thus sent my background to a computer with GIMP on it to darken it up...and made my wallpaper a bit more mild). Mplayer is officially kicking my teeth in. I've tried everything that I have been able to find, but for whatever reason, I cannot get it to latch the video driver output. The closest I've come so far is running it as $->mplayer -vo fbdev foo.mpg which does start it up and it begins to set resolutions, etc before crashing out with a "FATAL: cannot initialize video driver -vf -vo" error. I'm not done with it yet, though. There's something that I'm simply missing as I'm now certain that I can get applications to give full framebuffer output.
I know this because I used links2 in framebuffer mode (and am using it right now to post this) and it looks amazing. I know that one of my first reviews was on elinks, but if you're going to spend a significant time in a no-X environment, it's worth it to get links2 up and running. Text only is great for lots of things, but it's always been a little rough for web browsing. Links2 launched with the "-g" switch from framebuffer makes a fantastic argument that you don't really need X at all.
Looks pretty freaking great!
When it dumps you back out of "full-screen" browsing mode, there's going to be a ton of text left slapping you in the face much like what you'd expect from a GUI program working with a terminal enabled in the background. If you are on the same page as I am about actually using a no-X system (be it for practical, or aesthetic reasons), then this can be a bit annoying. I ended up using C^A^F1-7 so that I can hot-swap TTYs like a multi-desktop interface and simply picking one to only run links2 in. That way I can just thing Ctrl+Alt+F5 == INTERNET, and roll along my merry way.
I am still working on getting a little bit more customization on my desktop without resorting to too much relying on framebuffer-based imaging to make it look good. This is and has always been about extreme minimalism, so if I can get the same functionality without having too much overhead, then that's all the better. I ran across TTY-clock and it is a decent way to get some added flair into fbterm/tmux without really costing you much as far as resources are concerned. I need to recolor it (probably to some shade of \033[1;34m) to get it to fit in a little bit better. I probably need to do the same to my tmux bar and panel panes. I don't want monochromatic, but that shade of green it just a bit much.
Until later, I've got to play some more with mplayer.
Note: I just looked at my screenshot, and I'm up at 5 am tweaking cli colors. I think I made need professional help.
Edit: In a moment of utilitarianism, I just realized that for some major pimping: I can use the bash-script for launching fbterm with different arguments to actually set a static framebuffer background for each tty that's being used. In #1, I can run tmux for window control, in #2...perhaps dvtm for dynamically allocated tiling, and they'll be instantly identified by the image in the background. Oh, well, that pretty much deprecates all of the functionality of something like AwesomeWM by allowing both controlled and dynamic positioning of window placement, but without the overhead of X.
This is getting fun now.
Last edited by DebianJoe (2013-05-26 11:24:43)
oops - ignore my post in the screenshots.
looks ace liking the tty switching, i do that. tmux is growing on me.
i'm still using byobu - which is like fisher-price my first terminal multiplexer good for light work.
have you looked at netsurf. it's a bit weird but it renders CSS on the FB!
not much interoperability that i can remember, like no copypasta-ing.
Yes, I did take a look at netsurf. I went with links2 because of documentation more than anything. I may have to give it a shot, though. I was really impressed with how nice L2 looked. Mplayer is really the next big thing on my bucketlist, and I have had ZERO luck being able to figure out why it's not working for me yet. The source on that one is pretty ominous to read through to try to figure out what all it's not getting from my set-up that it might need.
need to get it to go fullscreen,...
no idea if this will help, as you're on sid too, should be similar
might be a bit cheaty, i installed everything that had directfb in the repos... then i attempted to install the xserver-video thing already had them, ran;
sudo mplayer -vo fbdev2 yourpath/vidfile
you'll notice i switched to another tty and fumbled for the fbcat command
Last edited by wuxmedia (2013-05-26 17:05:11)
nailed that too,
-zoom -xy (width of screen)
or -zoom -x (specificsize) -y (again) - **watch out - overrides aspect ratio...
i was gonna post the fullscreen scrot, but it's just full screen video
Nice. Thanks for the feedback on this one.
I got the bashed out DVTM in tty2 working now. I am still working on learning all of the hotkeys. Have you decided to join me in the insanity now Wux? The rabbit hole gets pretty deep.
^ thanks for the inspiration and encouragement
OK to round off the no x (but pretty) heres a thing you might have seen;
qingy FB graphical login - it's in the repos and one has to replace getty in /etc/inittab with qingy, which i've done, but i can't get it to work....
oh video can be placed where you want on the FB too, i think something to do with the scale command, i accidently got the vid half way up the screen... handy for tmux.
I found also that it is persistant over ttys, even not logged in ttys. bit weird. no danger off buffer fluffing where the text flickers through the vid.
Last edited by wuxmedia (2013-05-26 18:26:05)
just noticed, was looking at fbterm - kmandla ldgendary blog comes up. it was 3 years to the day when he published this same (ish) technique (although he didn't have to compile fbv, like our Joe)
That's pretty funny, because that's the guy who I quoted as "some guy running Crux Linux" above. If it wasn't for his screenshot, I'd have seriously questioned the possibility of this process working at all. I've made some observations about the available information once I really jumped into this project. The information gets a LOT more sparse, and the "man" pages are really your best friends. The fbterm man pages are where I found the skeleton bash script for chain loading fbv/fbterm, and that's what led me to using fbv instead of fbi. By looking up fbv/fbterm, you'll run into kmandla's blog...because there's just not that many people talking about this on the internet. The Raspbi guys are stepping off into it, but architectural differences make for some of their processes being significantly different.
I noticed that Arch linux has fbv packaged in their core repositories, so I guess there are still some astronaut/cli-cowboys out there somewhere. I have grown to really enjoy some of this, as you'll get just enough information to let you know that it "can" happen, and then it's up to the user to try stuff until something works. There's an inherent sense of adventure in doing that.
As a listing of what we know is possible (still possible) so far:
1. Using the Framebuffer to set backgrounds.
2. Using the FB + fbterm to allow the Linux terminal to support more advanced font-rendering and colors.
3. Once fbterm is up, you can choose terminal multiplexers and cli-tiling to create a window-like system.
*note, tmux, dvtm, and GNU screen are the ones that we know work well.
4. Use the framebuffer to display video and html webpages.
5. Use cli-based programs to do at least 95% of what we'd do within an X-environment.
I'll look into qingy, not because I feel that we really NEED a fbuffer graphical log-in, but just to see how to set it up to work. Thanks again for your help and feedback, Wux.
Edit: So, I assume that your Qingy is simply booting to a blinking line? That's what I've got going so far. I left tty6 on getty, and it's the only one that is available afterwards. If you leave it up for a bit, does it come back to tell you (INIT: cannot execute "/usr/local/sbin/qingy" ?
Last edited by DebianJoe (2013-05-27 13:51:01)