Find files containing searched text
If you want to search all files, which contains searched text, open terminal and type
grep -i -n 'searched text' *
It works also recursively
grep -i -r -n 'searched text' *
How to: Tips and Tricks
If you want to search all files, which contains searched text, open terminal and type
grep -i -n 'searched text' *
It works also recursively
grep -i -r -n 'searched text' *
This will recursively search your directory tree (starting at dir 'dot') and chmod 777 all directories only.
find . -type d -exec chmod 777 {} \;
Similarly, the following will chmod all files only (and ignore the directories).
find . -type f -exec chmod 666 {} \;
Credit goes here.
If you are using Elementary theme you have probably noticed that OpenOffice (LibreOffice) is missing scrollbars. I found an easy solution for this bug, just follow these few steps.
1. Backup your original elementary gtkrc file
sudo cp /usr/share/themes/elementary/gtk-2.0/gtkrc /usr/share/themes/elementary/gtk-2.0/_gtkrc.bak
2. Edit elementary gtkrc file
sudo gedit /usr/share/themes/elementary/gtk-2.0/gtkrc
3. Search and replace (If You're using Elementary 2.1 click here)
Find around ln 57
GtkRange ::slider-width = 8
Replace with
GtkRange ::slider-width = 10
Find around ln 64
GtkScrollbar ::has-backward-stepper = 0 GtkScrollbar ::has-forward-stepper = 0
Replace with
GtkScrollbar ::has-backward-stepper = 1 GtkScrollbar ::has-forward-stepper = 1
Find around ln 68
GtkScrolledWindow ::scrollbars-within-bevel = 1
Replace with
GtkScrolledWindow ::scrollbars-within-bevel = 0
4. Save gtkrc.
5. Log out and log back in. Now you can try to open OpenOffice. You should see your scrollbars.
Credit goes here.
Here is the modifiet gtkrc file. Simply follow these steps:
cd && wget http://howto.blbosti.com/files/elementary-libreoffice/gtkrc.tar.gz tar xf gtkrc.tar.gz sudo cp /usr/share/themes/elementary/gtk-2.0/gtkrc /usr/share/themes/elementary/gtk-2.0/gtkrc.bak sudo cp gtkrc /usr/share/themes/elementary/gtk-2.0/gtkrc
Then log out and log in and voila…
There were changes in Elementary 2.1 gtkrc, so the scrollbar disappears after an update. You need to edit the gtkrc file again.
Search and replace:
Find around line 67
GtkScrollbar ::has-backward-stepper = 0 GtkScrollbar ::has-forward-stepper = 0
Replace with
GtkScrollbar ::has-backward-stepper = 1 GtkScrollbar ::has-forward-stepper = 1
Find around line 74
GtkScrolledWindow ::scrollbars-within-bevel = 1
Replace with
GtkScrolledWindow ::scrollbars-within-bevel = 0
OPTIONAL STEP
It is good to change scrollbar width, because of horizontal scrollbar in In Calc / Spreadsheet
Bottom – original scrollbar width (6), and deformed icons and sheet tabs.
Top – changed scrollbar width to 10 and sheets are now readable and icons visible. You can change the icon width.. find your optional width.
To change the scrollbar width find around line 70
GtkScrollbar ::slider-width = 6
Replace with
GtkScrollbar ::slider-width = 10
If You don't want to edit your file, paste these lines into terminal window.
cd && wget http://howto.blbosti.com/files/elementary-libreoffice/gtkrc-elementary2.1.tar.gz tar xf gtkrc-elementary2.1.tar.gz sudo cp /usr/share/themes/elementary/gtk-2.0/gtkrc /usr/share/themes/elementary/gtk-2.0/gtkrc.bak sudo cp gtkrc /usr/share/themes/elementary/gtk-2.0/gtkrc
Connecting to a server across the internet is much more secure using SSH. There is a way that you can mount a folder on a remove server using the SSHFS service (based on the SSH File Transfer Protocol).
Open terminal and follow these steps:
1. Install sshfs
sudo apt-get install sshfs
2. Add yourself to the fuse group
sudo adduser yourname fuse
3. Log out and in again
4. Create a directory to mount the remote folder in (eg. in your home directory or in /media…)
mkdir ~/yourmountdirectory
5. Mount the remote server
sshfs username@host:/remotepath ~/yourmountdirectory
You'll be prompted to save the server key and for your remote password.
Now you should be able to cd into the directory and start using it as if it was local.
6. To unmount sshfs enter this command
fusermount -u ~/yourmountdirectory
There is a bug in the Compiz package in Ubuntu 10.04 Lucid Lynx (in Maverick Meerkat too) that doesn't allow you to fully change the mouse cursor theme. You only get the new cursor theme in some windows. But you can still change the mouse cursor theme in Ubuntu, even if you have Compiz enabled.
1. Go to /usr/share/icons and locate the exact folder name for the mouse cursor theme you want to use – remember it! For the Elementary theme, the folder name would be "DMZ-Black"
2. Now you need to edit the /usr/share/icons/default/index.theme file. Press ALT + F2 and enter:
gksu gedit /usr/share/icons/default/index.theme
Comment line with "Inherits=DMZ-White" and under this line add an identical line with the exact name of the mouse cursor theme you got in step 1. The final index.theme should look like this:
[Icon Theme] #Inherits=DMZ-White Inherits=DMZ-Black
UPDATE: Second way
Press ALT+F2 and run gconf-editor and go to desktop > gnome > peripherals > mouse and edit cursor_theme. Here you can enter theme name you got in step 1.
3. Restart Compiz by pressing Alt + F2 and entering:
compiz --replace
or simply Log out and Log in.
Via webupd8.org
If You mount samba shares using cifs method like I, You probably have met with delays at shutdown or restart.
[18.312000] CIFS VFS: Server not responding [18.312000] No response for cmd 5 mid 8
To avoid this delay it is necessary to umount all samba shares before rebooting or shutdown your computer. There are many solutions to fix this problem, but no one did not work for me when i am connected via wifi. So I made two simple launchers for Reboot (init 6) and Shutdown (init 0). More »
If for some reason does not work bash completion in terminal (using the TAB key), look inside the file bash.bashrc. Open terminal and type:
sudo gedit /etc/bash.bashrc
At the line 31 you can find this entry.
# enable bash completion in interactive shells #if [ -f /etc/bash_completion ] && ! shopt -oq posix; then # . /etc/bash_completion #fi
Uncomment it and save file.
# enable bash completion in interactive shells
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
. /etc/bash_completion
fi
PulseAudio has still problems with some applications and it always adds a little latency and that's the reason, why so many people still prefer ALSA. This howto shows you, how to remove PulseAudio, add alsa-mixer applet to the panel and associate hotkeys for volume change.
This will uninstall PulseAudio, delete the configuration files and uninstall it's dependencies; gstreamer-10-pulseaudio, libpulse-browse0, libpeexdsp1, pulseaudio-esound-compat, pulseaudio-module-udev, pulseaudio-module-x11, pulseaudio-utils, rtkit and gnome-desktop (don't worry, it is dummy package):
sudo apt-get purge pulseaudio
PulseAudio removes volume applet, so you need new volume applet. For getting it to work, you need to intall the following packages: python, python-notify, python-gtk2, python-alsaaudio and xfce4-mixer or gnome-alsamixer (i preffer xfce4-mixer).
sudo apt-get install python python-notify python-gtk2 python-alsaaudio python-eggtrayicon xfce4-mixer
1. To install Alsa sound (alsa-base, alsa-utils, alsa-tools and libasound2) enter this command:
sudo apt-get install alsa alsa-tools
2. Add yourself to the group audio:
sudo adduser yourusername audio
3. Reboot to take effect
sudo init 6
4. Alsamixer is sometimes muted by default, so you might need to unmute it. Run alsamixer:
alsamixer
Use arrows up and down to change volume, left and right to change source. To mute/unmute press M.
Note: Alsamixer might look different in any machine. It depends on your sound device (sound card). Please, read audio source labels. For example: PCM in Virtualbox is on fifth place instead of the second in VMWare.
Alsamixer in VMWare
Alsamixer in Virtualbox
To quit press Q.
When you attempt to upload a file in WordPress that is not in the default list of acceptable file types, you will receive the following error: File type does not meet security guidelines. Try another.
While there’s no admin-based tool for editing list of allowed file types, it’s not at all difficult to add your own or remove any existing. More »