Pages

Showing posts with label network. Show all posts
Showing posts with label network. Show all posts

11 August 2025

06 March 2024

xana and jean turned bookworms

 This week, apart from my daily chores, I upgraded two of my main laptops (hostnames: xana and jean) to bookworm (debian 12). Both used to run bullseye and I must say that the upgrade was pretty neat.

Be warned that before running apt full-upgrade I read their "official" guide that I found here because I had some bad experiences in the past trying to upgrade without removing other software that I had installed from different repositories. This time I did it right and the results were excellent.

xana took a little longer because I have many many packages installed (around 1800) it is an older laptop and you know, in time systems tend to get bloated. It took more or less one hour. I have to do some serious cleaning.

jean has around 1000 packages. It took more or less half an hour. 

I am really happy that both upgrades went so well. I only had to make one simple modification on xana after the upgrade. I use st (simple terminal or stterm) on both laptops but I had compiled it from source to include some modifications. These modifications were lost after the upgrade.

Now I use the default package as provided by the debian distribution. But I had to add some options to the command.

From now on lets see what good things bookworm has to bring.

06 May 2019

New lappy

Birthday present to self :P
Codename: jean
OS: buster




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!!!


08 December 2015

ES file explorer (Android)

My bq Aquaris 4.5 phone included a file manager called ES. At first I didn't pay attention to it because I simply didn't really care about it.

One day, after a system upgrade I was drawn to the renewed interface and icons of the application and started delving into the program's options and menu. It can do tons of things. The list is endless but...

Much to my surprise I discovered that it includes a built-in ftp server with which you can share files with your computer. Oh my!!! What an awesome discovery!!!

When you turn on the ES ftp server (called "Remote manager") you are given an address you can connect to using any ftp client. This way you can move your files, copy or delete them easily without the need of a usb cable or extracting the sd card.

Today I made a backup of all my photos using this feature and I can assure you this is not the only time I am going to use it. Love it!!!

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.

10 June 2014

More dual head

Another picture of my main desktop machine with its dual head. I have been exclusively using i3 for several days now and I think I have finished configuring it to my liking. I have changed the fonts, some of the colours, added several keybindings and what not. One of the things in the todo list was the background picture (which is hardly ever visible since i3 takes charge of the entire space). I spent quite some time until I found this one.

When all windows are closed, the left monitor screen background remains black. For the picture, I opened weechat, cmus and htop (which are some typical applications that I use all the time. Usually, I also have the mc or pcmanfm for file management) and the right screen shows this cute picture. I really like it, in fact I like it so much that I wanted to publish it on my blog right away. I hope you like it too.


21 January 2014

MiniDLNA on a raspi

One of the best things in life is that you never stop learning and/or discovering new and exciting things. Today was a great day in that sense. I discovered the set -u builtin which warns you if a variable is not set and also that it is good to talk to people to share ideas. (I've been talking to a cousin of mine for a long, long while this afternoon, interesting things).
But in respect to software, the discovery of the day/week/month and probably the whole year (hmm) was MiniDLNAminidlna is a streaming server that can serve your files across the network to any device that supports the UPnP (Universal Plug and Play) protocol.
I was looking for a way to stream media from my raspi. Since I had only tried to do it once and it was with vlc, I installed vlc in my raspi and tried to stream video with it but it was almost impossible. It turned out to be a too resource intensive method.
Then I used a clever way of streaming media from my raspi to my network. I copied the files that I wanted to stream to /var/www and accessed the contents of that directory over http, either using vlc or just a web browser. But no matter how clever this idea is, it is not very handy. You have to do a lot of manual work.
Today I asked on irc and a friend of mine said he used minidlna. I installed and configured it follwowing a tutorial I found on the web. Basically what I did was to edit/etc/minidlna.conf with several settings that apply to my device. It is pretty simple and straightforward, and in case you do not know what to put in there, you can always use the default settings.
Then from another computer I launched vlc and went to View --> Playlist --> Local Network --> Universal Plug n' Play and there I could see all the files that I wanted to share. Impressive, huh?
And the best thing yet to come, minidlna does not stress your raspi cpu at all. While working, it only used 0.3% of the cpu power.
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2966 minidlna 20 0 37332 5824 552 S 0.3 1.3 0:00.22 minidlna

23 December 2013

Screenshot of the week 7

A few days ago I wrote a tutorial on how to configure weechat's relay plugin through a single port for all servers. I published it on my phlog, so I'm not unnecessarily going to repeat the information here. The link is here in case you are interested: (Warning: gopher link!)
gopher://sdf-eu.org:70/1/users/chals/phlog/2013/./12-15-13
Since the relay is working so fine, I decided to take a screenshot of the weechat instance running 24/7 with the configured relay running in a remote server and the other one of my local instance running in my raspi.
Just in case somebody is wondering why I run two instances of the same program both locally and remotely, the answer is plain simple. In my local instance I can configure and use as many plugins and scripts as I like whereas things are not so easy on the remote server. For example the aspell plugin which is really handy when typing fast or the buffersscript, just to name a few.


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!

27 January 2013

Using a raspi as a switch


Everybody is asking me why the heck I got a raspi. I proudly show it to all my family and friends and they all say:
 "What's this? What's this for?"
(I do not have the energy to explain them what a gopher server is, and why everbody should have, at least, one.)
I imagine that everyone has a different use for their raspis. I am having so much fun playing with it since I received it that I should write a post every single day. But unfortunately I do not have the time to do it :-(
Today I have yet found a new use for it, perhaps one of the best uses I could think of, even though I didn't have that idea in mind when I bought it.
I have a network server that I only use occasionally. I turn it on when I get home if I need it, but I always turn it off at night. One of the reasons to get my raspi was the possibility of having a machine connected 24/7 and also reachable through the internet, for example, using a smart phone.
Today, I was away from home with my netbook (eeepc 701) and I needed to start a build on my server. I thought it would be excellent if I could start the build before getting home and this way the first test would be done by the time I arrived home. Well, suddenly I got the idea:
I often turn the server on using 'wakeonlan', I have got several aliases to mount devices on my network and do other similar things. So using ssh from my eeepc I logged on to my shell account at sdf-eu, from there I connected to my raspi and installed the wakeonlan package (I didn't have it installed there yet) but I had my.shell_aliases in my $HOME. From there I turned on the server and opened a shell to start the build. When I got home the first build had failed and stopped, but it saved me a lot of time because when I arrived I could start another build right away.
I know that the idea is not the state of the art. Many IT guys do most of their work jumping from one server into the other all day long but I'm happy to have come up with such a nice trick: Using the raspi to turn on and off other machines in my network remotely. From now on my raspi will be one server to rule them all.

26 January 2013

Here comes the squid


I have added a new machine to my personal collection. Its hostname is squid following my naming convention. See my Profile for more information.
It has a 64-bit processor (athlon), 2GB of ram and two hard disks. It is a little bit old but it is really fast. Today I installed debian wheezy with the b4 installer. Everything went fine and smoothly.


Welcome to my network, squid :-p

01 January 2013

curlftpfs


Having a raspi on the network is a fantastic thing. It has so many possibilities that it seems endless. One of its constraints, however, is that it has not got a lot of available space. Well, it can have as much space as you can afford but big sd memory cards are expensive (or at least more expensive than the raspi itself) An sd card of 32 GB costs 39€, way more than the raspi itself.
Solutions:
  1. Attach a pendrive (or several of them using a hub) to have a bit more spacehmm similar situation. This might be expensive and even ugly.
  2. Mount a network drive as if it were a local storage device.
I chose option 2. I normally use sshfs to mount drives on my network or even remotely. I have an ftp-only drive that cannot be mounted using ssh. So I had to install curlftpfs. It is extremely easy to use.
  1. Make sure your user belongs to the fuse group. If not:
    $ sudo adduser < user > fuse
  2. Then make a mount point.
    $ mkdir -p ${HOME}/nas
  3. Mount it.
    $ curlftpfs -o allow_other < user >:< password >@192.168.2.30 ${HOME}/nas
Nice huh?
To unmount it:
$ fusermount -u ${HOME}/nas
You can now either add the mount to fstab to make it permanent (not really necessary in my case since the raspi is up 24/7) or create an alias.
alias nasmount='curlftpfs -o allow_other < user >:< password >@192.168.2.30 $HOME/nas'
alias nasumount='fusermount -u ${HOME}/nas'
Now the best part of it. I mount the ftp server in my raspi but I also mount my raspi over ssh in my laptop so in the end I have my ftp server mounted in my laptop out of the box. Neat!!!

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.


04 April 2012

Git on Dropbox

The idea had been running round in my mind for some time. I move from one computer to the other all the time. Usually up to four different machines in the same day. I can never know or be sure of where I'm gonna be when I need to make a commit to one of the five git repositories I work with.

Ideally I should have all my information centralised in just one single place. This makes it easier to work with certain types of files, but it also makes it easier to have security issues and/or risk of data loss (even if you backup on a regular basis you are never ready for a hard disk crash or any other undesirable occurrence).

So as you can guess I used to have several clones of the repositories and I had to pull several times to keep them up-to-date. Not very handy :-(

I read that some people used their Dropbox folder to have git repositories. And well, as you can imagine I just had to try it... :-)

So far I have just moved my blog's git: chals.branchable.com I made a commit from my laptop and now I'm writing this post and about to commit from my desktop. If it works fine, I'll move all the other repos.

Fingers crossed...and push! :-P


07 February 2012

nvlc - ncurses vlc

Last week I discovered nvlc installed on one of my Debian laptops. It was in fact installed in all my Debian boxes. I scratched my head at first because I didn't remember ever having installed it and what is more, I discovered that it isn't even a package. It comes with vlc player.

Well, I played with it for a while just to find out that with nvlc you can do almost everything you do with vlc. It can for instance, write to the framebuffer so you can watch video. What is more, having a curses interface makes it easy to use. It was nice and that was it. However today I thought about a great use that I can give to it.

I'm right now sitting at my eeepc *yumi*, but my music collection is in my main desktop *odd*. From here I ssh into the box and launch *nvlc*. Then I can select the songs I want to listen to, raise the volume and do other things, as if this small netbook were  a remote.

Awesome isn't it?. nvlc, welcome to my pool.

Here is a screenshot:

17 December 2011

Double trouble.




I really didn't know which picture to choose, so I uploaded both. I hope you like them.


22 April 2011

live-server route

After configuring my live-server to use a static ip using live-boot option ip= I had a route problem.

Using traceroute I got the message Connect: Network is unreachable

I tried netstat -nr

And then /sbin/route add -net 0.0.0.0 gw 192.168.2.1 eth0

And now it works!!!