Support of the day Posts

Support of the day: Long respond times with Secure Shell communication

SSH taking too long to respond?

Disable Group Support System (GSS) login, to do this follow this:

  1. Log in to the remote server as usual
  2. Open the SSH configuration (nano /etc/ssh/sshd_config)
  3. Once inside look for GSS authentication (Ctrl+W, gss, enter)
  4. Look for the line that says GSS authentication and add a “#” in front of it
  5. Save and close (ctrl+X, Y, enter)
  6. Restart the ssh service (service sshd restart or service ssh restart or /etc/init.d/sshd restart or /etc/init.d/ssh restart)

Explanation: SSH can use several different login schemes, password and username, keys, pam/kerberos, gss, etc

What it does is that when you connect to the server it goes one by one trying to see what works, the last one is username and password which is the most regular one, the authentication that takes the most time is with the gss api, since it’s not being used, it can be disabled, thus increasing the speed login works.

10 Things You Didn’t Know You Could Do In Ubuntu

I found this well matured article about Ubuntu possibilities. Good stuff, check it out:

10 Things You Didn’t Know You Could Do In Ubuntu

1. Create website links that automatically install software

Did you know that you can create a link that will automatically launch Ubuntu’s package manager and install the software? This is very useful if you are helping someone install certain programs in Ubuntu. To create ’software install hyperlink” just create a hyperlink but instead of pointing to the usual http:// address, use

apt:< package name >

So if you are trying to install firefox, create a hyperlink and put apt:firefox in Hyperlink bar. This will create a hyperlink that will launch the package manager and install the package when clicked.

2. Do stuff without touching the mouse

If you know how to launch the ‘Run’ dialog box in Windows, this certain command is also available in Ubuntu. Press ALT+F2 and the similar ‘Run’ dialog box will appear, type in the command or the program name, let’s say firefox, hit enter, and firefox will launch.

3. Instantly Search Google for Any Word or Phrase

Googlizer is an app that you can install (this is available from the package manager) and use it to search Google for anything using the keywords directly from your file. An example is if you have a PDF file that contains the word ‘lethargy’, with Googlizer, all you need is to highlight the word, and click Googlizer’s icon to search the web.

4. Create a File Delete Command That Uses the Trash

If you are a frequent user of rm command, you can create a command that will move the file you wish to delete to the Trash directory, instead of completely deleting the file. To do this, just use the command alias and few tweaks with Linux files:

- Open a terminal window, and type gedit ~/.bashrc
- Add this line after the last line of the file:

alias trash=”mv -t ~/.local/share/Trash/files –backup=t”

- Save and close.

To use the command, you need to use the trash command instead of rm:

trash mydoc.txt

5. Repair Windows from Within Ubuntu

You can mount your Windows partition inside your Ubuntu and do stuff with it. With stuff I mean you can access your files in Windows partition, or you can also repair it within Ubuntu. To be able to repair a near-death Windows partition, unmount it and use the command ntfsfix:

sudo ntfsfix /dev/sda1

This is assuming that your Windows partition is /dev/sda1 and the filesystem used is NTFS.

6. Dump the Text on a Virtual Console to a File

Large files can be tiresome to read so you may want to filter the words that you need and dump into a new and smaller file. This can be done using this command:

ls > output.txt 2>&1

The command will execute ls command, put the results into the output.txt file and display errors, if there are any.

7. Instantly Hide a File or Folder

In Linux, any file that begins with period (.) is considered as hidden file. So if you want to hide a certain file from a younger sibling or parent, rename a file and put . at the beginning of the filename

mv grades.txt .grades.txt (use this command inside a terminal)

Or if inside Nautilus, highlight the file, press F2, and rename the file.

8. Print at the Command Line

Did you know that you can print files from the command line? Try this command to print a file without the fancy format for fast printing:

lp -o page-top=72 /home/myfile.txt

This is a quick and dirty way of printing files since the formatting is disregarded, but very useful if you want to print something fast and easy.

9. Listen to MP3s when no GUI is running

If you need to work in your Ubuntu using text mode only and no GUI running, install vlc using the apt-get command and use it to play your MP3 music from the command line:

vlc -I ncurses /home/*.mp3

This will play all mp3 files in the /home folder using the CLI mode of vlc.

10. Turn your desktop into your /home folder

If you want to make your default Desktop directory into something else beside the typical /home/user/Desktop location, you can do so by hitting Alt+F2 and type in gconf-editor. This will launch the gconf-editor app, put a check beside /apps/nautilus/preferences, save and exit. The change will take after after your next login.

Thanks to Keir Thomas via PionyTux Weblog http://www.pinoytux.com

Support of the day: Restart Webmin

Here is a little helper if your Webmin does not respond.

Just run this command from the command line and it will bring the webmin service up again fresh.

# /etc/init.d/webmin restart

Following messages will appear after running that command.

# Stopping Webmin server in /usr/share/webmin
# Starting Webmin server in /usr/share/webmin

After a fresh restart the  Webmin server should be running again.

Thanks to http://www.netdip.com/how-to-restart-webmin-a/

10 Helpful Things to do After Installing Ubuntu Linux

Ubuntu is a very customizable operating system and everyone has their own reasons and needs for any particular OS. Still these 10 configuration tips are worth a look and definitively can be considered  to do immediately after a Ubuntu installation. Thanks to UbuntuLinuxHelp.

1) sudo aptitude install sbackup

Nothing is worse that losing all your important data (pictures, email messages, music, documents, etc.) The above command will install Simple Backup Suite (more details found on Sourceforge). For me at least it’s a great desktop backup solution. I can select which directories I want backed up (full and incremental), then have backups automatically transfered to my external network storage. I play a lot with my computer, I often break something as a result. With sbackup, I can be more confident as it’s easy to restore data (in the event I have to reinstall an application or even worse… the OS itself). You can also install via:

apt:sbackup

2) sudo aptitude install ubuntu-restricted-extras && sudo aptitude install w64codecs

If you enjoy music, videos, and so forth, you’ll want to install the extra media codecs and packages that will allow you to play almost any desktop media format (mov, mpg, avi, wmv, mp3 and so on). I wrote a detailed post:  “Build a Web Developer PC and Enable Most Media Playback Using Ubuntu Linux”, which provides a bit more of an in depth explanation of the above command (including editing the sources.list to include mediabuntu). Note: If you have a 32 Bit system, change the the “w64codec” part of the command to say “w32codecs” instead. You can also install these packages via:

apt:ubuntu-restricted-extras

apt:w64codecs

3) sudo apt-get install msttcorefonts && sudo fc-cache -fv

I like having the same fonts used by Windows users. People often send me .doc files, so I want to ensure I have at least the core fonts they use. The above command installes the Microsoft core fonts and then reloads the font cache. I’ve posted about this before at “How to Install TTF and CTF Fonts in Ubuntu”, which contains far more detail. You can also install the core fonts via:

apt:msttcorefonts

4) sudo aptitude install vlc

I prefer not to try juggling with the use of different applications to play different media types. VLC plays all the media types I access. For me at least, it’s the singular application I use to play everything from an MP3 file to a DVD video (and incidentally, vlc can stream your media to other computers, even to the television!). Of course you can click the apt link and install via:

apt:vlc

5) sudo aptitude install k3b

Even though I use gnome, I still install k3b, which is (in my opinion) among the best DVD/CD burners around. I find the interface  intuitive and easy to use. There’s a post containing more applications at “Top 100 of the Best (Useful) OpenSource Applications”. Using apt links, we can also install k3b via:

apt:k3b

6) Enable surround sound right away. I’ve an earlier post at Enable 5.1 Surround Sound on Linux – Ubuntu 8.04 Hardy, but the jist of the instructions is to edit

sudo gedit /etc/pulse/daemon.conf and change the line that says:

; default-sample-channels = 2

to say

default-sample-channels = 6

7) Use the “Windows” Key.

I prefer using keyboard shortcuts instead of the point and click mouse. Thankfully, there’s an easy way to turn your keyboards “Windows key” into an Ubuntu key.

Go to: System -> Preferences -> Keyboard Shortcuts

Scroll down to the action “Show panel menu” and click on it. (The phrase “New accelerator menu…” will appear).

Now simply press your Windows key once. (You’ll see the accelerator now says “Super L”). Select the “Close” option and you’ll see that your Windows key now works. Note: If you ever want to change it back to the default (for Hardy 8.04), the original setting is Alt f1.

8 ) Make gedit remember more documents.

I often use gedit to quickly edit files in a GUI environment. I often wish gedit would remember more of the documents I edit. That way I don’t have to surf through the file system. There’s a simple way to ensure gedit remembers more of the files you edit:

sudo gconf-editor

In the window that appears (using the above command), select

apps -> gedit2 -> preferences -> ui -> recent

Select the “max_recents” key and change the default of 5 to 10

9) Increase the start speed of multi-core CPU systems.

This will slow down systems that  have a single CPU. For multi core CPUs, we can change the services to all start together (in parallel) during boot time. The command to do this is;

sudo perl -i -pe ‘s/CONCURRENCY=none/CONCURRENCY=shell/’ /etc/init.d/rc

and then reboot with

sudo shutdown -r now

10) Finally, I sometimes need to run application that are for another OS (not Ubuntu Linux). Virtualization is the answer and allows me to run the other application without using Wine ore rebooting into another OS. You can install Virtualbox:

sudo aptitude install virtualbox

If you’re interested, more information about VirtualBox can be found by visiting the about VirtualBox page. Again, here’s the apt link to install virtualbox:

apt:virtualbox

A bonus tip!

I’m often asked how to uninstall a .deb package. The command to facilitate that is:

sudo dpkg -r package_name

More about this at http://ubuntulinuxhelp.com/10-things-to-do-after-installing-ubuntu-linux/

Managing a dedicated server: The (absolute) basics

How to access your server:

I order to get direct access to the server console it’s done via SSH (Secure SHell) to do so you need a software named Putty if you are running windows just download it (download), run it, give it your IP that that way it would connect, when it asks you your user and password it’s located on the welcome email you received from us that also contains the server IP.

If you are using any linux distribution or a Mac computer, just open the terminal and type ssh IP (Where IP is your server’s IP)

The control panel that is installed by default is called webmin. Most of the tasks that you need to do in order to manage your server can be done there. To access it just head over to your browser and enter https://yourip:10000 . It’s going to ask you for your username and password, it’s the same that you use to access via SSH which is the same you got on the welcome email. From there on you will only need a couple minutes to find all the tasks you need done.