Posts Tagged ‘mint’
Change grub default boot option on Linux Ubuntu/Mint
Grub’s default boot option is stored within a config file found on the partition where your Master Boot Record is located (if you had it installed previously, there may also be grub.cfg files on other partitions, but these won’t effect boot sequence). Its direct path is /boot/grub/grub.cfg and it has to be opened as root, so enter following into a terminal:
sudo gedit /boot/grub/grub.cfg
The important parts of the file is the line saying set default=”0″ and the blocks beginning with menuentry:
[...]
menuentry ‘Linux Mint 12 64-bit, 3.0.0-12-generic (/dev/sda5)’ –class linuxmint –class gnu-linux –class gnu –class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root=’(hd0,msdos5)’
search –no-floppy –fs-uuid –set=root 7df91f6c-5351-4336-a3c5-eac1cf58efca
linux /boot/vmlinuz-3.0.0-12-generic root=UUID=7df91f6c-5351-4336-a3c5-eac1cf58efca ro quiet splash vt.handoff=7
initrd /boot/initrd.img-3.0.0-12-generic
}
[...]
These blocks are the entries that are displayed in the boot menu – they are indexed from 0 to n-1, n being the number of entries. To set the default entry, take its index and enter it into the set default=”0″ line, replacing 0 with the desired index. Afterwards save the file.
Reset root password (Ubuntu Linux) without CD
Resetting your systems root password may be a necessary step if you have forgotten it or have bought a used computer which you don’t want to setup anew. Doing so without any installation medium saves you a blank CD and a bit of time.
To start, restart your computer and get to the GRUB menu by pressing Shift while booting. Point your cursor to the Recovery mode option:
Press e to edit the boot options. There, look for a line that looks like this: linux /boot/vmlinuz-3.2.0-18-generic root=UUID=b8b64ed1-ae94-43c6-92\d2-a19dfd9a727e ro recovery nomodeset:
The line will differ depending on your version and kernel but should have about the same syntax. Remove the last part of line which is ro recovery nomodeset and replace it with rw init=/bin/bash:
This will cause a command line to be opened on startup. Press F10 now to reboot the machine and get to the command line. Once you are there, enter:
/usr/sbin/usermod -p ‘!’ root
(If you get an error by copying and pasting above command, try replacing the quotation marks.) Now reboot the machine and the root password should be reset. The changes you did to the boot options will also reset automatically, so you do not have to change them back.
Install VLC 2.0.0 on Linux Mint 12, Ubuntu 11.10 and OpenSUSE 12.1
A few days ago version 2.0 of the popular VLC media player was released, called Twoflower. Since it is not yet in the repositories, you have to add a repository if you want to update your present version.
Independent of your distribution, first log in as root:
su
On Linux Mint 12 and Ubuntu 11.10, add following repository:
add-apt-repository ppa:n-muench/vlc
Afterwards, update your sources list:
apt-get update
Finally, install VLC 2.0:
apt-get install vlc
On openSuSE 12.1, add following repository:
zypper ar http://download.videolan.org/pub/vlc/SuSE/12.1 VLC
Then refresh your sources:
zypper refresh
And finally install VLC:
zypper in vlc
You can find the release notes for the new version on the VLC homepage: http://www.videolan.org/
How to Manually Install New Cinnamon Themes (Linux Mint/Ubuntu)
To manually install new themes for cinnamon from the page provided by Cinnamon Settings, first backup the data of the original theme by opening a terminal and entering
sudo cp -R /usr/share/cinnamon/theme /usr/share/cinnamon/theme_backup
Then download and unpack another theme from http://cinnamon-spices.linuxmint.com/themes, save the files to some location – I will save them on my desktop.
Then you have to copy the data from the unpacked folder to the theme folder of cinnamon:
sudo cp -f /home/howtoforge/Desktop/unpackedfolder/cinnamon/* /usr/share/cinnamon/theme
The new data has then replaced the old. To restore the default theme, copy back the backed up data.
Change System Sounds on Windows 7 (Including Startup)
This article will deal with two aspects: handling the regular sounds which are accessible in Control Panel as well as changing the system startup sound, which is hidden inside a .dll file and quite tricky to get at.
The regular sounds can be accessed by entering the Control Panel and browsing to Control Panel\Hardware and Sound\Sounds\Change system sounds. A window with selectible sound schemes will open where you can either select a premade scheme or browse your files to choose other .wav files and save a custom scheme. The checkbox below the list already indicates that you will not find the Startup sound in it – you will need third party software for that.
The reason for this requirement is that the startup sound isn’t configurable by “normal” means – it is hidden inside a .dll file, C:\Windows\System32\imageres.dll. Before you make any changes to it, make a backup-copy of it to some safe place and also one on your desktop to work with. Afterwards, download a resource hacker – these tools are used to access the data inside .dll files which can be sound files as well as icons and other things. I prefer ResEdit since it does not need an installation. You can download it here:
In ResEdit, open the copy of imageres.dll you saved to your desktop.
On the left Resources column, find the “WAVE” entry – there is exactly one file in there, which has different names depending on your system language – I’m using American English, which is why it’s called 5080 here (replace any occurance of that number here with the one you have for your language). To be able to import your own sound, it also must be in the .wav format and must be called the same as the file you just found.
Now delete the 5080 entry in ResEdit – right-click it and choose Remove from project. Then right-click on some empty space in the Resource column and select Add Resource… > User Definded. A window pops up – select Name identifier and type in WAVE. Now browse the sound file you want to configure as startup sound and hit Open (I don’t know the maximum size of the file you can use, you might try to keep it as small as possible – it worked for me with a file size of ~90kb, others have reported more). It will have the wrong name and language defined after you import it, so you have to change that: Right-click the entry and select Rename. Leave the Ordinal identifier checked and enter 5080 into the identifier box, then select the correct language for you (Englisch (United States) if you had 5080) and hit OK. Afterwards save the file in ResEdit.
Now comes the tricky bit which is replacing the imageres.dll in your System32 folder with the one you edited. If you try to just do it, Windows will most likely hit you with the Permission-Denied-club, no matter how many administrative rights you have got. People have reported that it worked for them in save mode. A save option however is to boot off a Linux Live CD (I used Linux Mint 12 Lisa) and replace the file in the Live environment.
Therefore, just download a CD image file from here or any other Linux distribution’s homepage, burn it onto a bootable CD and boot from it.
You will boot into the Live environment, from which you can test and install Linux or if you need, fix stuff on your Windows installation. I will go on with the instructions assuming you chose Linux Mint 12 from the link I provided, if you chose differently you will likely know how to accomplish the next steps on your system.
To replace the file, hover your cursor to the top left corner of the screen – an overlay will pop up. Type in terminal and open the first object of the list appearing:
This is the command line and will be needed in a few moments. Hover to the top left corner again and click on the nautilus icon on the left to open a new file manager window:
On the appearing window, have a look at the left column – there are different (or only one) drives listed, you should be able to determine your Windows system drive by its size or contents. Click on it once to show them. What is important now is the value that is shown on the window decoration on top of the window, circled in red here:
You basically need only the first few characters. Now go back to the terminal you opened and enter
sudo su -
to grant yourself administrative rights. Next, you do the copying. For that, use the following command. You can use the tab-key to autocomplete the path segments, so you don’t have to write out the whole value from above. Replace my username with yours and weirdvalue with the drive’s value:
cp -f /media/weirdvalue/Users/howtoforge/Desktop/imageres.dll /media/weirdvalue/Windows/System32
The file is now replaced and you can reboot, removing the CD when told to. If you encounter problems with the new imageres.dll, just repeat the process and copy the backup you made to the System32 folder instead.
Enable USB Support In Virtualbox (Ubuntu)
Enabling USB Support in Virtualbox means to be able to access USB drives plugged into your physical machine on your virtual machines. To accomplish this, you first need to download the newest version of Virtualbox (4.1.8 at the time of this writing), which is not available in the Ubuntu repositories but on the Virtualbox homepage:
https://www.virtualbox.org/wiki/Downloads
Uninstall any previously installed version if present and then install the downloaded Debian package with a package installer taking care of dependencies, such as gdebi.
Next, head back to the homepage and install the Virtualbox Extension pack which supports USB 2.0.
Now you have to make yourself member of the vboxusers group. Go to the Users and Groups Settings in your Control Panel and hit Manage Groups. Scroll down to the vboxusers group and hit Properties. Check the box next to your username and click OK.
Last but not least you have to enable USB for the virtual machine. Close it if it is running and enter the Settings window. On the left panel, select USB. Check Enable USB Controller as well as Enable USB 2.0 (EHCI) Controller. Then click the button with the small green plus-symbol and add the USB device you need:
If you run the machine a USB symbol will indicate that USB is enabled and a device is running on virtual machine:
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.
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.















