Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Thursday, April 11, 2013

Extended desktop using XFCE

In the XFCE display settings manager, if you see your screen but instead of extending the desktop it clones the desktop on both displays.




To enable this. use xrandr
You should see something like this

LVDS1 connected 1366x768+0+0 (normal left inverted right x axis y axis) 310mm x 174mm

blahblah

HDMI1 connected 1280x720+1366+0 (normal left inverted right x axis y axis) 16mm x 9mm

To extend the desktop and use the HDMI connected monitor on the right side, do this:
➜  ~  xrandr --output HDMI1 --right-of LVDS1



Wednesday, August 1, 2012

nginx HTTP/HTTPS setup

Setting up nginx SSL is pretty easy. I'm running nginx/1.0.10.

Use make-ssl-cert to make your SSL certificate.
make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/ssl/private/zachwolfe.org.crt Copy this file to /etc/ssl/private/zachwolfe.org.key and /etc/ssl/certs/zachwolfe.org.crt.

Modify /etc/ssl/private/zachwolfe.org.key to only include the key (as follows):
-----BEGIN CERTIFICATE-----
...key text is here....
-----END RSA PRIVATE KEY-----


Modify /etc/ssl/certs/zachwolfe.org.crt to only include the certificate (as follows):
-----BEGIN RSA PRIVATE KEY-----
...certificate text is here....
-----END CERTIFICATE-----


nginx setup:
File /etc/nginx/conf.d/zachwolfe.org.ssl.conf
server {
    listen       443;
    server_name  zachwolfe.org;

    ssl                  on;
    ssl_certificate      /etc/ssl/certs/zachwolfe.org.crt;
    ssl_certificate_key  /etc/ssl/private/zachwolfe.org.key;

    ssl_session_timeout  5m;

    ssl_protocols  SSLv2 SSLv3 TLSv1;
    ssl_ciphers  HIGH:!aNULL:!MD5;
    ssl_prefer_server_ciphers   on;

    location / {
        root /var/www/;
        index  index.html index.htm;
    }
}


File /etc/nginx/conf.d/zachwolfe.org.conf
server {
    listen       80;
    server_name  zachwolfe.org;
    access_log /var/log/nginx/zachwolfe.org.access.log;

    location / {
        root /var/www/;
        index  index.html index.htm;
}

Tuesday, March 13, 2012

Automount NTFS partition using Ubuntu 11.10

To automount an NTFS partiton, add the following to /etc/fstab:
15 UUID=58C7049A417B945D /media/media ntfs rw,auto,users,exec,nl=utf8,umask=003,gd=46,uid=1000 0 2

Substituting your partition's UUID and mount point (I chose /media/media). To find your partiton's UUID, run sudo blkid


Then, test with:
mount /media/media
This yields an error:
mozach@dm4:~$ mount /media/media
Mount is denied because setuid and setgid root ntfs-3g is insecure with the
external FUSE library. Either remove the setuid/setgid bit from the binary
or rebuild NTFS-3G with integrated FUSE support and make it setuid root.
Please see more information at
http://tuxera.com/community/ntfs-3g-faq/#unprivileged


To fix this we must recompile ntfs-3g to include FUSE support.
Download ntfs-3g source:
zach@dm4:~/ntfs$ wget http://tuxera.com/opensource/ntfs-3g_ntfsprogs-2012.1.15.tgz
Decompress:
zach@dm4:~/ntfs$ tar -xvzf ntfs-3g_ntfsprogs-2012.1.15.tgz
Configure (including internal FUSE support):
zach@dm4:~/ntfs/ntfs-3g_ntfsprogs-2012.1.15$ ./configure --with-fuse=internal
Compile:
zach@dm4:~/ntfs/ntfs-3g_ntfsprogs-2012.1.15$ make
Install:
zach@dm4:~/ntfs/ntfs-3g_ntfsprogs-2012.1.15$ sudo make install

Reboot and /media/media should be mounted automatically.