I’ve been exploring dockerizaton lately more and more and I think I like the idea of having my apps in containers. I am not going to lie, it does take some time to get used to, but it is pretty cool the things that you can do.
One thing that I think I wanted to accomplish was able to run X11 apps through docker. I found Docker Headless VNC container and that was slick. Where I was able to run a whole Xfce environment within a Docker container!!! kudos to those folks. Now, my challenge was that in my case, I didn’t want a fat image and/or configure each app to download of configuring. So, this wasn’t my solution at this time. So, I decided to explore further and found a way to run X11 from a Docker container in macOS. Below are the steps on how to accomplish this.
- Install XQuartz (X11), Docker and homebrew. You can follow their respective installation process.
- Install socat which is a “multipurpose relay.” This will allow us to call the display.
- Create you local Dockerfile. In this particular case, I am using Ubuntu latest (which at the time of this post is 16.04.1 LTS). On your terminal, you can do “vi Dockerfile” and paste the info from below in that file.
RUN apt-get update && apt-get install -y firefox
RUN useradd -ms /bin/bash developer && \
echo "\ndeveloper ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
ENV HOME /home/developer
- Then, let’s build the Docker image by doing the following…
docker build -t firefox .
- Now, on a different terminal, run the following command…
socat TCP-LISTEN:6000,reuseaddr,fork UNIX-CLIENT:\"$DISPLAY\"
- Then come back to your old terminal (or a different one) and run this command
docker run -ti --rm \
-e DISPLAY=$(ipconfig getifaddr en0):0 \
-v /tmp/.X11-unix:/tmp/.X11-unix \
- At this point, you should have opened a Firefox instance from your Docker container through X11 on macOS 🙂
If you didn’t… take a look at the steps again. Happy dev and opening other X11 instances.
Your ads will be inserted here by
Easy Plugin for AdSense.
Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.
If you install the new version of Ubuntu 11.10 Oneiric Ocelot you will notice that it comes with Unity installed in order to make a better OS experience. That could be very well true, but I do like to see my system monitor and see how my PC is behaving. Now, it can not be easily done with unity, but if you would like to do it, go to the link below and you will be able to find steps by using PPA in order to get your system monitor on unity. Also, if you don’t like unity you could go back to gnome, but that is something different that is not being cover in this article. 🙂
The following steps below from Ubuntu will guide you in terms of successfully upgrading your Ubuntu system from Natty Narwhal 11.04 to Oneiric Ocelot 11.10.
To upgrade from Ubuntu 11.04 on a desktop system, press Alt+F2 and type in “update-manager -d” (sans quotes) into the command box. Update Manager should open up and display following message: “New distribution release ‘11.10’ is available. Click Upgrade and follow the on-screen instructions”.
To upgrade from Ubuntu 11.04 on a server system, follow the steps listed below: Step 1: Install the update-manager-core package (if it is not already installed). Step 2: Use following command sudo do-release-upgrade -d to launch the upgrade tool. Step 3: Follow the on-screen instructions. Note that the server upgrade is now more robust and will utilize GNU screen and automatically re-attach in case of dropped connection problems, for example.
Source: OneiricOcelot/ReleaseNotes – Ubuntu Wiki.
just in case you didn’t know i created not too long my first linux bash script. the reason why i developed this was because i was getting tired of backing up my ubuntu linux system every six months. so, if you would like to be able to backup certain selected folders and files you could download a copy by going to Ubuntu Backup Before Upgrade site.
this one will allow you to have the lastest verison of amarok in your sources.
- add the following line to your sources list
deb http://ppa.launchpad.net/kubuntu-members-kde4/ubuntu intrepid main
- then find “amarok-kde4” on synaptic manager and install it
- the upgrade will take care of deleting the old amarok and installing the new one in
i’ve been using the older version of openoffice and i wanted to upgrade to 3.0 in ubuntu. well it is not as easy as … i download the files and then click upgrade. there are repositories that i need to download in order to install them properly. you will be using ppa (personal package archive) in order to have such of installation.
so what i did in order to have this upgrade automatically is the following steps:
- first you will need to open “
synaptic package manager“
- go to “third-party software” tab and then click on “add”
- add this following line
deb http://ppa.launchpad.net/openoffice-pkgs/ubuntu intrepid main
- now reload the package information the synaptic package manager and then upgrade
alright… i know that i am currently working on a paper but i had to do this. just as it right now i just experience the best application that i could ever imagine. i really hate people that chat through facebook chat and i really hate to be bother while i am stalking others :D. so what it is what i am talking about… the facebook integration to pidgin in order to use it as a instant message application, just like if you were using yahoo, msn, icq and others.
now i will be able to chat with my friends with no problem from my instant messenger. that is why i love open source applications, it gives you the freedom to use it which ever way you want it.
so in order to have facebook on your im you will need to get…
- pidgin at http://pidgin.im/
- facebook add-in at http://www.getdeb.net/release/3699
and that is it… NOTE: that this was tested on ubuntu (linux os).
this small tutorial will illustrate how to have your usb working with virtualbox. virtualbox has the usb support disable by default. if you want to have your usb to work properly with virtualbox you would have to perform the following steps.
this tutorial applies for ubuntu 8.10. but it might work with other distros.
- type “
sudo gedit /etc/init.d/mountdevsubfs.sh“
- go to the following block
# Magic to make /proc/bus/usb work
#mkdir -p /dev/bus/usb/.usbfs
#domount usbfs “” /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
#ln -s .usbfs/devices /dev/bus/usb/devices
#mount --rbind /dev/bus/usb /proc/bus/usb
change it to
# Magic to make /proc/bus/usb work
mkdir -p /dev/bus/usb/.usbfs
domount usbfs “” /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
ln -s .usbfs/devices /dev/bus/usb/devices
mount --rbind /dev/bus/usb /proc/bus/usb
- now go type “sudo gedit /etc/fstab”
- copy and paste the following code to your fstab
none /proc/bus/usb usbfs devgid=1000,devmode=664 0 0
you are almost done. now reboot your computer and you should be good to go.
before i show you how to install tor in ubuntu hardy, i am going to explain a little bit what exactly tor is.
Tor is a software project that helps you defend against traffic analysis, a form of network surveillance that threatens personal freedom and privacy, confidential business activities and relationships, and state security. Tor protects you by bouncing your communications around a distributed network of relays run by volunteers all around the world: it prevents somebody watching your Internet connection from learning what sites you visit, and it prevents the sites you visit from learning your physical location. Tor works with many of your existing applications, including web browsers, instant messaging clients, remote login, and other applications based on the TCP protocol.
Retrieved from torproject.org
So if you want more information go and visit torproject.org and you will be able to answer all your questions. so now lets go and install tor in ubuntu.
- Open your “Terminal” and type “sudo apt-get install tor”
- after tor is installed now you will need to install privoxy. for that you will need to go to this page and download you system architecture version (http://sourceforge.net/project/showfiles.php?group_id=11118&package_id=35042&release_id=627607). in my case is privoxy_3.0.10-1_i386.deb.after having both programs install now is all about configuration of just one of them ;).
- now, on your “Terminal” make a copy of the configuration file from privoxy folder. in my case would be “sudo cp /etc/privoxy/config /etc/privoxy/config-backup”
- make a new file with “sudo nano /etc/privoxy/config”
- paste the following information:
# Generally, this file goes in /etc/privoxy/config
# Tor listens as a SOCKS4a proxy here:
forward-socks4a / 127.0.0.1:9050 .
actionsfile standard # Internal purpose, recommended
actionsfile default # Main actions file
actionsfile user # User customizations
# Don’t log interesting things, only startup messages, warnings and errors
#debug 0 # show each GET/POST/CONNECT request
debug 4096 # Startup banner and warnings
debug 8192 # Errors – *we highly recommended enabling this*
Retrieve from https://wiki.torproject.org/noreply/TheOnionRouter/PrivoxyConfig
- exit out from the program (nano NOT terminal) and save it.
- go to this site to install the tor plug in for firefox. Tor Plug in.
- after firefox is restarted click on the “Tor Disabled” button in the bottom to enable it, and to check that it works properly go to check tor installation.
if it works, congrats. if it doesn’t sorry. go back and check this tutorial or go to tor website to get support.
so the other day my friend lend me his external hard drive so i could import some big files that he had on it. apparently he didn’t click on safe remove drive under windows and he disconnected the hard drive just like that. i say this because when ever i was trying to open the hard drive windows was saying that the drive still being used by another application. i couldn’t started in windows for nothing.
so i decided to move do the same thing in linux (ubuntu). apparently i was receiving the same error. after 30 minutes of trying i was getting tired and i was about to return his drive back and make him eject safely his hard drive. well… before doing that i thought… mmmnnn i wonde if there any free app that i could use in linux in order to fix this problem. guess what? YES, there is.
this app is called ntfs fix, and what it does is, fixes your ntfs drive. i installed in ubuntu using the following command:
$ sudo apt-get install ntfsfix
then after installing this app all i had to do was running the following commands:
$ sudo ntfsfix /dev/sdc1
$ sudo ntfs /dev/sdc1
where sdc1 is the external hard drive. then i mounted the drive and it load like a baby. well, i hope that this helps 😉