Archive for the ‘Ubuntu’ Category
Install GNOME Desktop On Ubuntu 11.10
If you would like your Ubuntu 11.10 better with the old GNOME desktop (no launcher but a good old system panel and so on), you can just install the gnome package and choose it as your default desktop environment. Therefore open a terminal and enter:
sudo apt-get install gnome
During the installation there will be some prompts that you will have to answer. Click OK on the first one after you are done reading:
Next, you will have to decide which desktop environment you want to configure as your default:
After installation, the GNOME as well as the Unity desktops will be available on the cogwheel-button in the login-screen:
Get the name of the newest file in a directory on the linux shell
If you have a directory with many files (a few thousand in my case) and need to know which one is the newest, then the following command might be useful. It returns the name and details of the newest file in a directory where it is executed:
ls -tl | sed -n 2p
Encrypt Folders (Ubuntu Linux)
To encrypt folders on Linux Ubuntu there is a simple program called Cryptkeeper which, while active, lets you mount and dismount password protected folders.
While unmounted, the encrypted folders are invisible to the user. While mounted, you need to enter the password to access its contents. To create a new encrypted folder just click on the key icon on the system panel and select New encrypted folder.
Make sure to unmount the encrypted folders before you quit Cryptkeeper since the files become accessible if they are mounted and Cryptkeeper is inactive. The files remain invisible if they are unmounted and Cryptkeeper is quit.
Quicklink Current Files on the Desktop Panel (Ubuntu Linux)
There is a desktop panel applet for Ubuntu Linux and its derivatives that is able to store files and folders within a dropdown window accessible from a tiny icon on the panel bar called Topshelf. It is available in the default Ubuntu repositories.
It receives content by just dragging and dropping it into its window which opens upon clicking the topshelf icon. This way you do not have to browse long ways through the file system to find the files you are working on regularly but have easy access on them by quicklinking.
Change Default Application to Open Files (Linux Mint)
The default application is the one you open a file with on doubleclick. In some cases installed programs automatically turn themselves into the default application for files you were happy with, which you might want to change. To do that, rightclick a file of the chosen format and choose Open With… -> Other Application or Open With Other Application:
On the window that opens, choose an application or command and check the Remember this application for “…” files checkbox to apply your selection for all files of the same format:
Hit Open afterwards.
Log In As Root in Live Mode (Linux Mint)
After crashing your system and getting entertaining colored screens on boot, you may have to consider booting in live mode from a bootable device such as an installation DVD or a USB-device. However you’ll need to be able to log in as root in most cases to make changes in configuration files and others to get your system running again. While you can log in as root with a password on your normal system, you can do so in live mode by entering
sudo su -
into the terminal. This logs you in as root so you get to edit your important broken files to be able to boot from your hard drive again.
How to Block Web Pages (Linux Mint 11)
To block web pages on Linux Mint, there is a simple tool in your Control Center. Go to Menu > Control Center > System > Domain Blocker and you will be asked for your password. A plain window with just a few buttons will appear afterwards.
To add web pages to the blocking list, click on Add and type in the (un-)desired page. It may occur that you have to enter it two times, one with www. and one without www..
To adopt the changes restart your browser and the entered web page should no longer be available.
Reduce load of backup scripts with nice and ionice
Runing a nightly backup script on a server system like a webhosting server can produce high load and longer latencys for other processes, e.g. HTML or .php pages load slow during backup because the backup script takes too much I/O or CPU resources.
On Linux systems there are two shell utilitys available to set the I/O and CPU Scheduling for a appliaction or script. The utilitys are named nice and ionice.
Reduce the I/O priority of the script “/usr/local/bin/backup.sh” so that it does not disrupt other processes:
/usr/bin/ionice -c2 -n7 /usr/local/bin/backup.sh
The -n parameter must be between 0 and 7, where lower numbers mean higher priority.
To reduce the CPU priority, use the command nice:
/usr/bin/nice -n 19 /usr/local/bin/backup.sh
The -n parameter can range from -20 to 19, where lower numbers mean higher priority
Nice and ionice can also be combined, to run a script at low I/O and CPU priority:
/usr/bin/nice -n 19 /usr/bin/ionice -c2 -n7 /usr/local/bin/backup.sh
Disable quota for a Linux user or group on the shell
Linux user quotas can be edited with the commands edquota or setquota on the shell. While edquota opens the quota settings in a editor like vim, setquota allows you to specify the quota settings on the commandline.
Example for disabling the quota for the user “testuser”:
setquota -u testuser 0 0 0 0 -a
Example for disabling quota for the group “testgroup”:
setquota -g testgroup 0 0 0 0 -a









