Pages

Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

11 August 2025

18 February 2025

Twenty years exclusively using GNU/linux

 WOW, let me hear that again: WOW!!!

In short. I started dual-booting in 2004 and switched to linux full time in 2005. This means that I have been using GNU/linux for two decades!!!

The word "exclusively" is used for emphasis, since I have also been playing and using other operating systems. Mainly BSD and occasionally Solaris (or some sort of derivative). 

But somehow I always come back to debian, do not ask me why. Call it what you want, maybe because I am too used to it or who knows. Maybe it is just love at first sight (which is very likely)

Keep on rockin'

03 March 2024

Axyl, an OS with i3 by default

Last night I discovered Axyl. An operating system based on ARCH linux and focused on window managers. 

It works well with i3, bspwm, dwm, XMonad, Spectrwm and others, but the default one is i3.

I must say that I only tried it live. But it runs fast and it is pretty cool. I have not installed it because I am too lazy to learn ARCH. I tried ARCH once but only for a little while.

Their official website is https://axyl-os.github.io

As a curiosity. It was developed in Republic of the Philippines. But I do not know anything else about it apart from what I read on Wikipedia.


27 January 2022

The truth about the zsh

 I heard wonderful things about the zsh and the wannabe geek in me couldn't help installing it in some of my computers (including the raspi) and it might be yet too soon since I have only been able to play with it for a week or so, but I think I am ready to tell you the truth about the zsh (heed that I mean "my truth"). And bear in mind that we, wannabe-geeks, are so enthusiast that we say "play" instead of some other more appropriate, descriptive word. In the end it is all the same: Learning and having some fun.

 

Well, when you fire up zsh for the first time it offers you a menu. You can choose among several options, it offers to create a blank .zshrc or a default basic .zshrc according to the configuration chosen by your admin (read your distro) or configure a brand new .zshrc following some other items on the menu. Man, ain't that super cool?

 

I tried all the options, and my conclusion is, if you only have a basic configuration you can only do basic things, you need to add your own aliases, your own functions and this way it (apart from some enhancements on its own) behaves very similar to other shells, say bash or ksh.

When I say "basic" I mean I even had to add things like:

alias ls='ls --color'

alias grep='grep --color'

and so on and  so forth. I even had to add alias la='ls -alh' Man, that sucks. I thought zsh  was so clever and so cool...


But what happens when you add something like oh-my-zsh ? Man, that's a completely different world!!! That is where the true power of the shell comes to the fore. oh-my-zsh and probably other similar frameworks add dozens of super elegant themes and plugins (for git, for managing history...) many of he plugins add hundreds of aliases to your configuration. 

And apart from the fact that the default theme sucks big time (which really makes you want to dive in the pool of themes looking for a better one) now I can say that zsh is really and truly awesome. Much in the same way other shells can do great things if you add them great stuff.

Themes are basically customized prompts, some of them add nice info like the timestamp of commads or simply a local clock. I like the traditional user@host (+ directory) ~$ model:

For example: chals@jean:~/bin »

Here is where one of the plugins, git, is rad. When you enter a git repo it adds the branch you are in in the prompt. 

For example:     

chals@jean:~/git » cd soma/

chals@jean:~/git/soma(master○) »

Conclusion: I am enjoying zsh a lot and I really like it. I will continue playing with it to see how many good things I learn in the long run. In my raspi it is now the default shell and by the way, I need to customize the web-search plugin for my raspi.

02 April 2020

cpulimit YAIT (Yet Another Impressive Tool)

One of the truly impressive tools I discovered this week is cpulimit. It allows you to limit how much cpu percentage a process can use. It is specially indicated when running cpu intensive applications. In my case it is 'ffmpeg'.                                                                                                     
                                                                                                                                       
I use 'ffmpeg' on a daily basis to convert my .avi videos to .mp4. I often run the script at night with cron.daily but the problem arises when I need to run it during the day. Here comes cpulimit to the rescue:

 $ cpulimit -e ffmpeg -l 800 -b

Here is a quick explanation:
 -e ffmpeg (the process to limit)
 -l 800 (I have 16 cores: 800 = 50%)
 -b Run cpulimit in the background to free the terminal

Really impressive (and handy).

28 July 2017

Dillo: like a bat out of hell

I love text browsers. My favourite ones are lynx and elinks.
I love graphical browsers. My favourite ones are chromium and firefox.
I love browsers that somehow are in the middle like w3m-img or links2.

This is to say that I spend a lot of time surfing the web in different ways depending on what I need to achieve or the hardware I am using at the moment. It is not the same being connected to a powerful remote server or connected using an eeepc of 512mb of ram.

So instead of saying that I love them, it would be more accurate to say that I make an extensive use of all kinds of web browsers.

Among the graphical browsers I used to like was midori, it allowed me to do almost anything I could do with chromium but it needed less resources which was fine. The problem I have always had with midori is that I have often have to face one or other bug. In my eeepc everytime I scrolled down it opened a new tab and switched to it (oh man so annoying).

But thank god I discovered dillo. It is an incredibly fast graphical web browser that works like a charm in all my machines, especially in my less powerful ones, like the eeepc or any other old laptop/desktop machines.

Dillo has a certain number of limitations, that is true. It does not interpret javascript and therefore you lose a bit of some sites functionality. But this is a trade-off I am willing to accept.

Dillo has a number of configuration files under ~/.dillo that once tweaked will make your life way better. This is a list of the files you need to have in there:

* dillorc This is the actual config file. You can set many options here like the homepage, the colours you like...

* domainrc Dillo cross-domain request rules file. In this file you can configure which sites are allowed to retrieve data from third party domains.

* bm.txt The bookmarks file. You can add any bookmarks from the browser using its graphical interface, however the syntax is very easy and it is quicker to add your bookmarks directly to this file. For example:

:s1: Super cool sites
s1 http://www.chalsattack.com chalsattack
s1 http://blog.chalsattack.com/ chals' blog


* cookiesrc How to handle cookies. The syntax is also plain easy.
DEFAULT DENY
chalsattack.com ACCEPT
blog.chalsattack.com ACCEPT_SESSION

Note: Accepting cookies will create an additional cookies.txt file in ~/.dillo

Once everything is in place prepare to surf at full speed, be careful, you might get a ticket for speeding ;)

Now you can visit most sites on the web, check your mail and do almost anything you can do with other browsers. But you will not be able to for example watch videos or visit sites that exclusively depend on javascript.

Conclusion: The chalsattack.com version which was active from 2015 and 2016 made an extensive use of javascript, since I couldn't visit it with dillo, I re-wrote the site from scratch as you can read here

Next installment: a screenshot of dillo in action.

28 May 2017

raspi 3.5 inch touch screen

I got a 3.5 inch touch screen for my raspi. Loading the driver is pretty straightforward if you use raspbian:

git clone https://github.com/goodtft/LCD-show.git
chmod -R 755 LCD-show
cd LCD-show/
sudo ./LCD35-show

Awesome!!!


07 October 2015

torrents galore

This very week I switched to a new ISP. Having a connection of your own for the first time in your life makes a huge difference in terms of how you handle your own ports to play nicely with your software.

One of the things that I had always wanted to do was installing a torrent client which could run unattended. I have a lot of experience with mldonkey, which is a client for several networks, bittorrent among them. However, I was looking for a lighter client for my raspberry pi. I tried several clients: rtorrent, ctorrent, and I finally settled for transmission, or more accurately transmission-cli.

Many, or most clients, have both a GUI and a CLI, some of them have a web interface which is great for managing your downloads from a remote location. But I somehow prefer logging into the machine using ssh, opening a multiplexer instance (usually screen) and fire up the bittorrent client. This is damn simple for all of us who spend most of our free time logged into remote machines, for work or play.

Using transmission-cli is easy peasy:

 $ transmission cli *.torrent

Awesome!!!

Update 11-10-2015: A friend of mine suggested trying transmission-daemon and its web interface. I did. It is great,  even though it needs a little tweaking since it uses a different user by default (debian-transmission) and you have to give that user write permissions to the directory you want to store your files.

Update 24-11-2015:  Even though I use transmission-daemon and transmission-cli on my raspi. I exclusively use rtorrent in my laptops and servers. rtorrent is a really powerful and handy bittorrent client.

03 September 2015

dotfiles

I have tried several methods of storing and making my dotfiles portable across different machines. There are dozens of excellent programs out there but somehow, I didn't really like any of them. Until my friend demure told me about GNU Stow.

Note: In debian, besides stow, there is a package called xstow which stands for (extended stow). They both work in a similar way.

GNU Stow is not meant to manage your dot files. The typical area of action of stow would be /usr/local  Its main usage is creating links to files in differnet parts of your filesystem so that you can try different versions of the same program (or at least this is what I understood from reading this article: Using GNU Stow to manage your dotfiles). 

And reading that article is precisely how I learnt to use it to create symbolic links to all my dot files while they are perfectly stored in my home in a directory named dotfiles.

The main reason why I like it so much is because Stow does something similar to what I used to do manually. The fact of finding a program that does all the hard work for you automatically is really great.

This is what I used to do before:

I had a dotfiles directory inside my Dropbox folder which synchronized across all my computers. Inside that dotfiles directory I had several files, but I'm going to use the typical .bashrc as an example.

In all my machines I made a symbolic link in my home directory named .bashrc to Dropbox/dotfiles/.bashrc This way all my computers read the same file as if the file was a real one. Make no mistake, the file did exist, but it was only a link after all.

In order to achieve this I had to type:

 $ ln -s ~/Dropbox/dotfiles/.bashrc ~/.bashrc

Whenever I made a new installation, I had to do the same for each of my dot files inside my dotfiles directory.

I do not know if you can imagine it, but my dotfiles directory was a little bit chaotic because there are many dot files that have their own dot folder so there were files with a dot, folders with a dot and files inside the dot folders.

What GNU Stow does for you:

With Stow you can keep all your dot files perfectly organized inside their own directory as long as they are inside ~/dotfiles And stow will make a symbolic link to all the right places where the files should go.

For example. You would place your .bashrc inside a directory named bash inside your dotfiles directory. Then you would only have to change to your dotfiles directory and type:

 $ cd ~/dotfiles
 $ stow bash

And be done with it. Isn't this an extraordinary thing?

Note: keep in mind that in debian you can also use xstow instead. It works exactly the same. Thus:

 $ cd ~/dotfiles
 $ xstow bash

Now comes the best part of all. So far my examples have only taken a single file (.bashrc) into account. But sure your dotfiles directory is full of both dot files and dot folders. If you had to go one by one it would be as hard as making the links manually. Well, with stow you can use wildcards to make your life easier.

For example, if you have in your dotfiles directory the following directories:

bash i3 cmus filezilla elinks mr nano gitconfig tmux mc ssh screen supertux

In order to create symbolic links to them all at the same time you can do:

 $ cd ~/dotfiles
 $ stow *

And be happy :)

One important consideration is that in each directory inside your dotfiles directory, you have to keep the skeleton structure of your dotfiles.So that stow knows where to place them. I recommend you take a look at the article I linked to above in order to understand it better.

Another important consideration is that I created a private git repository to use a version control system to keep track of changes to my files.

17 April 2013

cmus

Throughout my relatively short (or long, it's hard to tell) experience with gnu/linux systems I have used a variety of console music players. If I remember correctly the first one I used, years ago, was music123, then mocmplayer...I had recently settled with nvlc because I found it very handy to start it on an ssh/tmux session to be able to control it from any corner of my network. See post on nvlc for details.
But now I have definitely and absolutely switched to cmus the single best console music player I know so far. Why?
Well, to begin with, I can still use it inside tmux or screen and use ssh to control it over the local network.



Secondly I can scrobble with it to http://libre.fm so that the songs I listen to are immediately published online.



cmus does not scrobble out of the box by itself. In order to make it scrobble I downloaded a script named last-cmus.py (linked from cmus official site) and modified it a bit. The process is pretty simple. Download the script to $HOME/.cmus, make it executable, edit username, password and url to use "http://turtle.libre.fm/". Finally, in cmus interface set status_display_program=/home/chals/.cmus/last-cmus.py


And last but not least. I can know which song I'm listening to at any time since it is echoed by conky.



Again, cmus does not directly communicate with conky. I had to download another script I found on the internet to make it work. Then I edited my .conkyrc adding this:
 ${color #ffcb48}Now Playing ${hr 1}

 ${color lightgrey}
 ${execi 2 /home/chals/Dropbox/bin/cmux-conky}
Notice that this time in order to make this setting more portable inside my own network, I added the script to my Dropbox folder so that I can access it from all my machines.


Awesome, huh!

28 December 2012

raspi at work



I must admit that I am really, really excited about my raspi (raspberry pi). I ordered it three months ago and during all this time I have spent a lot of time thinking about the endless possibilities that such an amazing piece of machinery could offer.
I have installed a lot of applications from the debian archive, perhaps the most outstanding ones are the servers: ssh, ftp, http and gopher.
In the screenshot you can see the result of:
 $ lynx gopher://localhost
and the moment of writing this post.


10 February 2012

New linux counter.

http://counter.li.org/ is going to be replaced by http://linuxcounter.net/ I already transferred my account from one place to the other and updated my machines information. This is the new image signature I got: https://linuxcounter.net/cert/388768.png


In case you can't follow that link for any reason. I upload the image here as well.

27 November 2011

On why has Gnome lost its way.

This blog post is just a personal opinion. I DO respect the work of the Gnome developers. I think they do an impressive job. To prove that, you can read my first review of Gnome 3
I started using linux in 2005. My first distro was SuSE which used KDE by default. After that I have always used Debian which uses Gnome by default. I would be lying to you if I said that I liked Gnome right away. But discovering Debian was 100% love at first sight. I thought that if Debian had chosen Gnome, then that was the right thing to do. I became a gnome man
Getting used to using GNU/linux was not easy at first, and as if that was not enough once I had learnt to use KDE I had to learn how to use Gnome, but I did not care, I just wanted to do things the Debian way.
I remember I used to make a “poor man, rich man” comparison between the two desktops. KDE was the rich man with lots of Kapplications and ease of use.Gnome was the poor man, it came with less applications and if you wanted to have a full multimedia desktop you had to visit your repositories on a daily basis. There was a bunch of gapplications but they were scattered across the net.
But that was not for the worst part of the story. The poor man started getting rich (=bloat) little by little but it was highly configurable at the same time. But that was just some years ago. The developers considered that giving too many options to users was not the right thing to do and they stripped Gnome from many configuration options. That was the end of the Gnome 2 desktop as we know it. I still can't understand the reasons for that. And I think that is where the gnome lost its way: Someone confused simplicity with usability.
I know from experience that keeping things simple is important. The kiss principle which I try to follow whenever I can. However, it mustn't be confused with the idea that “Hiding options will make the software easier to use” I think that it is rather on the contrary. It took me a lot of google time to learn how to turn the location inNautilus (2.30.1) into text (Ctrl + l) It might not seem important but sometimes it is. For example to paste it into the terminal. And so on and so forth.
Let's focus on Gnome 3 now. I mainly use relatively new nvidia cards which are 3D graphics capable. However my unstable (virtualized) and testing (real hardware) machines run into fallback mode. This means an important percentage of usability loss in your desktop. For instance the bottom panel remains there but it has no use at all and what is worse, you can't even delete it. See what I mean?
What? You’re thinking that sure there is a workaround for most things, that unstable and testing are mere transitory stages and that everything will be solved on time? and I do not know how many other real truths. Yes. I agree with you entirely, but man I am a really busy person. I do need an usable desktop. Can't be constantly searching the net to tweak the simplest of options...
But as I was telling you before. I do not blame anyone for this situation. I'll be the first to install Gnome 3 when it is usable again. But for the time being bye byeGnome 3, howdy Xfce 4.
(By the way I had to spend a lot of time to learn how to set the time in Xfce 4. I ended up reconfiguring tzdata to achieve that. ahem ahem)
I will never understand why you need to be root to set your computer time. Please, do not argue “security issues” Did setting the time ever hurt anyone?

11 June 2011

elinks

The first text browser I used with linux was w3m, then I moved to lynx and finally I discovered elinks (enhanced links). All three are great web browsers but elinks surely beats them all because you can do with it almost everything you do with a graphical browser, except obviously watching images or videos.

With elinks you can access your online accounts, you can open and close tabs, bookmark pages, review browsing history and in short you can browse the web as usual but without images which allows you to load pages faster. And after all if you are like me more interested in the matter than in the art you'll definitely give elinks a try. It's great. I have been using it for a while now and I'm still impressed. Besides even though there is a bunch of keystrokes to learn you can do most things using your mouse, so there is no real difference with any other browser. But as all command line programs it's the keyboard that counts.

By the way, you can see an instance of elinks if you click on the screenshots tag cloud on the right. Hope you like it.

03 May 2011

A "real" linux guru? nah, no way

This week my "ugly face" anecdotically appears on the home page of linux.com

Here is the proof:





The story goes that I published a tutorial/article about how to create a debian live usb. The tutorial was first published on my website but since not many people visit my site I decided to send it there.

I can't write code but I sure can write documentation or at least I try to do it as accurately as I can.

Besides, sharing a little knowledge is good.

25 March 2011

Adding Debian-live to Linux section at chalsattack.com


This text is going to be added at the end of the linux section (See linux tab above) after the Live CD??? paragraph:


Talking about live systems I can't help mentioning Debian-live. A personal favourite.

NOTE: Even though the project is geared towards teaching/helping/encouraging users to generate their own images, you can find several standard prebuilt images at their download site.

The Debian-live team produces what probably is the most amazing live system there is out there. Among other reasons because it is based on Debian. The images they create can be copied to Cd's, Dvd's or USB devices such as flash drives or even USB hard disks. These images can also be tried out using virtualization (qemu or vm). The ability to boot from USB devices allows you to try as many images as you please because of the rewritable nature of these drives. I have a 4 GB flash drive exclusively devoted to try Debian-live systems. I do it because they are really useful and secondly for the sake of learning new things.

My reasons for using debian-live systems:

-You can customize the images yourself.
-Images can be used to test hardware.
-Images come in handy as a rescue tool.
-They are nice guys :)

In order to know the project better I recommend you visit their website at  http://live.debian.net/ and in order to master your knowledge of their live system build I insist you read their live-manual at http://live.debian.net/manual/

Here is a list of what you can find in a Debian live system:

- It reflects the (current) state of one distribution.
- It runs on as many architectures as possible.
- It consists of unchanged Debian packages only.
- It does not contain any unofficial packages.
- It uses an unaltered Debian kernel with no additional patches.

If you are interested in contacting the members of the team you can find them:

-Sending a mail to their mailing list at debian-live@lists.debian.org
-On irc in the #debian-live channel on irc.debian.org (OFTC)

25 February 2011

Debian Live project

The last time I remember talking on this blog about the Debian Live project was when I installed Squeeze on my eeepc 701 4G.

But I'm pretty sure I have made references to the project a thousand times. It's a project I have followed from the very beginning and one which I really love. If I am not mistaken, now I'm just trying to recall from the past, the project was initiated by the live team led by Daniel Baumann after everybody out there was building debian-based live images without any official release available anywhere. Debian live came through to fill that empty space. The project has now produced stable releases out of Lenny and Squeeze. (There were no official releases of Etch) and at the time of writing this they are working on the production of live images of Wheezy. There is a daily, weekly and monthly build on the project website. There you can also find an online cgi builder to tailor the images to your liking.

One important thing to notice is that the project is geared towards helping users to create their own images as the team members focus on developement rather than simply providing pre-built images. Although they produce those images for practical reasons.

On http://live.debian.net/ you can also find links to different sections of development. Among them all I would like to point out the live-manual as I happen to be translating it into Spanish (Together with a partner)

In the manual you'll find everything explained in detail. But here are some of the reasons why I personally love debian live:

- Gives you the tools to build custom images and shows you how to use them.

- It is useful to test hardware. Images can be installed on different media from cds to usb sticks. You can boot them from the media without having to install anything on the hard drive. (You can save changes if you want to, using persistence)

- It is very handy as a rescue tool (That I can assure you)

- You can now use it to install Debian on eeepc's. You will definitely then need to check out the debian-eeepc project led by Ben Armstrong. I'll tell you about it on another occasion. It's gonna be soon.

02 January 2011

Squeeze on eeepc 701. Success!!!

Yesterday I told you I was trying to install Debian GNU/Linux 6.0 codenamed Squeeze on my tiny toy eeepc 701. I couldn't, but late at night I saw a ray of hope when I downloaded a hybrid-iso image from http://live.debian.net/ The installer seemed to work just right but it was time to go to bed.

Today I have successfully installed Squeeze on the eeepc and it was a blast. Seriously, the installer was a breeze. Awesome work again of the d-i team.

The process is plain. I copied the hybrid-iso image to a usb pendrive:

$ dd if=debian-squeeze-live-beta2-i386-gnome-desktop.iso of=/dev/sda

Then I booted the eeepc from the usb pressing Esc at boot time and selecting the usb drive. I checked everything was working fine in live mode and finally launched the installer (There is an icon on the desktop so you only have to click it)
That's it!!!

My model of eeepc only has 4GB of disk space so I have removed some applications I do not use with it (openoffice) and installed some I do use (abiword) It's a fierce fight for space!!!

The ethernet and wifi interfaces work out of the box. Now I only have to configure a new connection to use my Alcatel X060 usb modem when I am not at home. Here you can see a screenshot of the desktop with dropbox already at work.
Picture
And here is a picture where you can see why I love my eeepc so much. I even use it as TV with kaffeine(Watching Code Lyoko lol). The only nuisance is that I have to copy the firmware of the dvb-t usb stick to /lib/firmware. But that is just once; I have written it down here just as a reminder for other occasions in case I have to reinstall.
Picture

01 January 2011

New Year. Same old usual hard work for my machines!!!

First of all let me wish you a happy new year 2011.

PictureSecondly let me tell you that all my machines are working hard as hell as usual. Santa brought me a 22 inches led screen (LG Flatron E2240) for Odd. I used the old 15 inches screen to substitute fhopper's CRT. Now they both look really gorgeous. But beauty is just in the eye of the beholder!!! I have assigned them some hard work as usual. I improved some of my scripts and there they go.

But the real deal is that I'm trying to install Squeeze in my eeepc 701. Nothing out of the ordinary it seems, but pay attention to the process:

First I used clonezilla-live-1.2.6-40-i686 to make a copy of the entire system just in case things go wrong.

Second I want to install Squeeze. I use a live debian system with installer. The debian-squeeze-live-beta2-i386-gnome-desktop.img installer does not work. So I have to think of an alternate method.

Third I can't upgrade in the usual way (apt-get dist-upgrade) because I'm out of disk space.

Finally I've downloaded a live version of the debian installer and see if it works. The instructions are here
I'll report success or failure.

UPDATE: Failure. Keep on trying.
UPDATE(Last minute): I have downloaded another Debian live version (A hybrid-iso. Last one was an .img) This time the installer seems to work perfectly but I'll wait until tomorrow to install it.

10 December 2010

A few words on Lenny. Squeeze installed.

Some time ago I wrote a blog entry entitled "The best debian release ever (imo)" or something similar. Well my conclusion at that time was: 'Etch' but now after installing Squeeze if I had to write the article again I would conclude: 'Lenny' What's the matter?

I have reached a very simple conclusion. Once you have the system up and running; all software is stable and all config files and all scripts are ready and at work you just can't do without it. I love installing Debian. I have done it on many occasions. Sometimes it's a breeze and sometimes it is a pain, but nevertheless it takes a lot of time and effort to configure your system to your liking. That is one of the great achievements of Debian but at the same time it's one of its flaws since it is a bit hard and daunting for the new user. That is why newbies usually choose Ubuntu or Mint or whatever... But in the end with a bit of experience they'll come round and that's for sure.

I once read a sentence that made me laugh because I felt identified with it: "Ubuntu: An African word that means: I can't configure my Debian" it's hilarious but it's true. Ubuntu is too faulty. Debian rules. In a couple of years I suppose I'll be writing another entry reading like this: 'My favourite debian release: Squeeze' But all this could be summarized by saying: 'My favourite debian release? Answer: Any!!! As long as it is Debian GNU/Linux!!!! Forever!!!