Friday, December 28, 2012

Installing Samba and sharing files within a home or office network


There are innumerable tutorials to explain sharing a folder, a partition or a disk drive using samba. Here's one more, it doesn't hurt, on the contrary it may help someone.

The best way to use old laptops and desktops is by installing a Linux distro and experimenting with it as a file server. After you install the OS and later ssh, samba, remote desktop, apache etc., you can add it to the network and do all the rest with another computer through remote desktop or ssh.

I used Linux Mint 14, Nadia, which is superb, in terms of quality, functionality, ease and aesthetics. In my scenario, I have mounted the storage partition as /D in my Linux Mint box. For this tutorial, we are going to use an ordinary user named "john" who's password will be needed to login to the samba network.

I am going to tell you how to install samba and share your folder step by step:

1) Install samba

sudo apt-get install samba


2) Stop samba in case it is running

sudo /etc/init.d/samba stop


3) Backup your default samba config file smb.conf (this step is optional)

sudo mv /etc/samba/smb.conf /etc/samba/smb.conf.backup


4) Under home or any location create a new smb.conf using, vi, nano, emacs, gedit, or kate

the contents looks like this:


[test]
path = /D
available = yes
valid users = john
read only = no
browsable = yes
public = yes
writable = yes

Explanation:

i) What does [test] mean ? Your shared folder will be called test in the network, but you can use any name as you like

ii) What is /D? It is the path is the path to the folder you want to share e.g if you want to share a newdirectory in home, it would be /home/john/newdirectory
In my case, I mounted the NTFS D partition (of windows) as /D so I used it.

iii) Who is john? john is a user whose credentials will be needed to login to the shared folder. john can be replaced by any name you want to use.

Save the smb.conf file.

5) Copy your created smb.conf to its right workplace

sudo cp smb.conf /etc/samba

6) Change permissions of the shared folder in case it does not have read-write permission to all users
sudo chmod 0777 /D

7) Add a user with access rights to the samba share

Create user john without a home (i.e., /home/john) using /bin/true feature

sudo useradd -s /bin/true john

Create password for john (optional), if you don't want to use john as normal user login, you can skip this step

sudo passwd john

8) Make sure you add john to group plugdev

sudo usermod -a -G plugdev john

9) Create a samba password same as above (same as login password) to avoid confusion

sudo smbpasswd -a john

9) Test the parameters

sudo testparm

10) Restart samba

sudo restart smbd

VoilĂ  samba

Check your folder in your Linux (under network) or windows network (under Workgroup). Enter username john and password, now your old computer is a silent new file server.

To stop sharing and removing samba:

1) Stop samba

sudo stop smbd


2) Delete user

sudo userdel -r john


3)

sudo apt-get remove samba --purge


PS: I personally feel running a computer as a server continuously for trivial functions is a huge waste of power. So shut down your "server" whenever you won't use it for extended periods of time. Everytime you start the computer, samba will come alive and serve your folders and files.




Tuesday, March 27, 2012

Ubuntu Precise Pangolin - Another KDE user tastes Unity

The new Ubuntu LTS release looming in the horizon tempted me to try it out as a candidate for a my next Linux OS. Here's what I think.

Ubuntu 12.04 LTS is pretty stable for its current status as beta. The linux kernel at version 3.2.0-20 feels good and seems to support wider range of hardware. The AMD Turion CPU seemed to be reasonably cool while idle. But still Linux has a long way to go in terms of prolonging battery usage. All applications are up to date at least to the latest stable versions which is the best thing in Ubuntu.

Now jumping into the hot topic of opining about Unity, I have mixed feelings. I have migrated from my favourite KDE and experimenting with Unity here. To me Gnome is as strange as is Unity. So I am unlike any long term Gnome follower. Unity is stable enough at this stage than in Ubuntu 10.10 where it froze and was unusable in my laptop configuration. The best thing I liked is the use of the Windows button which triggers the HUD (Heads up display / launcher) and you can open up any program without the hassle of clicking various menus. This way of launching programs is a definite plus for CLI savvy users but might not impress everyone. Unity has simplified the use of menus significantly and in one way claimed more desktop space (I have set the left menu bar to autohide). Moreover there is only only top panel instead of two in Gnome 2.


Now coming to the things I don't like about Unity. I can't figure out why have they designed the launch bar to be on the left side of the screen. Leave aside usability, I have to say its huge and its ugly. I am not closed to change, but change should be beautiful. The dock at the bottom in MacOS X simply feels much more aesthetic.

The second major issue is again in the dock (left bar). All minimized windows go back to the left bar along with the launch icons. Its a new thing and all users must to get used to it. Instead of clicking the minimized programs in the bottom task bar, users have to seek their minimized programs stacked in the left dock. This is the major hurdle that many users face and its the same which makes people hate Unity. We are so used to MS "Windows" style operation that this is a big hurdle in usability. Again the buttons on the left is a hurdle from my point of view.


Every new gadget will have a new interface and people have to learn to use it. But computers to most of us is not a new gadget. If Ubuntu is targeting virgin computer users with Unity, then it might be a different thing, but not the general population who are used to computers since the age of Windows 95. Even for new computer adopters the usability of Unity is should be tested and can be improved.

I would say Unity is a bold move on Canonical's part but they have to be very careful to lure users not shun them away. As I see, they are not quite there in luring users. As many bloggers and columnists have pointed out, its hard for me to see where Ubuntu will be in another five years. They are betting everything in innovation which particularly is not so attractive as MacOS would have made.

But still Precise Pangolin will be a wonderful release and will form a great basis for the thousands Ubuntu based remixes to follow. So the greatness of Canonical's job is that despite Unity, their efforts will still play a major role in the Linux world.

My message to Canonical is, I like your ideas about innovation, but can you figure out a way to create a better dock.

Wednesday, December 07, 2011

Setting up proxy in Kubuntu

I have been forced to be away from Linux in my work place due to network proxy (with user authentication) in my Institution. The setup was difficult and even though done, it didn't work well with all the functionality, like apt-get, console ssh-es and wget-s etc. I had to use Windows for a while, but my heart felt something missing. That's due to my long time relationship with GNU/Linux. I love KDE and I feel not at home with Gnome. Though setting up proxy in GUI under Ubuntu provides it system wide upto to the console (konsole, terminal), it was not the case in Kubuntu. In Kubuntu, I could setup the proxy from the KDE control centre, but it provides the proxy info to GUI apps like Firefox where I am required to enter my username and pw with a pop-up. But there is a serious bug in KDE, that other KDE apps report a proxy authentication failure error even if I provided the right information. For e.g., Rekonq or Konqueror, would ask for proxy authentication the first time when I open a first page, it would open up that page. But, in the next time, if I provide the same proxy authentication, it would mention there is an authentication failure. I have had this problem several times in all KDE distros I have tried and its KDE bug that needs to fixed.

In frustration I tried several distros: Simply Mepis, Ubuntu and OpenSuSE 12.1. etc. I hate Gnome and now you can imagine the situation with Unity. Simply Mepis worked fine in resolving my proxy issues using the given Mepis control centre, but for some reason it stopped working after a while and it also did not allow reverting back to Kdenetwork manager. Opensuse, though I have I a high regard for that distro, did not work. Even in a proxyless environment in my home, its clunky YAST2 could not fetch the update repos. I couldn't figure out why? I have to say Opensuse's software repo refreshing (everytime which is default) is slow and patience testing. Debian beats OpenSuse infinite times in this issue. Its easier to setup the repos and the package info fetching is fast. Finally I returned to my good old friend Kubuntu. But I didn't know how to setup proxy for the console.

export http_proxy="http://proxy.xxx.xx:80xx/"

did not work:

Finally (Hurray) with the help of our uni's sysadmin, I figured out where the proxy environment is set in Ubuntu- /etc/environment (we grep -ed /etc * for "http_proxy" and found out where it is located.)

So to setup proxy in Kubuntu in CLI, as a superuser (sudo), edit /etc/environment file

append the following lines at the end*:

http_proxy="http://proxy.xxx.xx:80XX/"
https_proxy="https://proxy.xxx.xx:80XX/"
ftp_proxy="ftp://proxy.xxx.xx:80XX/"

*replace "proxy.xxx.xx" with your work/uni's proxy server name,replace "80XX" with your work/uni's proxy port number.

Save it and reboot your system. You can get internet in your konsole and you can ssh, ping or wget to any computer in the web.

Now I am back at work with my favourite KDE :)

Additional how-t0 :

To setup apt-get to your proxy environment, create a apt.conf file in your /etc/apt/ folder and specify the proxy like this. As a su or sudoer edit apt.conf file (create one if there isn't)

Acquire::http::Proxy "http://username:password@proxy.xxx.xx:80XX";

Tuesday, March 09, 2010

PCLinuxOS 2010 mini review

The much awaited PCLinux OS 2010 was released in beta yesterday. Time for another celebration and another install test. PCLinux OS (PCLOS) is all I wanted, a stable KDE distro with the latest KDE 4.4.1 and Firefox 3.6. I spared no time and tried the beta on my Virtualbox setup.

Look & Feel

The heavily modified KDE theme strongly personifies PCLOS. But most of its elements and layout remind of its mother Mandrake (now Mandriva). The theme is no stranger to all of us who have tried/used PCLOS. The bluish theme is inviting and soothing and at the same time characteristic of a unique distro. The selling points of the distro, the PCLOS control centre, synaptic package manager and the KDE control centre are neatly displayed on the "quicklaunch" bar. The menu is old KDE style instead of the kickoff menu which I prefer. The system settings are also as expandable trees (just like KDE3) instead of icons which is the norm in many other distros.



Applications and Multimedia

The choice of applications is very apt in my point of view. For example, Imagemagick is installed by default in the graphics category , DVD slideshow maker is installed in video, and system cleaner and unncessary file cleaner are installed in file tools category. These are programs which one does not use often but they are very important for productivity and maintaining the system. The default install took around 2.6 gb. The full set of KDE games are installed by default. Interestingly, Wally the desktop wallpaper changer is there. As if to mock Ubuntu's decision to drop it from the default install, Gimp is installed by default in PCLOS. Obviously, due to space constraints Openoffice is not installed by default but can be easily installed by using a shortcut from the menu.

As expected flash worked out of the box (though its a version older than in Adobe's site). Firefox played Apple trailers with mplayer plugin. In many distros just installing the right plugin does not play Apple trailer movies, you have to tweak firefox user agent to let Apple play its movie trailers on your computer. Amarok (2.2.2.90) is the default music player and Dragon handles all video files.



Conclusion

If you are looking for a Linux distro specialized for the common everyday desktop computer then PCLOS is the number one choice. Like the much advertised MacOSX, PCLOS is ready to do every fun stuff, like watch online videos, download files using torrents, do some photo editing make DVD slideshows etc., right after install. PCLOS 2010 is the first release featuring KDE 4 as default desktop. Despite using KDE 4, the PCLOS architects have managed to maintain the original and unique style of this great distro. Though KDE4 series is radically different from KDE 3, an average Joe user who installs PCLOS 2010 wouldn't be able to tell the difference. I think this would greatly help in KDE 4 adoption among more and more people. I am looking forward for the final release to install on my ASUS Nova lite mini desktop at home which is currently running PCLOS 2009.

Saturday, February 20, 2010

Kubuntu Lucid Review

I am an early adopter of KDE 4 and I welcome the radical changes it has made from earlier versions. I have been using KDE 4 from 4.0 release and has been following its growth from simple & buggy to feature-rich and mature. The fifth installment of KDE 4, KDE SC 4.4, released on February 9th caused a lot of excitement among KDE fans like me. I could not wait for the shiny new packages arrive in a distro near me.

Kubuntu seemed to be the winning choice because I have seen early KDE 4.4 reviews state that Kubuntu was the easiest and less buggy path to 4.4. In this article, I will be reviewing both Kubuntu Lucid Lynx the new KDE SC 4.4. I chose the 32 bit version of Kubuntu Lucid Lynx alpha 2. The test machine was Compaq Presario V3000 series (V3624AU) with AMD Turion 64 X2 @1.8GHz cpu, 3 GB RAM, Nvidia GeForce Go 7150 integrated display card and Broadcom wifi card.

Installation

The install was a routine Kubuntu ubiquity based install, but very polished (inspite being an alpha release). Soon after the install, I upgraded to the latest packages. The inclusion of open source Nvidia Nouveau drivers in the mainline kernel 2.6.32 has led to crisp fonts and perfect detection of screen resolution in comparision to earlier Kubuntu versions. As with other Kubuntus, I had to connect wired internet to allow Jockey download and install Broadcom wifi driver. After installing the Broadcom STA wireless driver I could easily go online wirelessly. There was a minimal glitch that the Nepomuk strigi indexer complained about missing virtuoso server which was solved by installing Openlink Virtuoso open source edition. Hopefully this problem would be solved in the final release.


Boot-up time

After the final install/upgrade the bootup time was noticeably faster as promised for Lucid Lynx by Ubuntu developers. The bootup time was as follows: grub to login, 20 secs; Kdm login to fully loaded desktop, 19 secs; Total: 39 secs. I feel this speed is pretty impressive.

The default Oxygen theme and the default wall paper (Ethais) by Nuno Pinheiro was elegantly stunning and in my view truly rivaling Mac OSX.


Packages

As soon as I logged in, I installed Firefox (FF 3.6) with the firefox installer (yes, you can notice, Yahoo is the default search). As soon as I fired up Amarok (ver. 2.3 beta 1), it prompted to install all the necessary codecs, which was also done smoothly. Amarok 2.3 shows a lot of cosmetic changes. I could play youtube videos, but in Full HD 1080 P or HD 720 P videos were extremely choppy. So again I fired up Jockey to install the latest (as recommended by Jockey) Nvidia driver and restarted X. I tweaked the settings in Nvidia control center and the fonts, graphics and youtube videos were pixel perfect. Openoffice installed was version 3.2 RC 4. Chromium browser is in the repos, so I could easily apt-get install it and it worked perfectly. (Chromium will be my browser of choice because of its better looks). Skype (2.1.0.81 beta) from the official site worked flawlessly.


KDE 4.4

KDE 4.4 shows lot of improvement in terms of speed, robustness and maturity. There are lots of subtle changes which a seasoned KDE 4 user will notice. Oxygen theme seems even more polished. A few of the new features are tabs within windows, the destop widgets shown as a strip above the task bar, hovering the mouse over a minimised window in taskbar showing motion in youtube videos (just like Win 7). Folders show the content within, the system tray can be expanded or collapsed, the USB device manager has moved to the system tray. As a result of the "semantic desktop", searching the KMenu also shows the files related to the search term (again as in Win 7 or Mac). There are lots of features which remind of Windows 7 like double clicking the window title bar expands it to full length. Composting and window transparency is done wonderfully well (provided there is a decent graphics card). Overall I am very much satisfied and happy with KDE 4.4 release and it could easily make Gnome and other DE fans jealous, let alone Windows 7 and Mac OSX users. I would not agree to anyone claiming that KDE 4 is still buggy and sluggish.

Conclusion

Though in early stages of development, Kubuntu Lucid Lynx, proved to be robust and efficient in showcasing the newest KDE. I did not encounter any major problems so far except that I could not mount the NTFS partion from Dolphin and access the files (I got an error: org.freedesktop.Hal.Device.Volume.PermissionDenied: Refusing to mount device /dev/sda3 for uid=1000.).

This level of perfection reflects on how good the final release version is going to be. I would recommend Kubuntu Lucid to any serious KDE user instead of the current stable Karmic. I would rate 4/5 stars to Kubuntu Lucid Lynx at this stage. Take the plunge and enjoy KDE 4.4 with Kubuntu Lucid. Here's a link to more screenshots from my Picasaweb album.
Kubuntu_Lucid

Friday, February 12, 2010

Simply Mepis 8.5 beta4 review

Despite being a self-confessed distro-hopper, I have dwelled for a long time with Sidux. As a hardcore KDE fan, the obvious choice was to test Simply Mepis 8.5 beta 4. I carry a high opinion about Simply Mepis since I have used it some 5 years ago. It was a perfect desktop and the reason for my liking towards KDE. Later I have hopped to Kubuntu, Debian testing and finally to Sidux.

Sidux, though a wonderful distro, has its own minor irks. Firstly, the font rendering is very bad in Iceweasel. Secondly, though they claim that Iceweasel is just a renamed Firefox, I don't like its ugly looks in terms of the skin, progress bar etc. (probably a problem of Debian's tendency of having attractive looks). I am using a 64 bit install and I can't find a suitable 64 bit Firefox binary in Mozilla's website. Since the browser is inevitably the most important program in an OS, I ventured to lookout for solutions.

Mepis was particularly attractive because it has Firefox inspite of being very Debian underneath. I tested out the 32 bit version of Simply Mepis 8.5 beta 4 on a virtual machine giving it a mere 512 MB of RAM.

After upgrading all the packages to the latest ones, Mepis proved to be a real winner. KDE was at version 4.3.4 and Firefox, the default browser in Mepis was at 3.5.6. As expected with Mepis, flash worked out of the box but it was not the latest version available in Adobe's site. After tweaking the fontconfig-config and enabling antialiasing from the KDE control centre, fonts were rendered beautifully well. I installed Skype from the repos, and Google Chrome from Google's website. Both worked flawlessly. OpenOffice was at version 3.1.1, packaged by Debian developers. Okular was missing so I could not open PDFs in the default install.

Support for Google gadgets was installed by default and I could easily add my favourite feeds and read the full articles in Firefox. Even Konqueror worked fine and had the best font rendering as expected of a browser well integrated into KDE. When I set the brower identification to Firefox 2 for google.com, Gmail also worked well.

Overall Simply Mepis 8.5 is a joy to use. The choice of fonts, window decorations and wallpaper, though not jazzy, is professional and elegant. The maturity and stabilty of the OS is contradictory to the beta tag. Anyway, I wish to see the latest KDE SC 4.4 and Firefox 3.6 enter into the isos before the final release. Simply Mepis is feature-rich distro that can be totally trusted to accomplish to your day to day computing tasks with pleasure.

Though I would love to install Simply Mepis on my work desktop, I wish to try out another contender Mandriva 2010 before I come to any conclusion. Here's a couple of screenshots of my Simply Mepis experience.




Saturday, November 15, 2008

Nvidia's (beta)180.06 driver solves panel flickering problem with KDE 4 + OO

Using Open office in KDE 4 triggers panel flickering / ugly looking panel. But the recently released Nvidia beta driver 180.06 (released Nov. 14, 2008) solved this longstanding problem. Now I am a happy and satisfied KDE 4 user. The link to the installers for x86 and x86_64 architectures are here and here. Here's a screenshot.