Blog Archives

ubuntu lts 12 xrdp rdp setup on Amazon Cloud AWS(12.04.3 precise pangolin)

Consolidated from multiple sources to exclude erroneous steps.

Tested on Amazon Web Services fresh Ubuntu LTS 12.04.3 instance.

Decided upon ubuntu vs centOS simply to avoid having to compile xrdp and manage dependencies manually. Chose 3rd party linux over Amazon AMI in this case for benefit of included repos, use cases and support in their respective communities (ubuntuforums, etc), as well as not having to compile xrdp in Amazon AMI.

sudo useradd -m {name}
passwd {name}

#you may want to consider setting a root passwd in case you mess up sudoers. if you make a mistake with sudoers terminate your instance and relaunch :) ... or you could mount the HD with another system if it's unencrypted and modify sudoers
passwd root

#edit /etc/sudoers.d and add your new user
{name} ALL=(ALL) ALL

#edit sshd /etc/ssh/sshd_config disable root login and allow password authentication (if you like)
service ssh restart

#http://www.liberiangeek.net/2012/05/connect-to-ubuntu-12-04-precise-pangolin-via-windows-remote-desktop/
sudo apt-get install xrdp

sudo apt-get install gnome-session-fallback

#two options, 2d unity no longer available, previously
echo "gnome-session --session=ubuntu-2d" > ~/.xsession
#http://askubuntu.com/questions/247501/i-get-failed-to-load-session-ubuntu-2d-when-using-xrdp
echo gnome-session --session=gnome-fallback > ~/.xsession

#make sure your user has permission to this file if you have to create it with sudo etc
chown {name}:{name} .xsession

#http://www.filiwiese.com/installing-gnome-on-ubuntu-12-04-precise-pangolin/
sudo add-apt-repository ppa:gnome3-team/gnome3
sudo apt-get update
sudo apt-get install gnome-shell

#http://askubuntu.com/questions/251041/how-to-install-lightdm-set-defaults
sudo apt-get install lightdm

#http://askubuntu.com/questions/71126/how-do-i-set-the-gnome-classic-login-to-be-the-default-with-autologin
sudo /usr/lib/lightdm/lightdm-set-defaults -s gnome-fallback

Don’t forget AWS Firewall:

22 (SSH)	your ip/32

Burn Hybrid CDs using Free Tools

CD Burning in general is supported in most operating systems right out of the box.

However, if you’re looking for a free alternative to features which are otherwise considered “premium”, like burning hybrid CD’s that work on Windows and Mac there are freely available tools licensed under GNU which have everything you need.

Consider the steps below. Simple (if you follow the steps and don’t have hiccups), free (as long as GNU stands) and error proof (so long as you use the precompiled binaries of stable versions and don’t stray to bleeding edge BETAs or compiling your own :P).

Step 1

For Windows:
Download and install Cygwin.
During install process, towards the end where you select packages, select cdrtools/cdrecord/mkisofs

For Mac:
Download cdrtools from their website or freshmeat.

For (Redhat) Linux:
su
yum install cdrtools OR yum install cdrecord THEN
yum install mkisofs

For (Debian) Linux:
su
apt-get install cdrtools OR apt-get install cdrecord THEN
apt-get install mkisofs

Step 2

Prep a folder that will be burned to the disc. Make sure the contents will fit and verify the file structure is correct.

If you want to literally burn the folder itself, don’t “cd” into that directory. If you are burning the contents of the folder, you will “cd” into the directory and specify “.” as the target name instead of the folder name.

Step 3

In Windows start up Cygwin, on Mac open the darwin terminal window, on linux open your terminal window.

Run:
cdrecord -scanbus

Note the numerical identifier for your burner drive. This is what you will specify for the “dev” parameter later.

“cd” into the directory containing the files to burn then run:
mkisofs -o isoname.iso -r -J -hfs .

Then from within the same directory, burn the iso that you created:
cdrecord dev=4,0,0 -v isoname.iso

That’s it! Let ‘er rip! ;)

Note: genisoimage is similar to mkisofs, but I have not used it extensively and cannot verify if functionality is exactly the same.

References
Cygwin, http://www.cygwin.com/
CDRTools, http://cdrecord.berlios.de
Freshmeat, http://freshmeat.net
Howto-Pages.org, http://howto-pages.org/cdwriting/07.php
G-Loaded.eu, http://www.g-loaded.eu/2007/04/25/how-to-create-a-windows-bootable-cd-with-mkisofs/
Brandonhutchinson.com, http://www.brandonhutchinson.com/Burning_CDs_with_cdrecord.html
genisoimage, http://linux.die.net/man/1/genisoimage
Hints.Macword, http://hints.macworld.com/article.php?story=20020520083853834

Access Denied on File Delete or Cannot delete file

If you receive an “access denied” message on your PC, whether in Windows or Linux, which occurs when trying to delete or modify a file, it can usually be narrowed down to a few reasons:

- The file is marked as readonly
– The file is located on a CD, disk, drive, removable device or any other storage type which is either marked as readonly for the entire volume or your files are contained within a readonly partition in this volume (which can easily occur in linux if you manually mount a drive improperly)
– You do not have access to delete the file or are not an owner of the file
– The file is currently open or in use

If you are deleting the file using code in your .Net application, be sure to remove the “read only” attribute which won’t prevent a user from deleting it, but will definitely halt your application. (code reference).

If you are absolutely sure you should be able to delete the file, or are trying to remove a file which be malicious or difficult to delete, there are tools available such as file assassin which can be used to override the normal OS safeguards (if you have the right know how and permissions) and delete the file anyway.

References
Imran Akram (WordPress BLOG)http://imak47.wordpress.com/2009/01/15/how-to-remove-readonly-attribute-from-a-file/
MalwareBytes “FileAssassin”, http://www.malwarebytes.org/fileassassin.php

Follow

Get every new post delivered to your Inbox.