Archive for category Linux
Setting Lenovo IdeaPad S10-3′s touchpad on Linux
Posted by Luis Gallardo in Linux on 03/09/2010
After buying my Lenovo IdeaPad S10-3 I read some reviews about the hardware and all of them agreed that to integrate the mouse’s buttons to the touchpad wasn’t the best thing Lenovo have done…I’m agreed too.
On Windows 7 the touchpad has a better performance than on Linux without setting Synaptics in the graphical environment, so I thought it should be a way to set it on Linux. According to the documentation of Synaptics and some tests I did, this is the best setting I found so far:
Section "InputDevice" Identifier "Synaptics Touchpad" Driver "synaptics" Option "Protocol" "auto-dev" Option "CorePointer" Option "LockedDrags" "false" Option "VertEdgeScroll" "true" Option "HorizEdgeScroll" "false" Option "TapButton1" "1" # Left click Option "LTCornerButton" "2" # Two-buttons click Option "MaxDoubleTapTime" "120" Option "TapButton2" "3" # Right click Option "EmulateTwoFingerMinZ" "20" Option "EmulateTwoFingerMinW" "5" Option "AreaBottomEdge" "4200" EndSection
Here the parameters of interest are:
| Parameter | Description |
| TapButton1 | Which mouse button is reported on a non-corner one-finger tap. |
| LTCornerButton | Which mouse button is reported on a left top corner tap. |
| TapButton2 | Which mouse button is reported on a non-corner two-finger tap. |
| EmulateTwoFingerMinZ | This sets the Z pressure threshold to emulate a two finger press. |
| EmulateTwoFingerMinW | This sets the finger width threshold to emulate a two finger press. |
| AreaBottomEdge | Ignore movements, scrolling and tapping which take place below this edge. |
Debugging values
It might happen that your fingers are wider or narrower than mine, so you have to adjust the EmulateTwoFingerMinW variable. In the same way, if you are setting another touchpad model you have to define a different value for AreaBottomEdge.You can use the synclient command in order to do some tests, no restarting X needed.
To change a variable’s value you have to use synclient as follow:
synclient AreaBottomEdge=4900
Then you can query all current values by typing this:
synclient -l | less
Finally you can see how the values change “on the fly” while you are touching the touchpad. To do so you must set the following option in the /ect/X11/xorg.conf file:
Option "SHMConfig" "true"
Then you will be able to see the changes by typing:
synclient -m 10
References
- Setting Synaptics Touchpad in Lenovo IdeaPad S10e
- man synaptics
Some touchpads report a two-finger touch as wide finger. This
sets the finger width threshold to emulate a two finger press.
Brightness of Lenovo S10-3 (GMA 3150 video) on Linux
Posted by Luis Gallardo in Linux on 31/08/2010
The new netbook architecture comes with a Intel GMA 3150 graphic card, which it’s not supported completely by the kernel because it doesn’t show any information in the /sys/class/backlight directory. This means you won’t be able to adjust your LCD brightness with the function keys (ACPI), or use any plugin for that matter, or set the brightness with third-party applications such as laptop-mode-tools.
I did a research on Internet and I found a solution to the brightness adjustment problem, which consist in setting the value to the PCI device on the bus directly, as shown here:
setpci -s 00:02.0 f4.b=55
Where 00:02.0 is the PCI id on the bus, and 55 is a hexadecimal value between 0 and FF, which modifies the display’s brightness.
In order to konw which device id to write on, you can query the PCI bus:
mundungus:~# lspci 00:00.0 Host bridge: Intel Corporation N10 Family DMI Bridge 00:02.0 VGA compatible controller: Intel Corporation N10 Family Integrated Graphics Controller 00:02.1 Display controller: Intel Corporation N10 Family Integrated Graphics Controller 00:1b.0 Audio device: Intel Corporation N10/ICH 7 Family High Definition Audio Controller (rev 02) 00:1c.0 PCI bridge: Intel Corporation N10/ICH 7 Family PCI Express Port 1 (rev 02)
As you cans see the device id for the graphic card on the PCI bus is 00:02.0.
Setting laptop-mode-tools
Commonly laptop-mode-tools writes on a file into the /sys/class/backlight directory, as I wrote in previous post, but in this case you have to put the following:
BATT_BRIGHTNESS_COMMAND="setpci -s 00:02.0 f4.b=55" LM_AC_BRIGHTNESS_COMMAND="setpci -s 00:02.0 f4.b=77" NOLM_AC_BRIGHTNESS_COMMAND="setpci -s 00:02.0 f4.b=77" BRIGHTNESS_OUTPUT="/dev/null"
Notice you have to set the variable BRIGHTNESS_OUTPUT withe the value /dev/null, otherwise it won’t run properly.
References
Partitions on Lenovo IdeaPad S10-3
Posted by Luis Gallardo in Linux on 27/08/2010
I sold my Lenovo IdeaPad S10 to upgrade it to a Lenovo IdeaPad S10-3. As it happened with my sister’s S10-2 netbook, the partitions scheme looks like the ones shown above: A small partition (I assume to boot Windows), a 100 GB partition for Windows 7, another partition with 30 GB for backups, and 150 GB of rescue and driver for Windows.
Because my disk is mine, I decided to erase the two last partitions (I backup-ed its content first) and change the size of Windows 7 partition in order to make room for two Linux (Debian and Ubuntu), another partition for 1 GB of swap, and the remaining for /home, as is shown in the following picture:
Collateral damage
The only side effect is that some applications supplied by Lenovo, like the OneKey Recovey, won’t work properly because the partitions had been deleted. The solutions is to make the rescue disks before erase those partitions, or live with those partitions but resizing them to make room (this what’s I did on my sister’s netbook, a Lenovo S10-2).
Warning
Before resizing the Windows partition you better defragment the disk. You should also check that Windows 7 boots properly after resizing the partition, if not you can recovery it by using one of those partitions provided by Lenovo. I did the mistake of erasing them, so I had to borrow a Windows 7 recovery disk, because I didn’t want to wait for a recovery disc shipped from USA.
Ubuntu Software Center on Debian
Posted by Luis Gallardo in Linux on 17/08/2010
Some people yelled: what the heck is doing Debian by including Ubuntu Software Center in its repositories? The true is, like it or not, this package is available with the name Software Center, and I have to admit it’s an option for installing software, even more easier than Synaptic does. But it’s not only a graphical interface for installing packages, sol let’s install it and see what else it has to offer.
Installing Software Center
In a terminal you can type the following:
aptitude install software-center
This will install Software Center and its compounds.
Software Center
In order to use Software Center, which is depicted in the above image, you must got to Applications > System > Software Center:
From there you can search, instal and uninstall applications in the system as you would do from a terminal or graphically in Synaptic, but in a really easy way.
Update Manager
The Update Manager notifies users about new updates, the same way Ubuntu does.
This can be really useful for helping out forgetful people to keep their system up to date (from example if they use Debian testing).
Software Sources
You can also set the system’s repositories from the Software Sources utility. In my case I have some internal repositories with apt-cacher in my local network, which appear in the Third-Party Software Tab:
This application in the end just modifies the /etc/apt/sources.list file or the files in the /etc/apt/sources.list.d folder.
Compatibility with aptitude
My big concern was if this application would integrate with aptitude, I mean, if it were capable of uninstall unused dependency packages of a particular application. So far I’ve tested and it appears so!!
Using ssh as a network share
Posted by Luis Gallardo in Linux on 14/08/2010
You can use ssh as a secure ftp (sftp), so all your data will be encrypted throughout the network. To do so you can use some file browsers like Gnome’s Nautilus or KDE’s Dolphin, just by typing the remote path in the address bar as follow:
ssh://lgallard@192.168.1.30:/home/lgallard
Where lgallard is the user account at the server, 192.168.1.30 is the server’s IP address and /home/lgallard is the remote directory to map.
But what if your file browser doesn’t support the ssh protocol (like Xfce’s Thunar)?…A possible solution is to map the directory using sshfs and fuse as if it were another mount-point on the system.
Installing sshfs for fuse
In Debian you can install the sshfs package to provide this functionality:
mundungus:~# aptitude install sshfs
You must create the mount-point directory. I’m old-fashioned, so I like to make it in the /mnt/ folder as root:
mundungus:~# mkdir /mnt/moody mundungus:~# chmod 777 /mnt/moody
Now you must add the user who will map the network share into the fuse group:
adduser lgallard fuse
Using sshfs
Now as a normal user you can map the remote location using the sshfs command:
lgallard@mundungus:~$ sshfs lgallard@192.168.1.30:home /mnt/moody/
This will let you see your “network share” as if it were a local directory. Be careful!!
Unmonting the network share
In order to unmount the network share just type the following in a terminal:
lgallard@mundungus:~$ fusermount -u /mnt/moody/
You can check if it was unmounted using the mount command.
Switching to Gnome Desktop on Ubuntu Netbook Edition
Posted by Luis Gallardo in Linux on 10/08/2010
In the previous version of Ubuntu for netbooks (Ubuntu Netbook Remix)you could switch from the netbook environment to the complete Gnome. This was possible due to a package called desktop-switcher which gives that option. At first sight I thought users of this version were more restricted, but after seeing all option of gdm (the login manager) I realized that package is not needed any more because that option in included in the session selection. I think it makes sense because the Ubuntu Netbook Edition environment is Gnome with different settings to fix small displays.
Choosing the Gnome environment
In order to switch to the complete Gnome just do this:
- If you already logged in, select “Close session” on the menu you use to shutdown your netbook.
- Provide your user name.
- After typing your user name, choose the Gnome session.
- Provide you password
- After logging in you will see your complete Gnome environment loaded.
Choosing the Ubuntu Netbook Edition environment
If you want to go back to your Ubuntu Netbook Edition environment,you can repeat the procedure an select Ubuntu Netbook Edition or Ubuntu Netbook Edition 2D session.
Some issues
While testing this option I switched to Gnome and later to the Ubuntu Netbook Edition one more time, and although the latter loads witho problems, the Gnome‘s panel also does. The only way I found to load the Ubuntu Netbook Edition environment was by restarting the graphic server (if it sounds weird or you don’t know how to do it, by rebooting you netbook will be enough).
Using SSH
Posted by Luis Gallardo in Linux on 05/08/2010
If you are working in a networking environment, more likely you’ll need servers, run commands or copy files remotely and safely. For this you count on with the ssh protocol which allows you exchange data between devices through a secure channel, using public key cryptography to authenticate remote computers and users. Some features that offers ssh are:
- It allows you to mange computer remotely.
- It can be used as an FTP alternative (using SFTP).
- It the replacement of the r commands (rcp, rsh, rlogin and telnet).
- It allows you to redirect ports and tunneling.
- It can be used to run commands on remote servers.
- It allows to run graphical applications in a remote server and display them in the local computer.
- By default it listens on the TCP port 22.
Installing SSH
On Debian you can install the server and the client as follow:
aptitude install openssh-client openssh-server
Accessing remote servers
In order to access a remote server using an IP address, you can do the following:
ssh user@server.com ssh user@192.168.1.30
Where server.com must be a address associated to an IP address by and DNS or through the /etc/hosts file. In the other hand, if the current account exists in server and client, you can omit the user name and the current working user will be assumed:
ssh 192.168.1.30
Running commands remotely
In order to run a command remotely, you can use this syntax:
ssh user@server.com command ssh user@192.168.1.30 command
Where command refers to the command or absolute path of the program to run. Examples:
ssh user@server.com /usr/local/bin/backup ssh user@192.168.1.30 ls > listing.tx
Running graphical applications remotely
Sometimes you need to run graphical applications on remote server but display them on locally. You can achieve this with ssh by using the -X switch:
ssh -X user@server.com application ssh -X user@192.168.1.30 application
For instance, if you want to run Firefox from a remote server you can type the following:
ssh -X lgallard@192.168.1.30 firefox
Note: In order to display graphical applications remotely, the client must enable the following option in the /etc/ssh/sshd_config file:
X11Forwarding yes
Copying files remotely
Sooner or later you will need to copy files among working stations and, to avoid copy them on temporary media (like pendrives), you can copy directly from one device to another. To do so, follow this syntax:
Copy from a local computer to a remote server:
scp /local/path/to/file user@server.com:/remote/path scp /local/path/to/file user@192.168.1.30:/remote/path
Example:
scp /etc/passwd lgallard@192.168.1.30:/home/lgallard/Desktop
Copying from a remote server to a local computer::
scp user@server.com:/remote/path/to/file /local/path scp 192.168.1.30:/remote/path/to/file /local/path
Example:
scp root@192.168.1.30:/etc/shadow .
References
- Secure Shell en Wikipedia
- man ssh
Adding Ubuntu repo to apt-cacher
Posted by Luis Gallardo in Linux on 30/07/2010
I have already set an internal mirror on Debian to avoid downloading the same packages twice, and I did the same thing by adding the VirtualBox’s repo, so it lets me save bandwidth and time because all updated packages will be available on that internal mirror.
Now I installed Ubuntu Netbook Edition on my sister’s netbook and she told me that sometimes the updates can last so long, because her Internet connection is from a USB modem, and at some times it could be a nightmare to browse the net and update the system at the same time. Therefore, I decided to add the Ubuntu repo to my internal mirror, as is shown in the above picture.
Setting the Ubuntu repo in apt-cacher
In order to set the Ubuntu’s repository, edit the /etc/apt-cacher/apt-cacher.conf file. Find the path_map parameter and add the following:
path_map = debian http://ftp.us.debian.org/debian/ ; multimedia http://www.debian-multimedia.org ; virtualbox http://download.virtualbox.org/virtualbox/debian ; ubuntu http://ve.archive.ubuntu.com/ubuntu/
Setting up the Ubuntu clients
On the Ubuntu PCs you have to edit the /etc/apt/sources.list, commenting all its content and adding the following lines:
deb http://192.168.2.100:3142/ubuntu/ lucid main restricted deb http://192.168.2.100:3142/ubuntu/ lucid-updates main restricted deb http://192.168.2.100:3142/ubuntu/ lucid universe deb http://192.168.2.100:3142/ubuntu/ lucid-updates universe deb http://192.168.2.100:3142/ubuntu/ lucid multiverse deb http://192.168.2.100:3142/ubuntu/ lucid-updates multiverse deb http://192.168.2.100:3142/ubuntu/ lucid-security main restricted deb http://192.168.2.100:3142/ubuntu/ lucid-security universe deb http://192.168.2.100:3142/ubuntu/ lucid-security multiverse
Note: I also commented the deb-src repos because I know my sister won’t need them but if you do, adapt them using your internal mirror’s IP address.
As a final step, update the package list and upgrade the system from a terminal:
aptitude update aptitude safe-upgrade
Or use the graphical package manager to do the same.
Best Ubuntu mirror
Posted by Luis Gallardo in Linux on 25/07/2010
When you install Ubuntu you’ll never be asked about the mirror from where the packages will be downloaded because Ubuntu select a mirror according to your location or country. Therefore, after installing Ubuntu Netbook Edition the default mirror was http://ve.archive.ubuntu.com. If you come from Debian you will try to install apt-spy to find your best mirror, but Ubuntu doesn’t have such a tool, so how do you set a best mirror according to the best response?
Selecting the best mirror
Go to System > Software Sources. There click on Download from, and select Other. A new window will appear from where you can choose a new server, or click on the Select Best Server button as is shown in the above picture. By clicking that button Ubuntu will performance a test to determine your best server. In my case it was one located in USA.
Does it really work?
To update my Ubuntu Netbook Edition with the Venezuelan server it said it will last an hour and forty five minutes, but using the new server it lasted just 21 minutes!!
How to delete the Examples folder on Ubuntu Netbook Edition
Posted by Luis Gallardo in Linux on 22/07/2010
Ubuntu Netbook Edition comes by default with an example folder where you’ ll find example files for video, audio and other documents. It’ s interesting to have it for testing purposes but when you know every thing is alright, and for making some room on the screen, you can delete that Example folder.
But this folders is not such, it’s sort of a shortcut. In order to delete it open a terminal in your home directory and list its content:
rebeca@germione:~$ ls -l drwxr-xr-x 2 rebeca rebeca 4096 2010-07-15 13:16 Download drwxr-xr-x 2 rebeca rebeca 4096 2010-07-15 13:16 Documents drwxr-xr-x 2 rebeca rebeca 4096 2010-07-15 13:16 Desktop -rw-r--r-- 1 rebeca rebeca 179 2010-07-15 12:58 examples.desktop drwxr-xr-x 2 rebeca rebeca 4096 2010-07-15 21:26 Pictures drwxr-xr-x 2 rebeca rebeca 4096 2010-07-15 13:16 Music drwxr-xr-x 2 rebeca rebeca 4096 2010-07-15 13:16 Templates drwxr-xr-x 2 rebeca rebeca 4096 2010-07-15 13:16 Público drwxr-xr-x 2 rebeca rebeca 4096 2010-07-15 13:16 Videos
This shortcut is made by examples.desktop file. Just delete this file:
rebeca@germione:~$ rm examples.desktop
Now the that folder Examples shouldn’t appear any more:

















Planeta Linux