Archive

Archive for the ‘Linux’ Category

How to disable touchpad in ubuntu

April 2, 2013 Leave a comment

#List devices

xinput list

# output should be like this

⎡ Virtual core pointer                        id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                  id=4    [slave  pointer  (2)]
⎜   ↳ Logitech Unifying Device. Wireless PID:101a    id=12    [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                  id=14    [slave  pointer  (2)]
⎣ Virtual core keyboard                       id=3    [master keyboard (2)]
↳ Virtual core XTEST keyboard                 id=5    [slave  keyboard (3)]
↳ Power Button                                id=6    [slave  keyboard (3)]
↳ Video Bus                                   id=7    [slave  keyboard (3)]
↳ Video Bus                                   id=8    [slave  keyboard (3)]
↳ Power Button                                id=9    [slave  keyboard (3)]
↳ Sleep Button                                id=10    [slave  keyboard (3)]
↳ Lenovo EasyCamera                           id=11    [slave  keyboard (3)]
↳ AT Translated Set 2 keyboard                id=13    [slave  keyboard (3)]
↳ Ideapad extra buttons                       id=15    [slave  keyboard (3)]

# locate the id of touchpad in this case it is 14
#SynPS/2 Synaptics TouchPad                  id=14    [slave  pointer  (2)]

# To disable it type

xinput set-prop 14 “Device Enabled” 0

# To enable it type

xinput set-prop 14 “Device Enabled” 1

Categories: Ubuntu

How to Quota Users & Groups in Ubuntu

March 14, 2013 Leave a comment

How to setup Disk Quotas in Ubuntu

5 Steps to Setup User and Group Disk Quota on UNIX / Linux

sudo apt-get install quota quotatool

Edit /etc/fstab and add usrquota and grpquota options to the mount point which contains the home directories. For me this was the root mount point, but it will depends on how you did your partitoning (it could be that you made a separate mount point for /home).

sudo gedit /etc/fstab

The entry should read something like:

# /dev/hda1 UUID=4ea80ca3-37b7-447e-831a-700a38627029 / ext3 defaults,errors=remount-ro,usrquota,grpquota 0 1

Finish setup with the following series of commands

sudo touch /quota.user /quota.group
sudo touch /aquota.user /aquota.group

sudo chmod 600 /quota.*
sudo chmod 600 /aquota.*

sudo mount -o remount /

sudo quotacheck -avugm

sudo quotaon -avug

edquota myuser
# For 1 GB -> 1024000
Disk quotas for user ramesh (uid 500):
Filesystem blocks soft hard inodes soft hard
/dev/sda3 1419352 0 1024000 1686 0 0

Categories: Linux, Ubuntu

Ubuntu KVM Resolution Problem

February 8, 2013 Leave a comment

# KVM Switch ile ekran çözünürlüğü bozulduğunda
# http://ubuntuforums.org/showthread.php?t=1437980
#
gtf 1280 1024 60
# kullanılan ekranı öğrenmek için
xrandr –current
# /etc/X11$ xrandr –current
# Screen 0: minimum 320 x 200, current 1280 x 1024, maximum 4096 x 4096
# VGA1 connected 1280×1024+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
# 1360×768 59.8
# 1024×768 60.0
# 800×600 60.3 56.2
# 848×480 60.0
# 640×480 59.9 59.9
# 1280x1024_60.00 59.5*
#
# VGA1 kullanılan ekran…
DEF_SCREEN=VGA1
xrandr –newmode “1280x1024_60.00” 108.88 1280 1360 1496 1712 1024 1025 1028 1060 -HSync +Vsync
xrandr –addmode $DEF_SCREEN “1280x1024_60.00”
xrandr –output $DEF_SCREEN –mode “1280x1024_60.00”

Categories: Ubuntu

FreeBSD E17

February 8, 2013 Leave a comment

install all components related with e17 under
/usr/ports/x11-wm/enlightenment
/usr/ports/x11-wm/e17-utils
/usr/ports/x11/e17-module-*
/usr/ports/x11-themes/e17-splash*
/usr/ports/x11-themes/e17-theme*

create a file under home directory with name .xinitrc and add line below
exec /usr/X11R6/bin/enlightenment_start
and start
startx

Categories: FreeBSD

Disable IPv6 on Ubuntu

February 7, 2013 Leave a comment

http://www.noobslab.com/2012/05/disable-ipv6-if-your-internet-is.html

add to /etc/sysctl.conf

# IPv6
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

then

sysctl -p

Categories: Security, Ubuntu

Merging PDF files on Ubuntu

October 13, 2010 Leave a comment

gs -q -sPAPERSIZE=letter -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=out.pdf in1.pdf in2.pdf in3.pdf …

or

use pdftk: http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/
examples: http://www.accesspdf.com/article.php/20041129175231241

Categories: Ubuntu Tags: , , ,

Restoring GRUB2 on Ubuntu

September 8, 2010 Leave a comment

https://help.ubuntu.com/community/Grub2#Reinstalling%20from%20LiveCD

METHOD 3 – CHROOT

This method of installation uses the chroot command to gain access to the broken system’s files. Once the chroot command is issued, the LiveCD treats the broken system’s / as its own. Commands run in a chroot environment will affect the broken systems filesystems and not those of the LiveCD. Read more…

Categories: Linux, Ubuntu Tags: , ,

Using GMP with Eclipse on Ubuntu C/C++

April 7, 2010 Leave a comment

Install GMP
sudo apt-get install libgmp3-dev libgmp3-doc libgmp3c2

On Eclipse
Project->Properties
C/C++ Build->Settings
GCC C Linker->Miscellaneous
Linker flags: -lgmp -lgmpxx

Categories: C/C++, Eclipse, GMP, Ubuntu Tags: , , , ,

Install MySql Server on FreeBSD

March 2, 2010 Leave a comment

cd /usr/ports/databases/mysql50-server
make install clean
cp /usr/local/share/mysql/my-small.cnf /usr/local/etc/my.cnf
echo “mysql_enable=\”YES\”” >> /etc/rc.conf
mysql_install_db
chown -R mysql:mysql /var/db/mysql

Categories: FreeBSD Tags: ,

Install vulnerable ports on FreeBSD

March 2, 2010 Leave a comment

While installing ports portaudit may stop installation becasue of vulnerabilities of ports. In order to ignore vulnerability reports use -DDISABLE_VULNERABILITIES parameter in your make command.

make -DDISABLE_VULNERABILITIES install clean

Categories: FreeBSD Tags: , ,