Thomas Sampson


1 Comment

Fixing Ubuntu/Xubuntu 14.04 screen resolution in VirtualBox

After recently installing Ubuntu 14.04 inside VirtualBox and installing the guest editions, I was stuck with a very small screen resolution. Apparently this is a bug with VirtualBox and until a fix is applied to the VirtualBox guest additions package, the following command should be used to fix this issue:

sudo apt-get install virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11

Source: http://askubuntu.com/questions/451805/screen-resolution-problem-with-ubuntu-14-04-and-virtualbox

Advertisements


Leave a comment

Installing .deb packages without Ubuntu Software Centre

If like me, you attempt to avoid Ubuntu Software Centre at all costs (due to it’s often slow and clunky nature) you can easily install a downloaded Debian package from the terminal as follows:

sudo dpkg -i mypackage.deb

Packages can also be removed in a similar fashion if you know the package name:

sudo dpkg -r mypackage


Leave a comment

Creating Your Own Ubuntu Unity Launcher

Today I needed to setup a custom unity launcher for an application which would show in the unity dash and could be pinned to the unity launcher after launch. It turns out that unity launcher entries are represented as “.desktop” files and reside in the following location:

/usr/share/applications

or additionally per-user in the following location:

~/.local/share/applications

Below is a template for creating your own .desktop file, simply edit this to suit your application, the entries in the file should fairly self explanatory.

#!/usr/bin/env xdg-open
 
[Desktop Entry]
Name=Sublime Text Editor
Comment=Sublime Text Editor
Exec="/usr/bin/sublime" %F
MimeType=text/plain;
Terminal=false
Type=Application
Icon=/home/mimir/sublime.png
Categories=GNOME;GTK;Utility;TextEditor;Development;Utility;


Leave a comment

Ubuntu Transparent Panels

To achieve 100% transparent panels within Ubuntu, this involves modifying the default theme (Ambience).

sudo cp -R /usr/share/themes/Ambiance ~/.themes/
sudo gedit ~/.themes/Ambiance/gtk-2.0/apps/gnome-panel.rc

Then comment out the following line, as below

#bg_pixmap[NORMAL] = "img/panel.png"

A theme switch (from System > Preferences > Appearance) is required for changes to be applied. Now setting the transparency on panels effects all areas 🙂


Leave a comment

Linux Backup

A really thorough guide to backing up your Linux system including;

  • Backing up the entire root directory
  • Restoring from backups
  • Backup/Restore to/from remote machine
  • Retaining file permissions
  • Backup/Restore GRUB configurations

https://help.ubuntu.com/community/BackupYourSystem

A number of backup/restore utilities are mentioned on the above page, my favourite being the simple TAR tool. Details on backing up using TAR can be found here…

https://help.ubuntu.com/community/BackupYourSystem/TAR


Leave a comment

SSH Port Redirection

This is a really useful technique I recently discovered which allows you to bind a port on your local machine to the local port on a remote machine. Why would you want to do this?

Well in my case I was working on a remote web server via ssh, setting up some web aplications on various different ports. The hosting company had yet to open these ports to the outside world. However, this technique allowed me to bind the local ports on the remote machine (running the web applications) to my local machine. This allowed me to test and configure each application as if it was installed on my local machine, simply by accessing localhost:xx in my browser. The port numbers don’t even have to match! I ended up binding remote port 8080 to port 80 on my local machine.

This can be achieved by issuing the following command on the local machine…

ssh $REMOTE_IP -L $REMOTE_PORT:localhost:$LOCAL_PORT

Example binding remote 8080 to local 80:

ssh myhost.com -L 8080:localhost:80