Archive

Posts Tagged ‘linux tips’

20 ways to ruin Linux

October 9th, 2011 1 comment

There are many ways to ruin an operating system.

Linux has a reputation for toughness but there are still many ways to damage a computer system fully functional.

We want to illustrate some of the ways you can wreak havoc on Linux, so as not to avoid making the same mistakes.

 

Fill a file system

If the filesystem containing /var is full, you can not write its log messages and all types of system processes and this can cause a stall.

Reinstall Windows

No, this is not typical of a Linux user anti-Microsoft – the Windows installer does not accept other operating systems or their bootloader, so if you reinstall Windows, this will overwrite the bootloader. No need to reinstall Linux, though: the installation CD usually has the ability to solve problems of the bootloader, or you can run grub-install from a live CD.

Out of memory

4GB of memory may seem like a lot, to do something stupid like start gimp *.jpg files in a directory full of pictures at 12 megapixels. The swap space will help, but will do so slowly as to make you believe that the system has frozen.

Follow the instructions on the web

The Web forums are full of useful hints, tips and commands, but there are also some that you can do serious damage. The difficulty lies in distinguishing between them, the advice can be dangerous were provided with the best intentions, some good advice or be misspelled. Pay particular attention to everything that makes use of the operators “on” or “sudo“.

Install multiple Linux systems

This is a bit ‘as the situation when you reinstall Windows. While the installer distros have a great recognition of Windows by creating a dual boot, some still do not notice other Linux distributions on your disk, this could lead to the condition that the distros will disappear from the existing bootloader, even if the distributions are still there .

Rarely update

Let a system intact for many months and then install more than 300 upgrades in one shot, do not necessarily result in corruption of the system, but if it happens to be very lucky to know who was the culprit. Little and often is the surest way to keep a system updated.

Upgrade to the blind

Do not check the list of packages to install with an upgrade of the system could do to not have any idea what went wrong if it should happen. Alternatively, use the package manager to produce a list of installed software, so you can see what has changed when things go wrong – or check the log file of the package manager.

Run Software too new

Yes, everyone likes to try new material, but be aware of the risks. The new software has had less testing. So do not you upgrade to the latest alpha version, when you really need the computer to continue working.

Delete the /home

This does not corrupt Linux, but you lose any personal settings and files stored there. That’s why it’s a good idea to keep/home on a separate partition, so you can install and upgrade without messing up the settings and data.

Losing a password

Losing the user password will not let you do anything, unless you have automatic login set. Losing your root password means that you can use your computer, but you can not install or update software or make other changes to the system. Losing the password to an encrypted file system means that you may have to go back to pen and paper.

Install a new kernel

This seems strange at first, a new kernel would be better and safer. But some devices are based on modules which are not supplied with the kernel, in particular the graphics cards and wireless networking. Some distributions will automatically reinstall, otherwise you must use a wired network, or restart with the old kernel and reinstall the drivers for what is not working.

Try using pulseaudio

If you have never been bitten by the complexity of Linux sound systems, you’ll know exactly what that means. Otherwise, do not worry. Your audio system will continue to operate until it stops mysteriously. Do not use other ones that have multiple layers of an onion.

linux hints, tips, tricks

Install the packages from another distro

Sometimes your distro does not have the package you want, but another has it. Do not be groped to install a “foreigner”, this is the beginning of a road to madness. It can be done with the use of Debian packages on Ubuntu, but sooner or later we will get hurt.

Run a fork bomb

A fork bomb is a small shell script that quickly creates many processes as long as they can, until the computer freezes and the only solution is to turn it off. Some distributions are configured to prevent its effects, limiting the number of processes a single user, even root. If you want to try it, here is the code

#! /bin/sh
: () {: |: &};:


Reinstall

The “solution” of choice for many Windows problems, is to reinstall the operating system. Doing this on Linux and it means the loss of custom settings and configuration, and every opportunity to discover the cause of – and solution – to the problem. Reinstall individual software packages rarely helps, since such action does not touch the settings in your home directory, where there is most often the source of your problems.

Disable swap

You would think that with a minimum of 2-4GB of RAM typically mounted in today’s laptops, the swap is an anachronism, but some processes have come to expect that some part of your code is managed by the swap. Although I do not think you need it, you may inadvertently used a lot of memory, so having some exchange available is always a good idea after all, disk space is more abundant than RAM.

Installing from source

If you want the latest version of some obscure (or just new) program, aimed at installing from source is the only option. Although this usually goes well, you could end up with different versions of the same library in /usr/lib and /usr/local/lib, with effects that are best described as “interesting”.

Lose

Linux is often incorporated into devices that are increasingly smaller, cheaper, more powerful and easier to lose. Although it is tempting to store all the details of your life on a netbook, or even a smartphone, considered the consequences of a loss (or loss “assisted”) of this device. This event will not cause breakage of the device, but its new “owner” will have full access to it and to the data, so be careful.

Treat it like Windows

Linux and Windows, even if supply desktop operating systems, with a superficial similarity, are completely different. Treating a Linux system like Windows is one of the most common causes of embarrassment and discomfort for new users. If you are new to Linux, no matter how much experience you have with Windows, do not be ashamed to ask for advice.

Pour the coffee spill on it

It ‘truly regrettable that a system so suited to hackers and programmers can still be rendered useless when it comes into contact with liquids. The mouse and the pizza does not get along, even if the hard core Linux users probably do not want to give up the mouse as much as the pizza.

Installing Ubuntu on a Android Terminal

September 24th, 2011 1 comment

As you can see, this is a version of Ubuntu that mounts the lightweight LXDE as the default DE in order to respect the longevity and performance of the entire system. What you need is VNC, the zip file with Ubuntu for Android and follow the guide below.

Obviously, this guide serves to introduce another system in addition to the native, but you have to do it carefully, because you risk everything Brikka!

Warning! I remember that the possibility of Brikka is always just around the corner and then I do not assume any responsibility for any “loss” of all!

  1. Download http://www.bisme.net/update_b1_b2.zip
  2. remove the /sdcard/ubuntu
  3. open the terminal on, go to the folder you created, start ubuntu, and write
      sh update
  • do a reboot and when finished, write
      ubuntu config

You can now reconfigure your resolution vnc

The Gnome Terminal and Synaptic FIX have the same installation like update b1_b2 (b1_b2 must be installed first)
http://www.bisme.net/update_b2_b3.zip

This is the second version. It is not upgradeable, so you have to delete the old /sdcard/ubuntu first.

[Via adb uninstall old]

adb remount
adb shell rm /system/bin/ubuntu*
adb shell rmdir /System/ubuntu

[Uninstall the old terminal]

su
mount -o remount,rw /system
rm /system/bin/ubuntu*
rmdir /system/ubuntu

[Requirements]


[Step by step]

  • Extract the zipped file to /sdcard/ubuntu
  • cd to this directory and type
      su
  • then
      sh install ubuntu

you have to answer some questions, if you want you can just click on enter. after you have rebooted, open the terminal and write

    su

then

    ubuntu start

then

    ubuntu shell

wait a minutes, you are installing the most complete version of ubuntu on the Internet, otherwise you have to install the Desktop aspettari ubuntu, you must be sure that you have a stable connection

    installubuntu

save and exit window Android write (before you enter the Password)

    ubuntu vnc

connect via: localhost:5901 using vnc client and password that you selected.

[What you]

  • you can start with ubuntu start
  • Shell with Ubuntu you can open a bash session
  • with ubuntu you can start the vnc vncservice
  • Stop please stop with ubuntu ubuntu
  • with ubuntu ubuntu uninstall uninstall script from the system (the /sdcard/ubuntu)

with ubuntu you can access:

  • by android /dev ubuntu/dev(fdisk/dev/block/mmcblk0 that it’s okay NOT TOUCH/ or dev/block/mmcblk1 Brikko Android
  • by android /system to ubuntu/android/system
  • Android by date /ubuntu/Android/date
  • by android /mnt/sdcard to ubuntu/adnroid/sdcard

[What works]

  • android-vnc with gnome (bluetooth keyboard and mouse)
  • screen
  • LibreOffice
  • Gnome Terminal

and many others

[What does not work]

  • Firefox 4
  • Chromium Browser
  • Ubuntu Software Center

[The technical side]

  • Ubuntu Natty Narwhal (11:04) from http://elinux.org/BeagleBoardUbuntu
  • dd to create the image (the filesystem on the disk only supports files images formatted with ext2
  • positioned adb /sdcard/ubuntu/img/ubuntu.img
  • chroot env
  • tightvnc, gnome-session, maximus

[Changelog]

  • no image supplied, created from an archive. tar
  • Android script rewritten to use their own bash and busybox
  • the full version of ubuntu / dev
  • Ubuntu 11.04
  • using the sdcard
  • the system should not be reinstalled if you want to install the script
  • add uninstall script part of the Android (the mountpoint is located on /sdcard/ubuntu/root)

The “hotkeys” GNOME: keyboard shortcuts for the popular desktop environment

July 12th, 2011 No comments

We present an overview of the hotkey for the GNOME desktop environment, that may be useful to speed up operations carried out every day with our PC.

For those like me used to working with Penguin and the GNOME desktop environment, there are a number of commonly used hot keys (and maybe others that I found randomly pressing the keys) I would like to share with you.

Obviously, the more savvy they know already, but in this case, I appeal to all those who have approached the world GNU / Linux from a relatively short time, and those who have never thought, for example, the ability to move quickly from a desktop another, or restore a minimized window, simply by using the keyboard or the mouse.

I state that many of these functions are linked to your video card driver and not normally available with open source versions, so if you want to experience the wonders of Compiz and GNOME, you may need to force things to enable proprietary video drivers.

 

 

 

Alt + F1

The key combination to open the Applications menu.
Hotkey Gnome Shortcuts

Alt + F2

Displays a dialog that allows you to quickly perform an application. You can start an application by typing its name or selecting it from among those known.

hotkey gnome keyboard shortcut

 

Stamp or PrintScreen

Capture quick screenshot of the desktop.

 

Alt + Print Screen

Capture quick screenshot of the active window.

 

Ctrl + Alt + RIGHT ARROW
Moving quickly on the work right.

 

Ctrl + Alt + LEFT ARROW
Moving quickly on the work of the left.

Ctrl + Alt + DOWN ARROW

The key combination allows you to collapse the desktop to the center of the screen. You can easily scroll through the work areas while continuing to hold down Ctrl + Alt and alternating between Left / Right Arrow.

 

Ctrl + Alt + D

Minimize all open windows showing the desktop. Press the combination once again, the windows are maximized.

 

Ctrl + L

Nautilus allows you to quickly open the desired folder. After entering the path of the folder press Open. The same command, if executed directly in Nautilus, it shows the folder path where we are.

Ctrl + Alt + T

Open the terminal.

 

Alt + Tab

See all the open windows in the active work. Holding down the Alt key, click on the TAB every time we move from one window to another. Once you select the window that we want, release the Alt key to take control.

 

Alt + SPACEBAR
Opens the menu for the active window.

 

Ctrl + Shift + F10 or F10

Both open the context menu if the focus is on the desktop, within applications works only the combination Shift + F10. Useful if you are working only at the keyboard and do not want to use the mouse.

 

Alt + F10

Toggle full screen mode with the screen half of the applications / windows active.

 

Ctrl + Alt + L

The combination of these buttons allows you to quickly lock the PC.

 

Ctrl + Alt + Function

Pressing a function key from F1 to F6 leads to one of 6 text consoles available. To return to graphical mode, press the Ctrl + Alt + F7.

 

Winkey + M or WinKey + N

Displays the negative.

 

Winkey + E

Shows an overview of all work areas.

 

Wheel + Winkey

The scroll wheel when pressing the WinKey allows quick zoom on your desktop. The yield is significant and I find very useful, especially if you were to use glasses.

 

Ctrl + Wheel

If you position the mouse pointer on the taskbar and GNOME you have more than one application open, pressing the Ctrl key combined with the scroll wheel of your mouse, will allow for the cycling of active applications. In other words a kind of Alt + Tab when using a mouse.

If you have multiple tabs open with an application like gedit, this combination of buttons and scroll wheel will scroll the focus between the tabs themselves.

Used with Nautilus (the GNOME default Explorer) this pair + wheel button changes the size of the icons of folders and files in the active window, but did not affect the size of folders: opening them because the content will be shown to the default size.

 

Alt + Scroll

Holding down the Alt key and sliding the back wheel, the window on which is located at the time the mouse will start to disappear, to become almost completely transparent.

It also works with GNOME toolbars without affecting the drop-down menu if you wish to access it. This means that clicking on an entry from the slash (in nose if the bar is completely transparent), the menu will be displayed in his usual consistency and opacity.

The feature is definitely useful if you want that prying eyes can not see what you’re doing.

 

Shift + Wheel

Used with Firefox is equivalent to using the Next and Back buttons in your browser. Useful feature if you’re lazy and you also weighs just slide the mouse on the screen.

How are these tips? I do not know, I hope they are useful to someone and I will be happy to add your own, if they have other, to the list of this article.

How to enable remote access to CentOS without any open sessions

July 12th, 2011 No comments

Using the tools within the GUI installation of CentOS can be handled via Remote Desktop only after logging in a user’s local. Obtaining a situation far more practical and flexible it is still quite easy.

CentOS integrates natively interesting graphical utility that allows you to connect via VNC to the system. To activate it, simply select System -> Preferences -> Remote Desktop, enabling the various options, choose a password and you’re done

vnc

This approach is concerned, however, a limit that essentially nullifies any usefulness: the managed connection in this way can be established only once the user has opened a session on the system, performing a log-in locally.

Fortunately, this deadlock is very simple.

Note: In this article I will explain how to activate the feature: For more information about using VNC and about how to configure the network, see “Log on to your computer via the Internet: Complete Guide to VNC.”

Internet root access and limitations

First, make sure the machine to which you want to enable access via VNC to be able to access the Internet.

Second, remember that you must perform all the following with root privileges: for convenience, I highly recommend you go directly to the system with that account.

If you prefer to use your user deprivilegiato, it is sufficient to run all of the following commands by prepending the striga sudo to each of them

Also point out that the proposed technique does not work when the system was delivered through a CentOS virtual machine on which were installed add-ins of their platform (I have experienced firsthand the problem with the VirtualBox Guest Additions, but do not exclude that both the same even with virtualization competitors).

Install and begin setting up VNC

Install the component “server” VNC is very simple. Click Applications -> Accessories -> Terminal, execute the command yum install vnc-server-y and wait a moment

centos

We shall now proceed by modifying the configuration file of the graphics server. Given gedit /etc/X11/xorg.conf to open it with gedit.

Load the right module

Within the file, try (Search -> Find) the words Section “Module”.

If that section was already present and was not preceded by the pound sign (#), simply to insert a new row immediately below the above this directive: Load “vnc”.

If the block Section “Module” is not present (it is usually the default situation), copy-pasted at the foot of the following files:

displays in pure Text printed copy of notes?

 
    Section "Module"
        Load "vnc"
    EndSection

Enable access

Identified either the statement block Section “Screen” and add this directive

Option "PasswordFile" "/etc/vncpassword"

Your edited file now looks like this:

CentOS

Save and close gedit.

Choose your password

You must now choose a password with which prevent access to unauthorized users.

Given vncpasswd "/etc/vncpassword", type the password you want (need not be associated with the same user account), confirm with Enter and then repeat the process for verification

centOS

Open the door on the firewall

Do not forget to allow connection to the VNC port. Follow System -> Administration -> Security Level and Firewall to open the firewall configuration panel, press the Add button at the bottom right, enter 5900 and confirm all that

centOS

Reboot and connect

Reboot your system (you may need to perform log-out, but better to prevent problems) and you’re ready to connect via your preferred VNC client

centos

If everything is going your way, you’ll find yourself in front of the screen log-in, used just as if you were physically sitting in front of the system in question.

Reach the server from outside

With the current configuration, the service will be, generally speaking, only usable from within the local network.

In order to control the computer through the Internet, you must (generally speaking) to configure port forwarding on your router and, preferably, register an account on a dynamic DNS service: For more information, I refer you back to the article “Access to your computer via the Internet: Complete Guide to VNC.”

A security note

Remember that all data exchanged via VNC are transmitted “in clear” and, therefore, can easily be read by a cracker who could intercept the communication.

The more cautious will want then to channel it in an encrypted SSH tunnel. The procedure is the same as described in the article “Overcoming the blocks imposed by the firewall with an SSH tunnel” because, fortuitously, the example was just based on the use of a VNC connection, I refer you to read the same article for the detailed guide .

3 Installing GNOME on Ubuntu and GNOME Shell 11.04 from PPP (Unity carefully removed)

July 8th, 2011 No comments

Today, I propose, for the more daring, a tiny guide on how to install GNOME on Ubuntu 11.04 3 Natty

The method I propose is the simplest of which involves the use of experimental gnome3 PPA team.
I also want to remind everyone that installing GNOME 3 Natty lose this way of Unity and the interface normal desktop session. GNOME 3 is in fact incompatible with Unity.

Ubuntu 11.04 Gnome

If you are aware of this and you will not be able to import na Cippa here’s how to install GNOME on Ubuntu 11.04 3 GNOME3 as PPA Team

We open our terminal and we trust

sudo apt-add-repository ppa gnome3-team/gnome3
sudo apt-get update & & sudo apt-get upgrade
sudo apt-get dist-upgrade

At this point (almost) certainly you’ll see an error in the installation of some packages.
Here is the error code that is present in the terminal (even with a window view)

ubuntu 11.04

Errors were encountered while processing:

       /~var/cache/apt/archives/gnome-session_3.0.1-0ubuntu1 build2_all.deb
       E: sub-process/usr/bin/dpkg returned an error code (1)

Click Cancel on the error screen, and we always end the following command to force the installation of gnome-session_3.0.1

sudo apt-get-f install

Ubuntu 11.04

We confirm with S and the installation continues without any error or hiccup.

After install GNOME Shell and real tools GNOME Tweak Tool, which as we shall see will be useful to make some adjustments to the system.

sudo apt-get install gnome-shell gnome-tweak-tool

Finally we complete before restarting the installation packages for the Italian language.

sudo apt-get install language-support-en

Reboot the system.

At the login screen select restart as a session Ubuntu GNOME desktop shell (sorry the picture quality but I did it with the phone: D)
Ubuntu 11.04

When you first start two error messages appear. Click Cancel in the first message.

Ubuntu 11.04

Now make attention to the next message. We will see a screen that says “Update standard folders to current language” which invites us to change the name of folders like documents etc in English equivalent. This is because the system is not yet fully translated.
Then tick “Do not ask me this again” and click on Keep Old Names as shown

Ubuntu 11.04

s I said when you first start the system is currently in English. To translate, simply click on our username at the top right and select the System Settings

Ubuntu 11.04

This will open the System Settings menu.

Ubuntu 11.04

Click on Region and Language.
Simply scroll down the list and select Italian (Italy). We close the window.

Ubuntu

Dislodged

Ubuntu 11.04

And we will have to restart GNOME GNOME 3 Shell completely in Italian.

ubuntu 11.04

If you want to know how to customize the look with GNOME Tweak Tool I invite you to read the post GNOME 3: Changing the background, minimize and maximize and restore buttons to change fonts and icons

If you’re instead looking how to install the testing version of GNOME and GNOME 3 Shell always a convenient look here GNOME PPP Shell Ricotz Testing: The PPA testing GNOME and GNOME Shell 3

And if we wanted to go back to GNOME 2 and restore Ubuntu 4.11 as it was before the installation of GNOME and GNOME 3 Shell? Simply refer to post 3 Remove GNOME PPP installed on Ubuntu 11.04 and return to Unity