Here’s a quick and simple solution to getting a VirtualBox VM to start on boot in MS Windows.
Create a new batch script with Notepad. Enter the following code, changing to include the name of your VM.
cd "C:\Program Files\Oracle\VirtualBox" VBoxHeadless --startvm name_of_your_vm_here
Save and close your file. Now click and drag it from where you saved it, over the Start Menu and drop it into the “Startup” folder. Now, that script will be executed on startup.
That’s it! Reboot and check that your VM has started running. It will be headless (ie you won’t be a VBox window) which is great for VMs you want in the background. However, you will still have a command prompt open.
Filed under: HowTo, Posts, Server, Windows | Leave a Comment
Tags: Batch, VirtualBox, Windows
This tutorial will outline how to install and configure a VNC Server on CentOS, similar to the Ubuntu VNC HowTo I did a while back.
This is particularly useful on headless servers, where you or other users still want to interact with a GUI.
Install the Packages
To install the VNC Server, open a terminal, and run the following command as root. (Use the su command to login as the root user, or, if you have it installed, use sudo.)
For CentOS 5:
yum install vnc-server
For CentOS 6:
yum install tigervnc-server
To install Gnome and it’s requirements, run the following command as root.
For CentOS 5:
yum groupinstall "GNOME Desktop Environment"
For CentOS 6:
yum groupinstall "Desktop"
Configuring Un-Encrypted VNC
First we need to edit the config file to include all the users who will have VNC desktops.
To do that, edit /etc/sysconfig/vncservers to add the following lines;
VNCSERVERS="1:user1 2:user2 " VNCSERVERARGS="-geometry 640x480" VNCSERVERARGS="-geometry 1024x768"
The VNCSERVERARGS array allows you to give each user’s VNC session different arguments. Here, user1 has a desktop resolution of 640×480, whereas user2 has a resolution of 1024×768. Read the vnc-server man pages for a full list of all the arguments you can provide.
Now, we must give every user a vnc password. To do this, we su into their account and run vncpasswd as follows.
su user1 vncpasswd
This will create a .vnc directory in the user’s home, which will contain their passwd file. Do this for every user in the config file.
Almost done. Let’s check that the vnc server starts and stops correctly. This will check to make sure that you’ve correctly created the .vnc directory for every user.
/sbin/service vncserver start /sbin/service vncserver stop
Finally, let’s startup the vnc server.
/sbin/service vncserver start
Now you should be able to connect using a VNC client to your_server_ip:590X where X is the desktop number you want – eg 1 for user1, 2 for user2 etc
- Encrypted VNC Server config
- Detailed connecting instructions
- Starting server at boot
Filed under: CentOS, HowTo, Posts | Leave a Comment
Tags: CentOS, HowTo, Linux, Server, VNC
Long time so see eh?
I’d like to say that I’ve some great reason that this blog has been left so derelict over the last two years, but that’s not entirely true.
What I’m trying to say is, that I should have plenty of new material to cover. I’d also like to thank everyone for still visiting, leaving comments and finding the material here useful. I’m truly surprised that two years since my last post, this blog is more popular than when I left it.
So I think it’s time to resurrect this blog. There’s a lot of spring cleaning to do, things that need to be updated, so bare with me over the next week or so.
For now, here’s a screen shot to whet your appetite.
Filed under: Posts | 2 Comments
The WordPress.com stats helper monkeys prepared a 2011 annual report for this blog.
Here’s an excerpt:
The concert hall at the Syndey Opera House holds 2,700 people. This blog was viewed about 58,000 times in 2011. If it were a concert at Sydney Opera House, it would take about 21 sold-out performances for that many people to see it.
Filed under: Uncategorized | Leave a Comment
One of the handiest features of Compiz is having multiple workspaces, anywhere from 2 to 1024 (for the extreme multi-tasker).
By default, you can switch through workspaces by using Control + Alt + Left/Right. However I find it’s far quicker to switch workspaces by just spinning your mouse wheel.
To do so (presuming you have compizconfig-settings-manager installed) go to Desktop > Viewport Switching.
Click on the “Desktop Based Switching” tab, and change “Move Next” to Button 5, and “Move Prev” to Button 4. You’ll now be able to flip between workspaces with your mouse wheel
Personally, I also like to go to Desktop Wall, and click on the “Viewport Switching” tab, and define “Non-Sliding Windows” to
(name=gnome-panel) & name=desktop_window
This prevents Gnome-Panel and the Desktop Background sliding, making the windows just slide over them
Filed under: HowTo, Posts, Ubuntu | 2 Comments
Tags: Compiz, Ubuntu, viewport, workspaces
Even though I’ve not updated my blog in quite a while, a suprising number of people drop by every day. Seeing as it’s the season that it is, I just wanted to wish ye all a very Merry Christmas.
Eat, drink, be merry, watch re-runs of the Titanic movie, however you celebrate, just enjoy!
Thanks for visiting, and making this blog possible! Be sure to drop by in the new year, for some great new HowTos!
Filed under: Posts | 1 Comment
Tags: christmas, evidex
Seeing as I’m just rebuilding my server at the moment, I’m starting to remember a number of commands that I’ve not used in quite a while. Here’s three dead handy commands that deal with hard drives and filesystems. Seriously, how I ever forgot them, I’ll never know
The first is the simplest. It shows you how much space you’ve used, and have free, on every storage medium attached to your machine. It’s four characters. Gotta love the simple things in life
If you did it right, you should see something like this;
Filesystem Size Used Avail Use% Mounted on /dev/sda2 6.0G 901M 4.8G 16% / udev 243M 164K 243M 1% /dev /dev/sdc1 917G 615G 293G 68% /mnt/1000 /dev/sdb1 459G 199M 454G 1% /home
The next is a tool that does far too many things for me to understand, including some things which will DESTROY your data and maybe even physical harddrive. So be careful what you type. I however, use it as a performance tool.
hdparm -Tt /dev/sda
Obviously, change /dev/sda to whatever drive you like (you can find it with df -h ). Again, if you’ve done it right, you’ll see something like this;
/dev/sdb: Timing cached reads: 792 MB in 2.00 seconds = 395.34 MB/sec Timing buffered disk reads: 340 MB in 3.00 seconds = 113.16 MB/sec
The first reading (-T), shows, according to the man page, “is essentially an indication of the throughput of the processor, cache, and memory of the system under test”. The second reading (-t) is the more true speed of the drive, the actual speed a file can be read from the disk, without any caches. So obviously, this little command is great for those like me, who love comparing various computers, disks and setups.
The last command is another multipurpose tool, which deals with ext filesystem settings, rather than harddrive settings as hdparm does.
However, before I tell you what it is, we must do some homework. Ext based filesystems (and a few others) reserve space on the drive for the system. It’s main use is that when you accidentally “fill” the drive, there’s still some secret space left over for the system to use, preventing it from freezing up. By default, it’s set to 5%. Now on a root drive, that’s a good setting to have, but it’s not quite necessary on a drive that’s simply being used to store bulk data. In such a case, it’s safe enough to reduce that secret reserved space back to 1% in order to win back some previous MBs.
Without futher ado, here it is;
tune2fs -m 1 /dev/sda1
Again, change /dev/sda1 to whatever you need yourself. The 1 after the -m flag donates setting a reserved space of 1%. For example, on a terabyte harddrive, changing from the defaults of 5% to 1% should give you a gain of 37GB or so.
Right, well that’s it for now. Hopefully, I’ll keep posting bits and pieces. No promises though
Filed under: Debian, Posts, Server | 2 Comments
Tags: df -h, harddrive, hdparm, postaday, reserved space, Server, tune2fs
Apologies, this is but another brief post.
In the last few weeks, even though I’ve not been posting, the site seems to be getting more and more popular.
As a result, it’s just rolled over 51,000 views!
To everyone who visits, thank you, and I hope to see you back here soon Don’t forget to comment on stuff you like
Filed under: Posts | Leave a Comment
No, I have to admit, I’ve not been the most regular, or interesting writer these past few months. To be honest, I simply havn’t had the volume of time I envisioned myself having over this summer.
Between being out and about, and working, I’ve just not had time to even look at the insides of a computer, even though so many of them seem to be breaking around me. I have a small stack of laptops in various states waiting to be fixed.
But there is light at the end of the tunnel. In about a month of so, summer will be ending, at the glory days of college shall begin. And considering that I’ll be studying computer science, there should be a torrent of material to post about
So, please bear with me for the moment.
As an infamous animatronic figure once said, “I’ll be back”.
Filed under: Uncategorized | Leave a Comment