Manjaro had a major update at the end of April 2016 and after that my XFCE theme looked very strange.
In this thread I found that GTK3 was updated to version 3.20 and my current theme doesn’t support it. Solution: choose a different theme.
I chose the vertex-maia theme since it looks similar to my old theme. With Xfce Theme Manager I set this configuration:
- theme: Vertex-Maia
- windows borders: w8
- icons: Menda-Circle
- cursors: aero-drop
If you are a peasant like me living outside of the US but you still want to listen to Pandora Radio, which is only available in the center of world (USA), then what can you do?
There is a very simple solution now. Opera offers free VPN, built directly in the browser. You can choose between German, Canadian or American VPNs. Currently this feature is only available in the development version of Opera. So here are the steps:
- install Opera (development version)
- install Flash player for Opera (Pandora is a Flash-based website)
- visit pandora.com just to see that you are kicked out
- enable VPN: with Alt+P you can access the Settings, go to Privacy & security, then enable VPN
- Open an arbitrary site. On the left side of the URL bar you’ll see that VPN is activated. Click on it and select United States.
- Visit pandora.com again. Strangely, you are let in this time…
This article (https://freedom-to-tinker.com/blog/vitaly/gone-in-six-characters-short-urls-considered-harmful-for-cloud-services/) just gave me an excellent idea…
In a nutshell: these URLs are so short that you can explore a lot of them with a simple brute force approach. Just generate a random hash and there is a high chance that it points to somewhere.
Example: with bit.ly I generated a link:
http://bit.ly/1bNGJd3 . I tried to modify some characters in the hash and in most cases it pointed to somewhere…
At http://planetb.ca/syntax-highlight-word you can find a nice syntax highlighter. It supports Python, HTML, Java, and several other languages. The rendered output can be copy-pasted to a Word document and it’ll look the same and remains editable in Word. Pretty cool.
It’s also useful if you want to make a screenshot of the syntax highlighted code. Here is an example:
Thanks to Peter F. for the link.
I like the bittorrent client Vuze but it crashes on some of my machines after a while.
I wrote a monitoring script that is checking if vuze is running. If vuze dies, the script restarts vuze automatically.
The source code is here: https://github.com/jabbalaci/Vuze-Restarter .
I wrote a doc about it on GitHub: https://github.com/jabbalaci/DigitalOceanNotes . Following this guide I can set up a virtual private server (VPS) in 30-40 minutes.
A few days ago I wrote about the awesome tool screen. Then, some of my readers namely “i90rr _” and Rodnee suggested that I should try tmux (thanks for the tip). Actually, I tried it years ago, but since I didn’t have to work with SSH too much, it was not integrated in my daily routine. However, a few days ago I bought a Digital Ocean VPS to do some Python webapp development and now I do need ssh :) And without screen / tmux it would be a pain.
So, after screen, let’s see tmux.
tmux: an advanced and friendly terminal multiplexer
The scenario is the same:
Log in with SSH:
ssh -p PORT USER@126.96.36.199
Specify the port if the SSH daemon is not on port 22. In the case of screen I used screen twice, but now I think it’s not necessary. First just use “ssh”. To keep the connection alive between machines A and B, it’s a good idea to use this alias:
alias ssh='ssh -o ServerAliveInterval=60'
More info about it here.
Once you are logged in to machine B, make sure that you have a recent version of tmux installed. More info here. And now just start tmux and use it :)
My config file
A big advantage of tmux over screen is its sane configation system. You can find my
~/.tmux.conf file here, I won’t copy it here.
My tmux looks like this:
A very special feature of screen / tmux is the ability to detach. It means that you have several tabs open within tmux (tmux calls them “windows”), and pressing “Ctrl-b d” you can close tmux. However, the programs in its tabs are still running, they are not terminated! You can close SSH, even restart your local machine, it doesn’t matter. When you log in again to machine B with SSH, you can attach to this tmux session and voilá, there you have your tabs and every program is running.
For instance, you launch a program on the server that runs for hours. Just detach, and attach a few hours later to see the result of this program. Or, you log in to a remote server from home, launch some programs, detach, shutdown your local machine, go to your workplace, log in again with SSH and attach to tmux, and you continue where you left off at home.
I don’t want to write a tmux tutorial because others have already done it much better. So let’s see some links:
- Basic tmux Tutorial – Windows, Panes, and Sessions over SSH, a very nice YouTube video that shows the basics
- Mark H. Nichols tmux configuration, my tmux config is based on it in 90%
- A Tmux crash course: tips and tweaks
I use two simple scripts to make re-attaching easier. The first one is called “tm”:
#!/usr/bin/env bash # tm tmux list-sessions echo "# tmux attach -t 0"
The second one is called “tm0”:
tmux attach -t 0
If you don’t give your tmux session a name (I don’t) then your session has ID 0. When I log in again to the remote server first I run “tm” to see the running sessions. Normally I only have one session, so its ID is 0. With “tm0” I can attach to it and continue my work in tmux. Easy peasy :)
Summary: to detach, press “Ctrl-b d”, and close SSH. To continue your work, log in with SSH, check sessions with “tm”, and attach with “tm0”. Easy peasy :)