Search This Blog

Showing posts with label linuxtips. Show all posts
Showing posts with label linuxtips. Show all posts

Thursday, 18 August 2011

Five tips for printer sharing in Linux


Five tips for printer sharing in Linux
Takeaway: Admins often shy away from sharing a printer from Linux. Following are few simple steps that can simplify setup and sidestepping problems.
Printer sharing in Linux isn’t all that hard. But when asked to set it up, most admins would rather chew off their own arm. Why? Lack of familiarity? Ignorance? Who really knows. But the truth is, it’s not hard and it makes for an incredibly reliable service.
Let’s take a look at some tips that will make sharing out a printer from the Linux operating system much easier for both the admin and the end user.

1: Use the GUI

Both GNOME and KDE have incredibly easy graphical tools to help with the sharing of files, folders, and printers through Samba. The printer sharing feature is found in the Printer Preferences tool on both desktops and can be configured on both the printer and the server levels. The printer level is where the printer is actually shared out, whereas the server level is where a number of options can be set. Most instances will only need the printer-level settings.

2: Make sure Samba is configured properly

One of the issues you will find is that if Samba isn’t configured properly, no amount of GUI will help. This is especially true in a mixed environment. If you do have a mixed environment (especially Windows and Linux), it will be crucial that Samba is correct. Make sure the security= line uses the right mode and that files can be shared to all necessary clients. Once you’ve established that, verify that the entry for the printers is correct. You’ll be looking for two sections: [printers] and [print$]. The former is the global printer configuration and the latter is the configuration necessary for Windows clients.

3: Provide drivers

Unless you’re okay with going to every client and installing drivers for the printers, you will want to have drivers for all flavors of Windows on your printer server for use. These are configured in the [print$] directive in the smb.conf file. The most important entry in that is the path = variable. This will be where the drivers are stored. By default, this is /var/lib/samba/printers/. Make sure you have the explicit pathname to these drivers and to make your life easy, take out any spaces in the directory names for the drivers.

4: Make sure Samba is starting at boot and iptables isn’t blocking

I have found this to be a sticking point in some instances. If power goes out and the Linux machine sharing the printers goes down, Samba may not be running when the machine restarts. When this is the case, no one will be able to print. Of course, how this is done will depend upon which distribution you use. Some distributions offer a GUI tool for this task and some do not. NOTE: Do not do this through the Startup Applications GUI, as that is for user-level applications. Also, make sure your firewall isn’t blocking the ports for printer sharing. The most important port you need to have open is port 631, which is the CUPS (Common UNIX Printer System) port.

5: Grab a Web-based admin tool

CUPS offers an easy-to-use printer configuration tool. Go to http://address_to_printer_server:631 and you will find a tool that makes configuring your printers a snap. To use cups for printer sharing (UNIX to UNIX), you can use the cupsctl command (man cupsctl for more information). For UNIX-to-Windows or UNIX-to-Mac printer sharing, you will need to use a Web-based tool like Webmin. NOTE: When using Webmin, your smb.conf fill will be rewritten. I would make a copy of that file before using Webmin. Samba used to have a tool called Swat for Samba printer sharing setup, but that tool is no longer maintained.

Avoiding problems

As we all know, printing is one of those administrative tasks that can go wrong for so many reasons. Add the layer of multiple platforms and the level of challenge grew even greater. But with the above tips, you should be five steps closer to having your Samba printer server up and running.
**************************

Saturday, 6 August 2011

10 ways the Linux community can fix the mess on the desktop


10 ways the Linux community can fix the mess on the desktop

Linux

1: Ubuntu needs to drop Unity

Okay, this one is a bit harsh, but Ubuntu made a huge mistake with Unity. Ubuntu simply needs to admit defeat and use GNOME 3 as its default desktop. I realize that Unity is young, but it’s an idea that simply isn’t flying with the Linux community and does not improve on what GNOME 3 offers. Because of that, there is little-to-no reason to keep it around. I gave Unity as much of a chance as I could (as did many of the Linux users I know), but it’s just too flawed. Although GNOME 3 has not exactly been welcomed with open arms, it will eventually become the standard GNOME.

2: Classic GNOME should be forked

I initially thought that Classic GNOME, like KDE 3, should be retired. This is a good idea with regard to GNOME 3, but it causes problems when machines are low-powered or do not have the graphics hardware to run GNOME 3. So instead of retiring it, fork it so it can exist as a different choice altogether. I have to admit, of all the desktops I have used, the latest classic GNOME is probably the most solid. Not only is it stable, it’s not nearly the resource hog that certain other desktop tend to be. Let GNOME live — but as a fork to ease the burden on the GNOME developers.

3: A uniform compositor should be used

I can’t help it; I’m a fan of the compositor. I really enjoy desktop effects, transparency, the cube, you name it! The only problem is that every desktop that can use a compositor uses a different one. At one point, most of them simply employed Compiz. Not the case now. KDE has its own compositor, E17 has Ecomorph, GNOME has Mutter, and so on. Why is this? Compiz, for the longest time, worked with both GNOME and KDE. Why couldn’t the desktops simply decide to stick with Compiz and adapt that as needed? There is no reason to reinvent the wheel!

4: Distributions need to make alternate desktops easy to install

Back when I first started using Linux, the installation process allowed the user to choose from a long list of desktops. That was when a Linux installation spanned four to six disks and could take an hour or two to install. Now everything is focused on the Live CD, which does not allow for the inclusion of multiple desktop installation. That can be fixed by simply allowing users to select their desktop of choice and then having the package manager download and install during the operating system installation.

5: Distributions need to stop modifying desktops

This can get really annoying and is a challenge to support. Many distributions decide it best to modify the desktop for whatever reason. This isn’t necessary. Distributions should stick with the default configuration of the desktop and leave the configurations to the user. This standardization will go a long way toward simplifying support and will help to ease users into the Linux desktop. If GNOME 3 and KDE are the same across the board, users won’t have such trouble when choosing distributions.

6: GNOME Shell should be more configurable

As it stands, GNOME 3 isn’t all that configurable. That was one of the great things about Classic GNOME — users could configure that desktop to their heart’s content. Now? Not so much. In fact, GNOME 3 seems to have gone the Apple/MS route and locked the user into the configuration the developers think works the best. That is counter to the heart of the Linux user.

7: Alternate desktops need more exposure

I don’t know if you are aware of this, but there are some incredible Linux desktops available. You can find everything from the bare-bones, lightweight desktop to the eye-candy heavy do-it-all desktop. The problem is that most users don’t know about them. These alternative desktops really need to make an effort to get the word out that they exist. Instead of settling for living in the fringes, desktops like E17 should be widespread. Xfce is an amazing combination of lightening fast and feature rich — why don’t more people know of this? If these desktops were better known, the GNOME 3/Unity/KDE 4 drama would ease up.

8: All desktops need a more standardized configuration

I’ve always thought the desktop could use a bit of standardization (while holding on to individuality). This would go a long way toward making the major desktops a bit user friendly. Both KDE and GNOME 3 are trying to go this route and they are almost there… but it needs to be taken further. The “control panel” tool should be easily recognized and accessed by users. KDE calls its tool System Settings, but that could easily lead one to think that user preferences won’t be found there. If Microsoft has a patent on the term Control Panel, KDE and GNOME (and E17 and Xfce and…) need to come up with a unified term for this tool so that even new users immediately know what the tool is used for.

9: Distributions should decide who their audiences are

Is Ubuntu for new users only? What about Fedora? Linux Mint? Who do these distributions ultimately target? With this question answered, the choice of desktop would be much easier. If a distribution is truly for new users, would you put GNOME 3, Unity, or KDE 4 on a distribution for them? I would suggest KDE 4. Although the new user might face some challenges, it at least offers a level of familiarity that neither GNOME 3 or Unity offers. Or maybe Xfce would be the ideal desktop for a new user. But ultimately, the distributions need to decide who, precisely, they target.

10: Lightweight versions of EXISTING desktops should be created for low-powered and netbook machines

If Unity were killed, a lightweight version of GNOME 3 would need to be created to satisfy those using low-powered and netbook computers. GNOME 3 is not for old hardware. Although there are plenty of distributions available that can power lesser machines, both GNOME and KDE offer features that would appeal to the modern user (such as integrated Gwibber and other social tools). This could easily be accomplished by removing the compositor and unnecessary packages.

Time for a Linux revolt?

There is no single, ideal solution for the issues at hand. But the Linux desktop situation needs some attention before it gets out of control. I would hate to see a complete revolt against the current crop of desktops, but if it comes down to that, I’m all for a revolution. When that revolution comes, you will most likely see me happily computing away on Bodhi Linux, which offers the best of Ubuntu and E17.






***********************************

Monday, 1 August 2011

3 Easy Ways to Connect to Windows Shared Folders from Linux



3 Easy Ways to Connect to Windows Shared Folders from Linux


Connecting to file servers is something most people do on a daily basis even without thinking about it. In Linux, it may not be intuitive how to quickly connect to a samba or ftp server without a separate program. Here are a few different ways to connect to a remote file server without needing to touch a terminal.

Using Keyboard Shortcut
You can connect to a server by opening the run application window with the Alt+F2 keyboard shortcut. You will just need to specify the server type by adding the protocol at the beginning of the command. For example smb:// will connect to a samba share; other supported protocols are ssh, ftp, sftp, http, and https.

Note: In the example below my server name is playground and the shared folder is called music.

1
If your server requires a password to connect, fill out the next window that pops up and select how long you would like it to store your password.

2

A Nautilus window will automatically open with the server you just connected to, and you should have a shortcut under places on the left side and a shortcut on your desktop.

3

From GNOME Menu

If you are using Ubuntu, and many other GNOME based distributions, you will have a places menu on your top menu bar. Open that menu and click connect to server.

4

A new window will open up with a drop down so you can select what type of server you are connecting to.

5

For a samba/cifs server select Windows share and fill out the required information.

Note: Unlike the run application window, you do not need the slashes to connect here.

6

Alternatively, you can also get to the connect to server window from Nautilus’ file menu.

7

With a Shortcut

If you would like instant access to the connect to server window from your GNOME menu bar right click on the menu you would like to add the shortcut to and click add to panel.

8

In the window that pops up, search for “connect” and connect to server should be one of the results. Highlight the shortcut and click add at the bottom of the window.

9

Now you will have an additional shortcut on your GNOME bar for easy access.

10

***************************

Monday, 18 July 2011

Five tips for a smoother Linux command-line experience

Five tips for a smoother Linux command-line experience

Takeaway: Many Linux users find the command line intimidating and avoid it like the plague. But these tricks and shortcuts can make the command line more manageable — and downright useful.

When I talk to new (and some even not-so-new) Linux users about the command line, I sometimes get a fairly high cringe factor. This always surprises me, seeing as how the command line is not that difficult. Nevertheless, there it is: Many users simply do not want to use the command line. I get that. But the truth is, at some point, the command line might well be a necessity. And when it is, it’s good to be comfortable using it.

Here are five tips to help make the Linux command-line experience much smoother. I’m not digging deeply into any specific command. These are just a few pointers that will help users understand what they are doing and how to make it easier.

1) Aliases
Certain commands can be ridiculously cumbersome to type. They go on and on and on with options, switches, addresses, and more. Not only are those command painful to type (over and over again), but they’re also a challenge to remember. Fortunately, the Linux command line has a built-in ability to create aliases for those commands. Aliases are lines that are entered into the ~/.bashrc file under the “#some more aliases” section. The format of the alias looks like:
alias ALIAS=COMMAND
where ALIAS is the nickname of the alias and COMMAND is the full command of the alias. There may be instances where the full command must be placed in single quotes (if there are spaces in the command). The best way to test an alias is to do the following:

  1. Open a terminal window.
  2. Create the alias by editing the ~/.bashrc file.
  3. Save the ~/.bashrc file.
  4. Open another terminal.
  5. Test the alias. If the alias works, you’re done. If not, go back and re-edit the file.

2) Terminal history
Open up a terminal window and hit the Up arrow on your keyboard. You should start seeing a list of previously issued commands. This is your bash history. The history keeps a list of the commands you have run and allows you to rerun them simply by locating them in the history (until the command you want shows up at the prompt) and hitting the Enter key. By default, at least in the Ubuntu distribution, the history will contain the latest 1,000 entries. You can change that in the ~/.bashrc file. Look for the line HISTSIZE=1000 and change the number to reflect whatever you require.

3) Tab completion
This is a great tip that always helps. If you are unsure of the exact name of a command, but you know the first couple of letters, type them and hit the Tab key. Bash will then attempt to complete the command for you. If there are multiple possible entries, it will ask whether you’d like to see all of them. This is a great way to locate commands when you can’t remember the name or you simply don’t want to type the entire command. For example, say you know there is a command-line way to start the GNOME Control Center, but you can’t remember the command. You’re sure it starts with gnome, so you type gnome and hit the Tab key. Bash will display a number of possible options, including gnome-control-center. There you go.

4) Running multiple commands at once
Running multiple commands is helpful when compiling applications. Instead of running ./configure, wait for that to complete, then make, wait for that to complete, and then make install, you could instead combine them together like so:
sudo ./compile && make && make install
Notice the use of sudo. It’s needed because the make install command most always requires administrative rights, since this command is copying the executables into the correct directory (usually /usr/bin, /usr/sbin, or /usr/local/bin). Of course, if your compile or make requires any options, you can add them at the same time.

5) Running a second command with prior command arguments
This trick is great. Say you search for the directory ~/firewalls, only to find out that the directory does not exist. Instead of having to issue the command mkdir ~/firewalls, you can use a special trick to auto-magically create that directory. The trick in this case, would be
mkdir !*
The !* characters tell bash to run the new command using the previous command arguments. Here, the arguments are ~/firewalls. The mkdir command is run using the arguments from the previous command, so the full command is then mkdir ~/firewalls. Although this is a simplistic example, it illustrates how this tip can be useful.

Friday, 8 July 2011

Five tips for improving Linux Server performance

Five tips for improving Linux Server performance


Most Linux server distributions, out of the box, will outperform proprietary systems. But that doesn’t mean there aren’t things you can do to improve the performance of your server. In fact, there are always ways to eke out a bit more performance, no matter the operating system. But in this article, I want to speak directly to boosting the performance of the Linux server.


1) Kill services that are not needed
This particular trick will go a long way toward improving the performance of your server. With some Linux servers, certain services seem to want to run by default, regardless of whether they are being used. If that is the case, make sure those services are not running. For example: Samba. If you’re not serving files to Windows or other platforms, kill the Samba daemon. The same holds true for many other services. Your best bet is to decide what your server IS doing and then go through and kill what it doesn’t need. This will also have the benefit of making your server more secure.


2) Pay close attention to SELinux
SELinux is an often misunderstood tool. Its purpose is to enhance the security of a server or desktop. It is there for a reason and should not be stopped altogether. It should, however, be configured to meet the specific needs of your server. SELinux is quite powerful, and if it’s improperly configured, that power can rob your system of much-needed CPU cycles and slow down data throughput. If your distribution uses SELinux, be sure you have a strong understanding of it so you can fine-tune it to meet your needs.


3) Compile software from source
This might seem a bit counterintuitive, but when you compile your software from source, you can often run the compilation with flags and arguments highly specific to your hardware and/or needs. This goes for software that runs services and, of course, the kernel itself. The more hardware/need-specific you make your software, the more performance you will gain. Of course, this does require some experience with installing from source. I would recommend starting with this method on a test machine to get used to how the software can be better tailored to fit your situation.


4) Keep updated
This is insanely important from both a performance and a security standpoint. I see it so often: administrators ignoring updates for fear the updates will break their currently running software. If you are one of those admins, I recommend having a testbed server that mirrors your production server. With that testbed in place, you can run the updates prior to running them on the production machine so you will know precisely what could go wrong. From my experience, though, it’s a rare occasion that something does go wrong with a Linux software update.


5) Can the GUI
If you really need as much performance as possible, you can do one of two things: Use a GUI-less server installation or run the server in run level 3. If you need the GUI to get the machine up and running well, you won’t need that GUI running all the time. So instead of running GDM or KDM (and stealing resources), edit the run level so that the boot process stops at run level 3 - console login. This will not only save CPU cycles and memory, it will also circumvent the possible security issues of having GUIs running on your precious server. Each distribution edits the run level differently, so make sure you understand how to make this change before you attempt it.




*************************

Saturday, 11 June 2011

Add Microsoft Core Fonts to Ubuntu


Add Microsoft Core Fonts to Ubuntu
Have you ever needed the standard Microsoft fonts such as Times New Roman on your Ubuntu computer?  Here’s how you can easily add the core Microsoft fonts to Ubuntu.

Times New Roman, Arial, and other core Microsoft fonts are still some of the most commonly used fonts in documents and websites.  Times New Roman especially is often required for college essays, legal docs, and other critical documents that you may need to write or edit.

Ubuntu includes the Liberation alternate fonts that include similar alternates to Times New Roman, Arial, and Courier New, but these may not be accepted by professors and others when a certain font is required.  But, don’t worry; it only takes a couple clicks to add these fonts to Ubuntu for free.

Installing the Core Microsoft Fonts:
Microsoft has released their core fonts, including Times New Roman and Arial, for free, and you can easily download these from the Software Center.  Open your Applications menu, and select Ubuntu Software Center.



In the search box enter the following:

ttf-mscorefonts

Click Install on the “Installer for Microsoft TrueType core fonts” directly in the search results.



Enter your password when requested, and click Authenticate.


Once the install is finished, you can launch OpenOffice Writer to try out the new fonts.  Here’s a preview of all the fonts included in this pack.  And, yes, this does included the infamous Comic Sans and Webdings fonts as well as the all-important Times New Roman.

Please Note:  By default in Ubuntu, OpenOffice uses Liberation Serif as the default font, but after installing this font pack, the default font will switch to Times New Roman.



Adding Other Fonts:
In addition to the Microsoft Core Fonts, the Ubuntu Software Center has hundreds of free fonts available.  Click the Fonts link on the front page to explore these, and install the same as above.



If you’ve downloaded another font individually, you can also install it easily in Ubuntu.  Just double-click it, and then click Install in the preview window.



Conclusion:
Although you may prefer the fonts that are included with Ubuntu, there are many reasons why having the Microsoft core fonts can be helpful.  Thankfully it’s easy in Ubuntu to install them, so you’ll never have to worry about not having them when you need to edit an important document.

Thursday, 12 May 2011

LINUX vs WINDOWS 7



















LINUX vs WINDOWS 7.....

WINDOWS 7:-

1) PERFORMANCE:-
* Better at synthetic benchmarks.
* Faster transfer of large files.
* Final version likely to improve.
* Suspend/resume works!

2) DESKTOP INNOVATION:-
* Desktop search is well implemented and can go online.
* Media libraries can be pinned to the start menu and task bar.
* Jump lists can genuinely help improve efficiency.

3)VERSIONS RELEASED:-
* Starter: No Aero and no 64-bit.
* Home Basic: Developed for emerging markets.
* Home Premium: Standard edition including Aero and touch.
* Professional: Adds remote desktop and encrypted filesystem.
* Enterprise: Unix application support and volume licensing.
* Ultimate: As with enterprise, but for individual users.

4) POWERSHELL vs BASH:-
* Integrated scripting.
* You can type ls to get a directory listing!
* Syntax highlighting.
* Remote execution.

------------------------------------------------------------------

LINUX:-

1) PERFORMANCE:-
* Faster booting.
* Less memory usage.
* Smaller install size.
* Broader hardware compatibility.

2) DESKTOP INNOVATION:-
* Nepomuk blurs the border between local and online.
* Gnome Do replaces the task bar entirely.
* Google's Desktop widgets now on Gnome and KDE.

3) VERSIONS RELEASED:-
* Starter: No Linux is this restrictive.
* Home Basic: Crunchbang or Ubuntu.
* Home Premium: For eye candy, try Mint or Kubuntu.
* Professional: Fedora offers encryption as an installation option.
* Enterprise: OpenSUSE should work well with Windows.
* Ultimate: No matter which Linux you choose, there's no restrictions.

4) POWERSHELL vs BASH:-
* 30 years of refinement.
* Used by almost every Linux distribution ever.
* Plenty of online help and documentation.
* Can be used to administer the entire system.

-------------------------------------------------------------------

WHO WINS ATLAST????
As you should be able to tell from the scope of the features we've discussed, Windows 7 marks a significant point of maturity in the development of Windows, and is what the much-maligned Vista should have been three years ago. There's still a distinct lack of innovation, but the improvements to system stability and performance are what's going to matter to most users. And most users of Windows are businesses. They're not interested in eye candy, Twitter integration and hardware acceleration. They just need Windows to be a sober working environment that doesn't get in the way of helping people work.

And this is where Linux can make a big difference. There's nothing in Windows 7 that Linux can't do, and in most cases, do it better. Our machines are quicker and more efficient. Our desktops are more innovative and less static. Our apps are more powerful, cheaper and less partisan, and Linux security has never been better. But best of all, we have complete control over the future of Linux, and it's success or failure at the hands of Windows 7 is in our hands.
Related Posts Plugin for WordPress, Blogger...