Category Archives: Linux

Downloading folder from server

Useful command to download a folder (and content) called “folderonserver” from a server, to the folder “home/localfolder” on the local computer:


home$ scp -r username@server.server:folderonserver localfolder

Obviously “folderonserver” is located in your home folder on the server, i.e, “homeserver/folderonserver”.

Recover Previously Deleted File on an NTFS partition (even from Trash) on UBUNTU

Use “ntfsundelete”. A usefull way is to copy the output of its search in a file, like this


~/temp$ sudo ntfsundelete /dev/sda6 -S 10k-1m -p 100 --> list.txt

where sda6 is the drive of interest previously unmounted. Here we searched for files between 10kb and 1mb big, that are 100% recoverable. Then in the list we look for the inode number we are interested in (relative to the filename, size, etc), and to recover it we do


~/temp$ sudo ntfsundelete /dev/sda6 -u -i 1039 -o 33.txt -d ~/temp

1039 is the inode number, 33.txt is the output number and ~/temp is the output folder.

VirtualBox and Folder Sharing under Ubuntu 9.10

Host OS: Ubuntu 9.10

Guest OS: Windows XP

To share a “Host” folder (in this case Public) and see it from the “Guest” we do:

Host:   local$ VBoxManage sharedfolder add ‘Windows XP’ -name “sharedfolder” -hostpath “/home/user/Public”

Guest: C:\> net use p: \\vboxsvr\sharedfolder

Ubuntu 9.10, Matlab, Mathematica

To install those software packages it is necessary to install first the library ‘libstdc++5’ manually. Since it is not available from Synaptic it is necessary to download it manually.

Additionally, for Matlab, after installing it we have to do

root# cd /usr/loocal/matlab

root# ./install_matlab -glnx

 

and say yes to all the questions. Then, do (still in /usr/loocal/matlab ):

root# cd bin

root# gedit matlab

 

and add the following line AFTER the FIRST ONE (#!/bin/sh):

export AWT_TOOLKIT=3DMToolkit

and save the file and exit. Now, you should be able to load Matlab without problems and from anywhere.

 

 

 

 

 

 

Ubuntu DSL

At the command prompt in the terminal enter the following command:

sudo pppoeconf


Once configured, the DSL connection is established using the pon utility. To establish the connection, execute the following command from a terminal window:

sudo pon dsl-provider

The poff utility is used to close the connection to a DSL provide. To break the connection run the following command:

sudo poff

Dell D630 and Synaptics Touchpad Configuration on Ubuntu 7.10

After tweaking a little bit, this is the configuration I liked the most, with tapping disabled, and good acceleration. The file is /etc/X11/xorg.conf


Section "InputDevice"
Identifier "Synaptics Touchpad"
Driver "synaptics"
Option "SendCoreEvents" "true"
Option "Device" "/dev/psaux"
Option "Protocol" "auto-dev"
Option "MinSpeed" "0.7"
Option "MaxSpeed" "15"
Option "AccelFactor" "0.2"
Option "MaxTapTime" "0"
Option "SHMConfig" "true"
Option "HorizEdgeScroll" "0"
EndSection

Modify “MinSpeed”, “MaxSpeed” and “AccelFactor” to suit your needs.

Dell D630, Ubuntu 7.10 and Sound

To fix the sound issues in Ubuntu 7.10, install linux-backports-modules and modify /etc/modprobe.d/alsa-base to include the setting for Intel HD Audio controller.


sudo aptitude install linux-backports-modules
sudo gedit /etc/modprobe.d/alsa-base

options snd-hda-intel model=dell-m42

After reboot you should be able to see all HD Audio components.

Acer 5920G Media Keys and Ubuntu 7.10

In principle, when you install Ubuntu, the media keys (with blue lights) are activated, as the second (scrolling capable) part of the touchpad, which ends up being very annoying, and to disable that feature we have to do this:

1) Add this line to the file /etc/xorg.conf, in the section of Synaptic driver,


Option "SHMConfig" "true"

so it looks like this


Section "InputDevice"
Identifier "Synaptics Touchpad"
Driver "synaptics"
Option "SendCoreEvents" "true"
Option "Device" "/dev/input/event4"
Option "Protocol" "auto-dev"
Option "SHMConfig" "true"
Option "HorizEdgeScroll" "0"
EndSection

save the file

2) Install the package qsynaptics, and run it, (not necessarily as root)


$ qsynaptics

Press the “off” button to deactivate the media keys, and then press OK saving the configuration.

3) Go to System -> Preferences -> Sessions

and create a new ‘startup’ entry:

Name: Qsynaptics – Configure Touchpad
Command: qsynaptics -r

And save it. Now when you log in, settings are applied correctly (-r loads the previously saved .qsynaptics file)