Category Linux

Watching Netflix On Linux?

The Netflix watch instantly plug-in for U.S. s...

Image via Wikipedia

Watching Netflix on Linux is possible, but it’s not possible in a sense that you can watch Netflix directly on Linux.  Netflix is  using Microsoft’s Silverlight to stream movies.  Unfortunately, Silverlight isn’t fully working with Linux, therefore Linux users have to watch Netflix on Windows or Mac machines.  To circumvent the problem, Linux users can install VMware or Parallels or VirtualBox to run a Windows or Mac virtual machine.

This setting works for me.  I use VirtualBox to run Windows 7 virtual machine.  My virtual machine has at least 3 GB of RAM, max on graphic card memory, Bridge network, Guest Additions installed with experimental 3D hardware support, and guest Windows 7 is up to date with all software.  If you don’t have at least 3 GB of RAM for your Windows 7 virtual machine, you can try to start with around 500 MB of RAM to see if this is stable enough to do most things virtually within a Windows 7 virtual machine.  If not, you can always bump the RAM up little by little until your host machine runs out of RAM (i.e., RAM reserves for a virtual machine).

A weird snag I encountered while using the setting above is that Chrome isn’t working well with Netflix.  I had to use IE9 to watch Netflix smoothly.  Chrome tends to pop Netflix out of fullscreen mode and then Netflix goes black, the stream of the movie stops, and so everything else.  With IE9, I can watch Netflix in fullscreen mode without trouble.  I haven’t yet tested Firefox with Netflix in this sort of virtual environment.  Perhaps, Firefox might work, but I clearly do not know!

Cannot Install Guest Additions For VirtualBox 4.1.2? Having d3d9.dll Error? What’s The Deal With Virtualizing Windows 7 Inside VirtualBox On Linux?

English: Original source file of the “About Vi...

Image via Wikipedia

Some of us love to virtualize Windows 7 inside a host, because we think we need the host to be as secure as it could be and the virtualization would be a sort of sandbox to add one extra layer of security for the virtual machine.  Of course, the security of the sandbox would give a false sense of security for whoever runs it if he or she isn’t keen on securing the virtual machine also.  Some hackers could be so smart and create a hack which allows him or her to leap from the virtual environment into the host environment.  Plus, what the use for a virtual machine if it isn’t secure enough to be used, right?  I think you get the gist.

Anyhow, the idea for those who want to virtualize Windows 7 inside VirtualBox 4.1.2 could hit a snag if they also want to run Guest Additions for Windows 7 virtual machine.  How do I know this?  I tried to install Guest Additions the normal way by clicking on Device > Install Guest Additions, but this method failed me as it could not find Guest Additions anywhere.  I guess for an unknown reason, VirtualBox 4.1.2 failed to include Guest Additions somehow.  Of course, this might not happen to everyone, but it might be just me.  Nonetheless, if you are one of those people who experiences this exact situation, don’t sweat.  Just go to download.virtualbox.org/virtualbox/4.1.2/, and then you need to download VBoxGuestAdditions_4.1.2.iso.  Get back to VirtualBox window, click on the Windows 7 virtual machine, click on Settings > Storage, and make sure you add VBoxGuestAdditions_4.1.2.iso as virtual CD/DVD disk file.  It helps if you remember where you had saved your VBoxGuestAdditions_4.1.2.iso on the host machine.

During the installation of your Guest Additions for Windows 7 virtual machine inside VirtualBox on a host machine, you might hit another snag where an error would complain that it could not find or open d3d9.dll file.  It might be the permission for d3d9.dll file is too strict.  You need to allow write permission for d3d9.dll file before Guest Additions could finish the installation.  So, when you see d3d9.dll error, don’t exit the Guest Additions installer, but make sure you are inside your Windows 7 virtual machine, go to Windows\System32\ and search for d3d9.dll file, right click on it and choose Properties, click on Security tab, and then from here you need to allow write permission for all users.  Get back to Guest Additions installer and try to finish installing the Guest Additions.  When done installing Guest Additions, don’t forget to remove write permission for d3d9.dll file for all users so this file can once again be secure as before.

In conclusion, Windows 7 virtual machine inside VirtualBox on a Linux host is ideal for security.  Nonetheless, if he or she forgets to secure Windows 7 virtual machine, he or she is not that secure in term of allowing Windows 7 virtual machine to be hacked easily.  If he or she is lazy, it’s best to use NAT network, but it’s always better to use Bridge network as it’s much more flexible.  NAT network hides the virtual machine inside a host’s network (i.e., not using the router’s DHCP or manual IPs), therefore one could say as long the host has a strong firewall, the virtual machine too could be protected by the same firewall.  Without the installation of Guest Additions, he or she could not open Windows 7 virtual machine in fullscreen mode, and so don’t forget to do this.

Enabling WebDAV On Fedora 16

Logo for the Apache HTTPD Server Project .

Image via Wikipedia

Here is how I enabled WebDAV on Fedora 16 (before starting, you need to know how to use a terminal/shell and change into root account from terminal/shell):

  1. I opened up ports 80 and 443 for the firewall
  2. I disabled SELinux
    1. Open up the file vi /etc/sysconfig/selinux by typing in the command vi /etc/sysconfig/selinux as root inside a terminal
    2. Change the line that says SELINUX=enforcing to SELINUX=disabled
    3. Save the /etc/sysconfig/selinux file and get out of vi
    4. Reboot the machine
  3. I installed Apache Web Server
    1. Inside a terminal as root, type in the command yum -y install httpd
    2. Edit the file vi /etc/httpd/conf/httpd.conf by typing in the command vi /etc/httpd/conf/httpd.conf inside a terminal as root user
    3. Change line #43 to ServerTokens Prod
    4. Change line #75 to KeepAlive On
    5. Change line #261 to root@localhost
    6. Change line #275 to ServerName localhost:80
    7. Change line #337 to AllowOverride All
    8. Change line #401 to DirectoryIndex index.html index.php
    9. Change line #535 to ServerSignature Off
    10. Comment out the line #758 to something like this #AdDefaultCharset UTF-8
    11. Save the file /etc/httpd/conf/httpd.conf and get out of vi
    12. Type the command systemctl start httpd.service inside the terminal as root user to start Apache web server
    13. Type the command systemctl enable httpd.service to enable the starting of Apache web server on each fresh boot
    14. Install PHP by typing command yum -y install php php-mbstring php-pear inside a terminal as root user
    15. Type the command systemctl restart httpd.service inside a terminal as root user to restart Apache web server
    16. Configuring SSL for Apache to serve websites in SSL mode (i.e., HTTPS) by installing mod_ssl, so type the command yum -y install mod_ssl inside a terminal as root user
    17. Edit the file vi /etc/httpd/conf.d/ssl.conf by typing in the command vi /etc/httpd/conf.d/ssl.conf inside a terminal as root user
    18. Uncomment the line #78 to DocumentRoot “/var/www/html”
    19. Uncomment the line #79 to ServerName localhost:443
    20. Uncomment line #112 if it’s not yet uncommented, so the line should look like this SSLCertificateFile /etc/pki/tls/certs/localhost.crt
    21. Uncomment the line #119 if it’s not yet uncommented, so the line should look like this SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
    22. Save the file /etc/httpd/conf.d/ssl.conf and get out of vi
    23. Type the command systemctl restart httpd.service to restart the Apache web server
  4. Create WebDAV server/protocol
    1. Inside a terminal as root user, type in the command mkdir /home/WebDAV to create a directory named WebDAV
    2. Change the owner for directory WebDAV by typing in the command chown apache. /home/WebDAV inside a terminal as root user
    3. Change permission for WebDAV directory to 770 by typing in the command chmod 770 /home/WebDAV inside a terminal as root user
    4. Make a webdav.conf file to configure WebDAV server by typing in the command vi /etc/httpd/conf.d/webdav.conf inside a terminal as root user
    5. Type the lines below into the file /etc/httpd/conf.d/webdav.conf using vi editor:
    6. Alias /share /home/WebDAV
    7. <location /share>
    8. DAV On
    9. SSLRequireSSL
    10. Options None
    11. AuthType Basic
    12. AuthName WebDAV
    13. AuthUserFile /etc/httpd/conf/.htpasswd
    14. <LimitExcept GET OPTIONS>
    15. Order allow,deny
    16. Allow from 192.168.1.
    17. Require valid-user
    18. </LimitExcept>
    19. </Location>
    20. Stop typing the stuffs into the file /etc/httpd/conf.d/webdav.conf and save it and get out of vi
    21. Type the command htpasswd -c /etc/httpd/conf/.htpasswd fedora inside a terminal as root user to add password for fedora user to use WebDAV server
    22. You will be asked to create a password and confirm password, so type in the same password twice
    23. Now you need to restart the Apache server by typing in the command systemctl restart httpd.service inside a terminal as root user

Log into the WebDAV server by using https://192.168.1.(enter the last bit of number for your server IP address here)/share.  You will be asked to enter username and password.  The username should be fedora, and the password is the password that you had created earlier.

Troubleshooting:  You should check to see if you can ping your Apache server. Check to see if Apache server has a daemon running (i.e., ps aux | grep httpd).  Check to make sure firewall ports 80 and 443 are opened.  Check to make sure SELinux is disabled.  Check to see the configuration file for httpd.conf is correctly configured.  Check to see the configuration file for webdav.conf is correctly configured.  If permission 770 for /home/WebDAV isn’t working, try to change it to 755 or 777.  Make sure you had enabled SSL for Apache correctly.  If all failed, you might want to reboot Apache and to see if problems could be resolved this way.

Follow

Get every new post delivered to your Inbox.

Join 135 other followers