From Mac To Xubuntu

I was an avid Mac user for seven years. Over Thanksgiving weekend in 2012, I ditched the Mac and switched to Xubuntu.

I'm very pleased so far.

The purpose of this blog is simply to document my experiences, tweaks, etc. Since Linux is community driven, this I guess is my way of giving back to the community, in case someone else out there wants to make a similar switch.

It's important to note that I'm not an average computer user. I'm a professional web developer with years of experience with Linux. I just never made the switch on my main, personal machine until now.
  • ask me anything
  • rss
  • archive
  • Set Up DDClient For Dynamic DNS With Your Own Domain

    In my previous post, I talked a little bit about options for being able to SSH into your home machine from anywhere. In this post, we’ll get into the details of my specific configuration, using the free ddclient tool for Linux, and a subdomain of a paid domain name with Namecheap.

    On our paid domain, which we will call “mydomain.net”, we’re going to add a subdomain that will point to our Linux box. That way, we can just SSH to “dynamic.mydomain.net” to reach our Linux box from outside our home network.

    You could make “mydomain.net” itself be your dynamic DNS URL if you really wanted to, but the point here is to re-use a domain you’re already paying for to host a website, as opposed to relying on free services.

    Go into Namecheap (or whatever you’re using), and drill down into the settings for mydomain.net. Go to Show All Records, and add an A record for 127.0.0.1. Yes, that’s localhost. It’s just a placeholder for now—when we’re all done it’ll be continuously updated to our home machine’s real IP.

    Next, apt-get install ddclient. ddclient is a simple command-line tool that will update the subdomain you just set up every so often, with your home machine’s current IP address. That way, the subdomain will always point to the right place. It was originally written for the popular DynDNS service I mentioned before, but now works with anything, including Namecheap.

    We’ll need to configure ddclient now, so edit its config file:

    sudo nano /etc/ddclient.conf

    My /etc/ddclient.conf looks like this:
    # Configuration file for ddclient generated by debconf
    #
    # /etc/ddclient.conf
    
    protocol=namecheap
    use=web, web=checkip.dyndns.org/
    server=dynamicdns.park-your-domain.com
    login=mydomain.net
    password='your_password_here'
    dynamic
    
    

    The use= line tells ddclient to first find out your public IP from a what-is-my-IP service run by DynDNS. It’s kind of curious that they still have that on and available to the public, while they discontinued their free dynamic DNS service. Also, you’d think you’d be able to figure out your public IP WITHOUT contacting an external website to do so, but I looked into it and it’s more trouble than it’s worth. If it bothers you that much, maybe look into whether or not your router has dynamic DNS updating built in.

    Use the following command to test out your ddclient config, otherwise it will just fail silently and not give you error messages:
    sudo ddclient --debug --verbose

    If you try to ping dynamic.mydomain.net, and the response comes from localhost, it means ddclient never updated your IP, and your configuration is probably wrong somehow.

    In my case, the ddclient service seems to be already running automatically on startup. You can check if it’s running or not with:
    service ddclient status


    If all goes well, you should be able to ping dynamic.mydomain.net and get the IP of your home machine! Just make sure you’re doing it from OUTSIDE your local network when you try it. I find a good way to do this is to take my phone off of my home wifi, and try to SSH in over LTE.
    • 1 week ago
    • 3 notes
    • #ddclient
    • #dynamic
    • #dns
    • #domain
    • #name
    • #namecheap
    • #ip
    • #ssh
    • #client
    • #home
    • #machine
    • #remote
    • #login
  • Use Dynamic DNS To SSH Into Your Home Machine From Anywhere

    I am currently able to SSH into my home machine, from anywhere, on any device that I authorize to connect with a proper SSH keypair. In my next few posts, I’m going to share how I’m doing that.

    To start, you’ll need a static URL that always points to your home machine, since your IP address at home won’t always necessarily be the same, and won’t be easy to memorize. To do this, you’ll need some sort of service to host your static URL, and a piece of software installed on your system that constantly updates what IP the static URL points to.

    Back in the day, there was a highly popular free service called DynDNS. Apparently it’s no longer free.

    For a while I was using a free service called No-IP, since they have a native Linux client. I eventually got tired of it, since it expires if your IP address doesn’t change for 30 days and you have to go into their web interface and renew manually.

    In the next post, I’ll show you how to use ddclient to set up dynamic DNS, with a subdomain of a paid domain name on Namecheap. I’m sure this will work with any domain registrar, but I happen to use Namecheap. I will never give GoDaddy or 1&1 my money again.

    • 2 weeks ago
    • 2 notes
    • #dynamic
    • #dns
    • #dyndns
    • #noip
    • #ssh
    • #tunnel
    • #home
    • #machine
    • #anywhere
    • #linux
    • #secure
    • #shell
    • #ubuntu
  • Quickly find out what user your web server runs as

    I just came across a clever way to quickly find out which user is running your web server. In this case it’s done with PHP, but I’m sure it can be adapted for Ruby etc:

    <?php echo `whoami`; ?>


    Brilliant!

    • 2 weeks ago
    • 3 notes
    • #php
    • #apache
    • #linux
    • #user
    • #account
    • #run
    • #webserver
    • #admin
    • #ruby
    • #web
    • #server
    • #nginx
  • Linux : How to find the actual read and write speeds of hard disk

    theshank:

    hdparm is a command line tool to find the actual read/write speeds of hard disk. To find the read write speeds of a drive, simply exexute the following command in terminal:

    sudo hdparm -tT /dev/sda

    the -t flag is for read timings and -T is for write timings.

    /dev/sda is the disk on which the read/write timing measurements are to be performed.

    In case hdparm is not installed, you can install it via command (in debian based distros):

    sudo apt-get install hdparm

    I’ll have to try this!

    Source: theshank
    • 1 month ago
    • 4 notes
  • Game Dev Tycoon, Awesome Indie Game for Linux

    Last week I heard an awesome story about an indie game studio called Greenheart Games, who released a game called Game Dev Tycoon. It runs on Windows, Mac, and Linux, and costs $8.

    In the game, you run a game development studio, and try to grow and make money.

    There was an interesting twist with the release of this game. Immediately after releasing it, the developers put a cracked copy onto BitTorrent themselves, pretending to be a release from a cracking team, etc. Only, the cracked version is rigged so that your company never really makes money, due to PIRACY.

    The game apparently collects anonymous usage data, and they found that over 90% of the game’s users were playing the cracked version.

    I was so impressed with their anti-piracy statement, being almost like an art project in itself, PLUS their support for Linux, that I had to give them my $8.

    The second time I ran the game, I got a very warm in-game email from the developers, explaining how it’s their first game and how awesome I am for purchasing the game legitimately. I like these guys, and I want them to succeed.

    Note that when I first tried to run the game on my Xubuntu 12.10 box, I got this error:

    error while loading shared libraries: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory

    You’ll need to install a library to fix that:

    sudo apt-get install ia32-libs-gtk

    • 1 month ago
    • 2 notes
    • #game
    • #dev
    • #tycoon
    • #game dev tycoon
    • #greenheart games
    • #indie
    • #linux
    • #xubuntu
    • #piracy
    • #cracked
    • #gtk
    • #awesome
    • #art
    • #project
    • #torrent
  • I'm sorry to bother you, I switched to Xubuntu 13.04 today and now I can't listen to music on tumblr because 'flash 9 is required' but youtube videos work fine. When I go to 'install missing plugins' it just goes on and on and nothing happens. Doesn't work on Chrome either. AFAIK flash is already installed. Could you please tell me how to look for answers (since I have been getting results for older xubuntu versions, or older flash versions). Thank you
    urihu

    Hey, sorry I didn’t notice your message before now… Tumblr’s messaging system leaves much to be desired :) I’m on Xubuntu 12.10 still, but I should still be able to help you.

    The official Flash for Linux was discontinued a while ago, so there haven’t been new versions for a while, and there won’t be any unless Adobe decides to support Linux again (unlikely). So, the official Flash for Linux is never going to be the latest version. Flash support for Linux lives on as the built-in Flash capability for Chrome, so in order for you to have the latest Flash on Linux, you basically have to be using the latest Chrome.

    If you were using Firefox, that may be why it didn’t work—as far as I know, Firefox for Linux relies on the official (and outdated) Flash for Linux (I may be wrong). However, you mentioned that it didn’t work in Chrome either. These two posts I made on fixing Chrome’s built-in Flash might help you:

    http://from-mac-to-xubuntu.tumblr.com/post/42270974583/how-to-fix-couldnt-load-plugin-in-chrome-for-linux

    And then this update:

    http://from-mac-to-xubuntu.tumblr.com/post/43394220513/how-to-really-fix-chromes-flash-for-linux

    If you fiddle around in chome://plugins as I mention in those posts, you should definitely have working Flash on Linux, even outside of Youtube. Let me know if you’re still having trouble, even send me some screenshots if you’d like.

    • 1 month ago
    • 1 notes
  • How To Fix Wrong System Clock When Dual Booting Linux or OSX with Windows

    This is an issue that had plagued me for years before I even tried to fix it, back from when I would dual boot Mac OS X and Windows so I could play games. My click in Windows would be off by a few hours, but in OSX it would be fine.

    This problem is caused by the fact that Windows saves the time as your local time zone’s time, whereas Linux and OSX work off of GMT.

    There are two ways to fix this—you can tweak Windows to stick to Linux’s time, or you can tweak Linux to stick to Windows’ time.

    Since Linux is our primary OS here, we’re going to do our tweaking on the Windows end so it stays true to the time we set in Linux.

    Boot into Windows, then open regedit.exe. If you’re not familiar with it already, you can usually just type “regedit” into Start -> Run, or in the Start Menu’s search box, depending on which version of Windows you’re using.

    Once in Regedit, navigate to:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation

    In the right-hand pane of TimeZoneInformation, right click in the white space around the registry entries, and select New -> DWORD (32-bit) Value. Give it the name RealTimeIsUniversal. Double click it to edit it, and set the Value to 1.

    Now all you have to do is reboot. When next you boot back into Windows, the time will be correct.

    • 1 month ago
    • 3 notes
    • #windows
    • #linux
    • #osx
    • #clock
    • #wrong
    • #local
    • #time
    • #zone
    • #gmt
  • Server tip: Create symlinks for frequently edited config files

    This might be obvious for some server admins out there, but here’s how to create soft links in your home folder pointing to config files you edit frequently, but don’t want to bother remembering the path to:

    ln -s /etc/mysql/my.cnf ~/my.cnf
    ln -s /etc/apache2/sites-available/default ~/sites-available-default

    In this case, those are my mySQL config file, and my Apache VirtualHosts file. Now from within your home folder, you can just go:

    nano sites-available-default

    Beats scrolling through your command history, anyway.

    • 1 month ago
    • #linux
    • #system
    • #admin
    • #symlink
    • #link
    • #mysql
    • #apache
    • #sites
    • #available
    • #unix
    • #config
    • #shortcut
    • #server
  • Can you suggest a good alternative for Dreamweaver. I've recently switched to Ubuntu.
    5x7

    I’d suggest Aptana Studio as a Dreamweaver Alternative. Not sure exactly what functionality in Dreamweaver you were using it for, but Aptana’s pretty complete and polished as an IDE. It also runs on Windows and OSX, fyi.

    Also available for Linux are Eclipse (which Aptana is based on), NetBeans, and Geany (Linux only). Personally I do my web development in Sublime Text 2, but that’s just a text editor and not a full IDE.

    • 1 month ago
    • 1 notes
  • Boris, a PHP Console like Ruby’s IRB

    The other day I discovered Boris, a REPL for PHP.

    If you don’t know already, REPL stands for Read, Evaluate, Print, Loop. It’s a script that serves as a console environment for you to play with and test code. If you’ve used the IRB console in Ruby, or the Scala REPL, you’ll already be very familiar with this concept.

    Among some, especially academic types, PHP has a reputation for being less elegant than other languages, and that’s putting it politely. However, PHP is fun to work with, and it’s been paying my bills for three years, so I’m always looking for ways to make it more civilized.

    You can download it from GitHub:
    https://github.com/d11wtq/boris

    From there, the “boris” executable is in the bin/ folder. You may want to put this executable into your PATH at some point, but for now you can just run ./boris to run it.

    Any statements you type into the console will be evaluated, and the results are printed onto the screen. Also, variables and changes you make within the environment are persistent for as long as that same console instance is running. You can include libraries and everything, so if you need to test code that relies on a framework, that’s no problem.

    • 2 months ago
    • 2 notes
    • #php
    • #boris
    • #web
    • #programming
    • #repl
    • #ruby
    • #rails
    • #irb
    • #scala
    • #console
    • #test
    • #development
    • #github
    • #path
    • #read
    • #evaluate
    • #print
    • #loop
© 2012–2013 From Mac To Xubuntu
Next page
  • Page 1 / 8