Most of this is going to be known to long-time Ubuntu (or Gnome)
users, but if you are new to this OS or just never noticed Gnome’s
robust drag-and-drop support, this article may be of use.
Basic file operations
Let’s
start with the basics. To drag a file in the desktop or file manager,
simply hold your left mouse button while moving the mouse from the
source to the destination. Note the cursor:
Here are some things you may not know:
Panel shortcuts
Adding
a panel shortcut is very easy if the shortcut already exists in the
menu. All you have to do is locate it in the menu, and drag it into the
panel (or the desktop, if you like having desktop shortcuts).
Icons
If
you wish to change the icon of a launcher, file or folder, you can
right click on it, and select properties. You should now see, in
addition to other information, the application’s icon in a button.
Clicking on this button will allow you to select the icon, but another
way to do it is to drag a picture (PNG is the best) right into that
button.
Web browsers
You can download files, pictures and text from browsers like Firefox using drag and drop.
If
you want to download a picture into a specific folder (or the desktop)
just drag it there. Note that this does not work with images that link
somewhere, in which case you can right click on the image, select View
Image, and then drag it.
You can copy text, or text+images as
HTML by selecting it and dragging it into a text editor, word
processor, or even another input box. What some people don’t know is
that you can drag text right into your file manager. When doing this, a
new text file will be created and you will be asked to enter its name.
I use this all the time when downloading guitar chords: just select the
text, and drag it into my chords directory.
Colors
You
can drag and drop colors in GTK applications. Wherever you see a color
selection box (a button with a colored rectangle), you can drag colors
into it or out of it. One such color selection box can be found when
you are changing your desktop background. Obviously, there are such
boxes in The Gimp, Inkscape and other graphical programs as well.
Unfortunately, Open Office is not a proper GTK application, but AbiWord
and Gnumeric are, and you can use the above method to drag various
colors in it.
To test this out on a useful example, open The
Gimp. You will see two overlapping color boxes. You can try dragging
the color from one to another to see it change. You can double click on
those boxes to see the color selection window, where you can find even
more boxes into which you can drag colors. You can see how easy it is
to drag colors from one application to another by dragging the color
from the Desktop Background window into The Gimp.
This is
particularly useful with applications like Agave. Agave is a program
that generates good-looking color schemes using complements, triads,
etc. When working with The Gimp, for example, you may wish to discover
what the complement of your current color is, and you can accomplish
this by dragging the color into Agave. You can then drag the complement
color back into one of The Gimp’s color boxes.
Another thing you
can do with colors is drag them into your file manager. This will
change the manager’s background color (beware, though; there is no
obvious way to restore the old color).
Themes
Installing
new Gnome themes is particularly easy with drag and drop. To launch the
theme manager, go to System > Preferences > Theme. Now, go to a
website that has themes (GTK, metacity or icon themes) available for
download. The easiest site to use is art.gnome.org.
After selecting the theme you wish to install, just drag and drop the
file (straight from the browser) into your theme manager window. The
theme will be installed, and you will have the option to select it.
Sites like gnome-look.org
do not give you a direct link to the file, so you will first have to
download it to your desktop, and then drag it from there to the theme
manager.
As mentioned above, to install a new wallpaper simply
drag the picture onto the desktop. Another way to do this is to right
click on the desktop, select Change Desktop Background, and then drag the picture into that window.
First remove your old grub
sudo apt-get remove grub
Then Install the gfxboot-grub
sudo dpkg -i grub-gfxboot_0.97-5_i386.deb
then we’re going to move the message
sudo cp message.suse /boot/grub/
replace .suse with the .whatever you downloaded.
THE MESSAGE FILE MUST BE OWNED BY ROOT USER/GROUP WITH CORRECT PERMISSIONS
sudo chown root:root /boot/grub/message.susesudo chmod 644 /boot/grub/message.suse
replace .suse with the .whatever you downloaded.
Then edit your menu.lst
sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backupsudo gedit /boot/grub/menu.lst
and make it use gfxboot, write this as the very first line of the file and save it.
gfxmenu /boot/grub/message.suse
replace .suse with the .whatever you downloaded.
Then do :
sudo grub find /boot/grub/stage1
it’ll print out (hdx,y), so following that type:
root (hdx,y)setup (hdx)quit
if you have multiple (hdx,y) entries, work out which one is your
current OS partition and use that (note: grub counts from 0 onwards,
eg. hd0,0 is first harddrive, first partition, and it includes extended
partitions in it’s count).
NOW REBOOT. technically the above should have installed grub correctly,
if so then you can stop here. but for whatever reason for quite a few
people here it’s not, so on we go…
find out your hard drive names:
sudo fdisk -l
this helps with both the above and below. if you don’t know if
your OS’s partition is on hda, hdb, sda or anything else, then find out
using the above.
Install grub to MBR but CHANGE HDA to your OS’s drive, so if it’s on hdb use /dev/hdb:
sudo grub-install /dev/hda
DO NOT use any numbering in this,
using hda1 will install grub to the first partition not the mbr. if you
do this, follow this guide tellingly titled Oh crap, I just typed ‘grub-install /dev/hda1′.
you could use grub-install hd0 as with the grub setup command but this
is bios dependent and i dunno if you could mess it up by altering bios
settings inbetween things (and i don’t wanna find out either…).
and that should be it. restart and pray you didn’t mess up 
http://ubuntuforums.org/showthread.php?t=208855&highlight=gfxgrub&page=56
1.Load the LVM2 module:
# modprobe dm-mod
2. Activating LVM
# vgscan
Reading all physical volumes. This may take a while...
No volume groups found
(Make any previously set up volume groups available)
# vgchange -a y
3. Prepare the partitions:
# pvcreate /dev/hda4 /dev/hdb1
No physical volume label read from /dev/hda4
Physical volume "/dev/hda4" successfully created
No physical volume label read from /dev/hdb1
Physical volume "/dev/hdb1" successfully created
4. Create a volume:
(Create a volume group named vg)
# vgcreate vg /dev/hda4
/etc/lvm/backup: fsync failed: Invalid argument (Ignore this warning)
Volume group "vg" successfully created
(Extending an existing volume group)
# vgextend vg /dev/hdb1
/etc/lvm/backup: fsync failed: Invalid argument (Ignore this warning, again and later as well)
Volume group "vg" successfully extended
5. Create a logical volume:
# lvcreate -L10G -nusr vg
Logical volume "usr" created (Further similar messages not displayed)
# lvcreate -L5G -nhome vg
# lvcreate -L5G -nopt vg
# lvcreate -L10G -nvar vg
# lvcreate -L2G -ntmp vg
(As an example, let's extend a logical volume with 5 extra Gbytes)
# lvextend -L+5G /dev/vg/home
To create a 1500MB linear LV named ‘testlv’ and its block device special ‘/dev/testvg/testlv’:
# lvcreate -L1500 -ntestlv testvg
|
To create a 100 LE large logical volume with 2 stripes and stripe size 4 KB.
# lvcreate -i2 -I4 -l100 -nanothertestlv testvg
|
If you want to create an LV that uses the entire VG, use vgdisplay to find the “Total PE” size, then use that when running lvcreate.
# vgdisplay testvg | grep "Total PE"
Total PE 10230
# lvcreate -l 10230 testvg -n mylv
|
This will create an LV called mylv filling the testvg VG.
If you want the logical volume to be allocated from a specific physical volume in the volume group, specify the PV or PVs at the end of the lvcreate command line.
# lvcreate -L 1500 -ntestlv testvg /dev/sdg
6. Create filesystems:
# mke2fs -j /dev/vg/usr
# mke2fs -j /dev/vg/home
# mke2fs -j /dev/vg/opt
# mke2fs -j /dev/vg/var
# mke2fs -j /dev/vg/tmp
Other:
renaming a vg:
I did `lvchange -an` the logical volumes first, then `vgrename`, then `lvchange -ay` again.
http://www.gentoo.org/doc/en/lvm2.xmlDupa cum destui dintre voi ati observat odata cu upgrade-ul la / instalarea Ubuntu 6.10 modul implicit de configurare a fisierului /etc/fstab (adica cel care contine o lista cu partitiile sistemului care se doresc a fi montate automat la pornirea sistemului ) s-a modificat un pic .
Astfel o linie care arata inainte ca :
Cod:
/dev/hda1 / ext3 defaults,errors=remount-ro 0 1
Acum apare in forma urmatoare (ne avand si aceeasi valoare binenteles…) :
Cod:
UUID=9d0462b8-4038-483e-a43c-d814b8ac4f5e / ext3 defaults,errors=remount-ro 0 1
Desi este o schimbare nu este tocmai o noutate faptul ca o partitie poate fi montata dupa UUID . E adevarat ca Ubuntu e una dintre putinele distributii care folosesc implicit acest mod de montare (nu mai stiu alta din pacate…) . Asta insa nu inseamna ca nu ati fi putut face montarea in acest mod folosind Ubuntu 6.06 sau o alta distributie linux. Pentru a intelege de ce va va ajuta sa stiti si ce este acel cod misterios.
UUID-ul (Universal Unique Identifier) este un cod cu lungimea de 128 de biti careare drept scop identificarea unui anumit “ceva” pastrand in acelasi timp un anumit grad de anonimitate. In cazul de fata acel ceva se intampla sa fie o partitie de tip ext3.
Anonimitatea este asigurata de numarul foarte mare de coduri unice si de modul de generare a lor. Cum sunt generate exact nu are sens sa fie prezentat aici (si nici macar nu stiu cu exactitate) insa am inteles ca de obicei sunt bazate pe 3 componente : una fizica fixa (marimea partitiei s-ar incadra aici de exemplu) una temporala (partitia va primi un UUID in functie de data/ora la care este facuta formatarea) si cireasa de pe tort , una aleatorie .Si acum practic… Cat de multe lucruri stiti despre partitia/hard-discul meu din acel UUID ? tongue
Si acum de ce ? Care e sensul ? Pe langa faptul ca se poate este si folositor. Montarea folosind devece-ul de genul /dev/sda1′ are dezavantajul faptului ca la o mutare a hardiscului (de pe un cablu ata pe altul sau de pe master pe slave de exemplu) acea locatie va deveni invalida. Iar daca pe ea era un partitia root a unui linux atunci acesta nu va mai boota.
Montand partitia folosind UUID ne scuteste de acea problema, referirea facundu-se cu exactitate la o anumita partitie indiferent unde s-ar afla ea. Faprul ca majoritatea sistemelor de fisiere creeaza acel UUID la formatare de cativa ani buni a facut aceasta solutie una viabila.
Dezavantajul este ca e un pic mai greu de lucrat cu el. E usor sa tii minte ca hda1 e partitia root a linuxului insa nu se poate spune acelasi lucru si despre acel cod… Insa nimeni nu a spus ca trebuie sa-l tineti minte. Pentru a afla uuid-ul unei partitii puteti rula comanda “vol_id” astfel (aici pentru partitia hda1):
Cod:
thunderm@Zeus:~$ sudo vol_id /dev/hda1
Password:
ID_FS_USAGE=filesystem
ID_FS_TYPE=ext3
ID_FS_VERSION=1.0
ID_FS_UUID=9d0462b8-4038-483e-a43c-d814b8ac4f5e
ID_FS_LABEL=
ID_FS_LABEL_SAFE=
De asemenea puteti vedea si UUID-urile tuturor partitiilor ruland comanda
Cod:
ls /dev/disk/by-uuid -alh
Rezultatul va contine lista pe care o doriti avand UUID-ul scris cu albastru deschis adica ceva asemanator cu :
Cod:
thunderm@Zeus:~$ ls /dev/disk/by-uuid -alh
total 0
drwxr-xr-x 2 root root 160 2007-01-26 18:25 .
drwxr-xr-x 6 root root 120 2007-01-26 18:25 ..
lrwxrwxrwx 1 root root 10 2007-01-26 18:25 00FBAD1C33980F90 -> ../../hda6
lrwxrwxrwx 1 root root 10 2007-01-26 18:25 44e26abf-21ef-4998-b416-3af7154293cd -> ../../hda7
lrwxrwxrwx 1 root root 10 2007-01-26 18:25 7250EBA950EB7271 -> ../../hda5
lrwxrwxrwx 1 root root 10 2007-01-26 18:25 9d0462b8-4038-483e-a43c-d814b8ac4f5e -> ../../hda1
lrwxrwxrwx 1 root root 10 2007-01-26 18:25 C200916F00916AE5 -> ../../hda2
lrwxrwxrwx 1 root root 10 2007-01-26 18:25 F8D023D4D0239840 -> ../../hda8
Avand in vedere ca nu umblati toata ziua prin /etc/fstab nu cred ca este chiar atat de anevoios sa folositi UUID pentru montare. Daca este vorba de un hard-disc pe USB cu siguranta va veti multumi pentru efort mai tarziu tongue . La urma urmelor insa ramane la alegerea voastra ce sa folositi.
PS : se pot folosi si label-ul in cazul in care ati atribuit asa ceva partitiei. Pentru o partitie care are ca label ‘ubuntu’
veti scrie ceva asemanator cu
Cod:
LABEL=ubuntu / ext3 defaults,errors=remount-ro 0 1
Putini insa sunt cei care definesc label-uri la partitii si chiar si mai putini cei care le folosesc pentru montare datorita faptului ca nu este o modalitate prea sigura.
root@tealc:/# grep -i color /root/.mc/ini
[Colors]
base_color=directory=white,default:executable=brightgreen,
default:link=lightgray,default:device=lightmagenta,default:special=brightred,
default:normal=lightgray,default:selected=black,lightblue:marked=yellow,
default:markselect=yellow,cyan:core=cyan,default:editnormal=lightgray,default
base_color must be one line.
Ubuntu:
To enable smart completion, edit your /etc/bash.bashrc file. Uncomment the following lines, by removing the # in the beginning of the lines:
#if [ -f /etc/bash_completion ]; then
# . /etc/bash_completion
#fi
Now you can use tab completion to power your way through commands.
http://ubuntu.wordpress.com/2006/01/28/turn-on-bash-smart-completion/
Gentoo:
Now add the following line to /etc/bash/bashrc, before setting any alias (see bug #98627):
| File: /etc/bash/bashrc |
[[ -f /etc/profile.d/bash-completion ]] && source /etc/profile.d/bash-completion |
Let the changes take effect:
# source /etc/bash/bashrc
Or exit the shell and login again.
Enable this in your /etc/pam.d/su
# Uncomment this if you want wheel members to be able to
# su without a password.
auth sufficient pam_wheel.so trust
PS: You must create the wheel group
# Uncomment to allow members of group sudo to not need a password
#%sudo ALL=NOPASSWD: ALL
Comment this line:
%admin ALL=(ALL) ALL