In Midnight Commander when you press ctrl + \ you can access directory hotlist and you can quickly choose connection you want to establish.

The problem is – you cannot by default save passwords, so every time you select this connection you need to input it. Sure, it’s safe to do so, but if using them in your desktop and you’re the only user of it – you can expect a bit more pragmatic approach.

You can define your site’s password explicitly in the MC configuration file which, by default, resides in ~/.config/mc/hotlist.

Just edit this file and you’ll see entry similar to below:

Continue reading

If you want to remotely access your SSH account (e.g. NAS in home) and listen to the music or watch some movies without downloading them in the first place, you can use the following command:

ssh user@your.host.com cat mediaFile.avi | mplayer - 

It will connect to your.host.com, log into the user account, invoke the cat command on the given mediaFile.avi and transfer the output (stream of bytes) to your local mplayer.

The mplayer - says that it should read the data from the standard input — which in this case is the result of the cat command.
When you finish watching or listening — just break the connection and no traces are left on your local device.

Alternatively, you can also mount your remote ssh location using the sshfs.

After one of the Ubuntu 11.10 updates I was affected by some really weird colors in the embedded flash player. Basically, every movie looked similar to the one below (notice the dominance of the bluish color):

The solution is to disable hardware acceleration in Flash Player settings (RMB -> Settings) just as shown here:

After unchecking this option and refreshing the page all videos were back to normal:

I’m not sure if I even want to know why one update could mess up so bad with the Flash Player. In fact, I’m pretty sure that the Flash Player is one of the best way to crash your Ubuntu box. In fact on my Dell Vostro 3555 it randomly restarts the X Window Server… sigh.

Nevertheless, the world has been saved one more time.

Some time ago I’ve had a problem with SVN on my VirtualBox guest Ubuntu machine. When the machine was hibernated (it’s state was saved – without shutting it down) there was a time synchronization issue.

When I checked out the SVN repository on the guest machine, I couldn’t see any actual changes or new files which I was 100% sure I committed before (because I did it from my host machine just a minute ago).

It occurred that the guest machine clock was not synchronized with the host’s. So, the guest clock stopped when it was suspended and, after resuming, the time just continued to flow. The time difference was so big that the SVN checkout was working on some weird past revisions (relative to the guest clock) instead of the actual ones.

It was all solved by installing the Guest Additions.

If you want to execute a GUI based application on the remote server through SSH, you can achieve it quite easily using the ssh command. Just type

ssh -X username@server

The -X flag is used to define the DISPLAY environmental variable on the remote host, so each X11 executed application will be forwarded to your machine.

Recently I needed to find out what GNU/Linux a terminal-only server is using. The most obvious thing I could think of was to use:

uname -a

Unfortunately, it will return the kernel information only – no details about the distribution though.
The distribution info is located in a different file which is dependent on… the distribution itself. Check out the list of those filenames here.

As a majority of those files ends with “release” part, in most cases it should be enough to execute the following command:

cat /etc/*release

I was trying to find a way to capture the network interface traffic on a remote server, just to see what (or who!) messed up the Web Services based communication.

I didn’t have to search too long, because my favorite capturing software, Wireshark, can listen on a named pipe. So, below you can find the simplest solution I found (SSH + FIFO) [based on this tutorial]:

On the client side (my computer – GNU/Linux) type:

mkfifo /tmp/pipe
ssh user@remote-host "tshark -w - not port 22" > /tmp/pipe

Still on the client side, open another terminal and type:

wireshark -k -i /tmp/pipe

Now type the SSH password in the first terminal. Of course you don’t have to do this if you have configured your connection to use the certificates.

Just remember that on the server side you need to install the console-version of the Wireshark named tshark and to log in as a user which has privileges to capture the network traffic.

Now using your client-side Wireshark you can listen to the traffic which comes to and from your remote server.