Tag Archives: xubuntu

My 1st impressions of a MAC

I have been always working with Windows and recently I have changed to Linux so it would be possible to boost my Desktop performance without much investment.

Working with Xubuntu for the past months has been wonderful, but now a major performance was need for necessary work. Talking with colleagues and friends, I have choosen a MacBook Pro, a extremly light weight notebook with a lot of power for the size.

Going to the Apple Store was fun. I had come to a store employee and told him that I needed a MacBook Pro that could hold a couple of Virtual Machines running at time and one of them was Linux. He got spooked, but actually helped a ton on choosing the correct one.

Easy setup, beautiful opening and yes, it is impressive. The first steps where easy, installing Skype, MSN Messenger Live, configuring email, installing the Eclipse PDT, VPN and installing VirtualBox, my main reason for using a Mac. I got pretty part of the setup of my environment done until I got stuck into some small problems.

Getting Apache working, configuring the httpd.conf and setting up some other development stuff. It took time, but most is done, now is just fine tunning.

There are some tricks that are usefull on a Mac and those I have learned today. Don’t get me wrong, I’m a confessed newbie on Mac’s, even knowing that I have already used Linux for a long time (believe me, it’s very similar, including commands, but is not the same).

The best trick: Use sudo nano to edit files that you wouldn’t normally do with a text editor because you don’t have permissions or the system don’t have permissions to it.

A very useful trick: Hit command + space to open the Spotlight. A mix of finder with run that allows you to execute command that is being searched and open documents.

There is much to learn with a Mac. Feels like that I’m on a Linux that was transformed into a “good guy” that can play cool games. Well, maybe we can change it back to a “bad boy” (Linux) and still play cool games 😉

So far, working with it has been wonderful, let’s see how it goes when I push it to the limit…

Back to old reliable Xubuntu 9.04

Yesterday, after spending some hours to get all development eviroment set, I have managed to finish the installation of the good and old Xubuntu 9.04.

It’s a bit faster than the 9.10 and so far, no errors what so ever. Next step, wait for the next stable release for Xubuntu and check out some forums before the upgrade.

Don’t upgrade to Xubuntu 9.10 Karmic

I have been working with Xubuntu for a while now and so far it has worked wonders at a point which I haven’t used Windows for months.

About 2 weeks ago I have upgraded my current Xubuntu 9.04 to 9.10 and this has become my biggest mistake ever.

Since the upgrade this is the kind of errors that I have been getting:

  • Skype doesn’t have any more sounds or can’t find mic
  • Applications Bar gone
  • Turning off or rebooting fails drastically making a hardware shutdown and power up necessary
  • And the latest, my XServer is gone (all the user interface that looks like Windows)  and with it the login screen (everything now is terminal)

From all the troubles so far, the Xserver is by far the worst. Since it is gone I haven’t been able to run it using my user and to execute it I have to run everything as root.

After making a short trip to Windows and checking Google to find some solution at least for the XServer, I could manage to make the everything come back, but all using root.

If you are about to upgrade DONT – This can be my best advise for you.

But if you are finding yourself in the same position that I was today then this is what you should do (you should be seeing only terminal at your screen):

  1. execute display – if your x-server have a problem, then it will warn you about
  2. now execute startx – this will start the xserver and all display options for your user. If you can see your Desktop, yeay, nothing more is necessary, otherwise you will need to run it as root (sudo startx)

Now is waiting for a good release of Xubuntu to solve this issues or reinstall everything from scratch.

Installing SAMBA on Xubuntu

samba is by far the best file / printer sharing service available for Linux. It will surely provides a way to share folders, files and printers with Linux systems and Windows systems, therefore installing it on Xubuntu have some tricks.

First, using Synaptic (or apt-get) install samba (lower case). It will also ask to install other libraries and install them as well.

The next step is to install swat (lower case) a web management tool for SAMBA. Just like SAMBA you can either use the Synaptic or the apt-get to install it.

Now come the tricks.

First make sure that the that the #<off># is removed in the /etc/inetd.conf file.

Now, with apt-get, install the xinetd server. This is the second most important step to allow SAMBA and SWAT to work together.

To finalize, open the xinetd.conf file (/etc/xinetd.conf) and add before the xinetd.d include:

# description: SAMBA SWAT
service swat
disable = no
socket_type = stream
protocol = tcp
user = root
wait = no
server = /usr/sbin/swat
port = 901

With this it will be possible to access SWAT by at your browser.

By default it will only enable the printer sharing to any users. To allow folder sharing, you must go to:

[Menu] Applications -> System -> Shared folders.

Now all is left is to configure SAMBA, a task that using SWAT, becomes very easy.

Have fun.

Creating a bash script on Xubuntu

Some times doing the same action again and again is quite anoying, so creating a bash script might be the easier way out.

A bash script is simply a file that executes a series of commands. Something very similar to bat files on Windows.

As many other Xubuntu and Linux users, I had no idea of how to create a bash script and how to execute. Well is pretty simple. While surfing the net I found a pretty good tutorial that will give you the basics of how to create a very simple bash script: http://floppix.ccai.com/scripts1.html

Now some notes:

  1. The extension of the bash script does not matter, but the usual is .sh
  2. If you are saving something that will be used globally, the best place to save is /usr/local/bin
  3. If you are saving something that will be used only by your user then save it at ~bin
  4. Linux will look for any command that is inside the bin dir, but you can access it on it’s current directory by typing ./command
  5. the script will be written using c++ mostly (that is Linux main language)

Have fun.

Readyboost for Xubuntu

I have been playing with Readyboost for Microsoft Windows Vista and it’s one of the best features (or the only good feature) that Vista has.

Usually I do my programming with a Xubuntu box, so I thought why not try the same with Xubuntu.

It’s not hard.

  1. Plug, if not plugged, the usb device
  2. Usually Xubuntu will mount the device (or at least show it for you on the desktop). Right click on the icon (Removable Volume) and check if it is mounted (if you can see the files inside the disk, it is mounted). If so, open a terminal screen and type mount. It will show a list of the mounted devices on y our PC. Try to identify the device name for your usb device. Usually is /dev/sda1, but, like in my case, it can change.
    1. Mount the device (if not mounted) and in a terminal screen, use the mount command to show a list with all devices mounted. If you are having trouble finding the device, copy the list to mousepad and umount the device (right click on the icon on desktop) and then, list the devices again. Most likely the device that is missing is your device.
    2. You can use the df -h to list the mounted devices and find out which one is the usb device
  3. Now, before creating the readyboost, you will need to umount the device, so go to the desktop and right click on the icon and umount it.
  4. Now let’s set up the swap file (readyboost).
    1. sudo mkswap /dev/sdf1
      1. Setting up swapspace version 1, size = 3917820 KiB no label […]
    2. sudo swapon -p 32767 /dev/sdf1
      1. This will set up the swap priority for last (to avoid priority mix with the original swap file)
  5. Last step, let’s check the swap files:
    1. cat /proc/swaps

It’s not as easy as Windows Vista, but you can always create a script to run this every time.

Have fun.

FreeTDS Connection Error with PHP and UnixODBC Troubleshooting

I have fought all this weekend with this hassle that is configuring the FreeTDS to correct work with PHP and unixODBC. Yeah, in this case we are talking all Linux.

Most of the times you will see something like this (actually the error message varies a bit, but…)

[unixODBC][FreeTDS][SQL Server]Unable to connect to data source.

What happens is that your data source configuration is either wrong or in the wrong place (yours trully).

To help you troubleshoot the error that you are getting, check the following configurations:

  • /etc/odbc.ini
  • /etc/odbcinst.ini
  • /usr/local/freetds/freetds.conf

Update: Make sure that you are editing the correct freetds.conf file. For that you can use tsql -C that will show you all variables that are enabled in compile time, including the location of the freetds.conf.

These 3 configurations together will construct your data source and when PHP with unixODBC and PDO-DBLIB tries to connect it will run all of those configurations to construct the connection. If you have a wrong configuration you will have that error.

Another thing that you can troubleshoot is checking the FreeTDS configuration in compile time ( tsql -C ). Check if all configuration is as it should. My issue was related to this. One of the configurations that I was missing was to enable freetds to work with msdblib module.

Other thing is to check if you have installed the unixODBC-dev package (source). When you install FreeTDS with unixODBC it will look for a sql.h library. This library is part of the unixODBC-dev package. Install it and it should be good to go.

I’m using Xubuntu 8.10 and 99% of the things that I have installed to make this work where done by the Symatic Package installer.

Hope it helps you as much as it did help me and if you have any questions, post it here and I will try to help you out as much as I can.

Installing Skype under Xubuntu 8.10

Installing Skype under Xunbutu is not hard, but if you are having problems while installing, there is a good chance that you either might have the wrong version (32 or 64 bits) or you are not able to download additional packages because you don’t have the source set (yours trully).

If this is your case, then the solution is simple: Using the terminal, add the source and update it, so you have all sources set. Since this will vary by version, check this post on the Mediabuntu Community under adding repositories.

Run both commands and downlaod the Skype package from the Skype Linux Download Page.

Run the package installer and you should be good to go.

Have fun [Linux Version]

Ubuntu from your flash drive

I was reading some articles around and I found an article that is great, installing Ubuntu into your flash drive. Off course you will have some requirements and restrictions, but it is a great feature to test it on.

I will do some tests and latter place the results here, but meanwhile you can check the full article at: xUbuntu Blog

%d bloggers like this: