Posts Tagged ‘linux’
Posted by mcloide on November 20, 2009
I was having this little bit of trouble with Windows Vista accessing my files on the SAMBA server.
After a little research I have found a great post wich gives a great trick to work out the imcopatibility issues between Vista and Samba.
Follow the link: Get Vista and Samba to work
Posted in linux | Tagged: linux, samba, vista, vista and samba, compatibility | Leave a Comment »
Posted by mcloide on November 19, 2009
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.
Posted in linux | Tagged: linux, restore, xubuntu, xubuntu 9.04 | 3 Comments »
Posted by mcloide on September 28, 2009
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 127.0.0.1:901 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.
Posted in linux | Tagged: install, linux, samba, swat, xubuntu | 1 Comment »
Posted by mcloide on May 20, 2009
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:
- The extension of the bash script does not matter, but the usual is .sh
- If you are saving something that will be used globally, the best place to save is /usr/local/bin
- If you are saving something that will be used only by your user then save it at ~bin
- 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
- the script will be written using c++ mostly (that is Linux main language)
Have fun.
Posted in development, linux | Tagged: bash, linux, script, xubuntu | Leave a Comment »
Posted by mcloide on May 18, 2009
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.
- Plug, if not plugged, the usb device
- 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.
- 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.
- You can use the df -h to list the mounted devices and find out which one is the usb device
- 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.
- Now let’s set up the swap file (readyboost).
- sudo mkswap /dev/sdf1
- Setting up swapspace version 1, size = 3917820 KiB no label [...]
- sudo swapon -p 32767 /dev/sdf1
- This will set up the swap priority for last (to avoid priority mix with the original swap file)
- Last step, let’s check the swap files:
- 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.
Posted in linux | Tagged: linux, readyboost, xubuntu | 2 Comments »
Posted by mcloide on May 6, 2009

I have been strugling with this issue for the past 2 days. After updating Xubuntu 8 to the 9th core, the VPNC started to act different from what it was before and every time I have connected to the VPNC it was killing the connection for the Internet.
I was discussing this with a friend of mine, much more experienced with Linux, and he told me what was going wrong.
The VPNC removes the default route that connects you to the INTERNET, connecting you only to the private network. If you want to have both of worlds at the same time, you will need to add a new route to the VPN.
Doing this by the GUI is extremely annoying so he did sent me a good article teaching how to do this using the command prompt.
Go to: http://www.gentoo.org/doc/en/vpnc-howto.xml and go more specifically to the #7 item.
Follow what is being told and you are good to go.
Just a note, you need to be a route for that, so use the sudo command to help you out.
Posted in linux, resources | Tagged: connection, fix, internet, linux, vpn, vpnc, xubunut | Leave a Comment »
Posted by mcloide on January 13, 2009
If you have a Windows box to develop web applications and then, for production and quality, uses Unix / Linux box you should know that there are some little things that you should take care of. No need to mention the fact that on Unix / Linux everything is case sensitive and on not on Windows (even knowing that Apache threats everything as case sensitive on Windows) is the number one thing that can break if you are migrating from Windows to Unix / Linux, but there are some functions that might work differently and break if you don’t take a more chirurgical look.
For a smart and small example take a look on the mkdir function from php. All you need to do is enter the path, writing mode (chmode) and if is recursive. On a Windows box if you enter something like mkdir($path,’0777’,true) or mkdir($path,0700,true) it will create the folders in the path but will as well set them as writable, even if you said not to, but on Unix and Linux that would not work.
Take a look on the first function, mkdir ( $path , ‘0777’ , true );
If you set your script to create the folder path like this in a UNIX box, it will be created, but the permissions will be wrong. The second argument for the function is an integer and not a string, therefore the permissions would not be created correctly and if you tried to upload a file to the directory, it would fail on permission denied. On a Windows box this is totally bypassed.
Another thing to consider is the way that Windows creates the path. If you use something like c:\path\to\root it will fail on a UNIX or Linux box. To avoid this you need simply change the back slash for the forward slash (c:/path/to/root). This will work on both platforms’.
Small cares like this can make your life way easier while developing in PHP.
Have fun.
Posted in PHP, development | Tagged: case sensitive, developing, linux, mac, multi-plataform, PHP, unix, windows | Leave a Comment »