Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Sunday, January 26, 2025

Mounting a HFS+ hard drive

Mount an external hard drive with a HFS+ filesystem:

 # mount -t hfsplus -o force,rw /dev/sdb2 /mnt/tmp

Saturday, March 24, 2018

NFS share in OSMC

To configure a NFS server to share a folder.

1. Fix the IP address to a static one. This can be done directly in the network menu of the 'My OSMC' application. The configuration is stored in the file: /var/lib/connman/[interface]/settings

2. Create a mount point in /mnt for the directory from a USB drive. 
$ sudo mkdir ./TheBlackHole

$ sudo chmod 777 ./TheBlackHole

3. Mount the drive at the boot time. Edit fstab file adding the following line.
LABEL=TheBlackHole      /mnt/TheBlackHole       ext4    defaults,users,exec     0       0

4. Download server: sudo apt-get install nfs-kernel-server portmap

5. Edit the /etc/exports file adding the following line:
/mnt/TheBlackHole        192.168.1.0/255.255.255.0(rw,sync,no_root_squash,no_subtree_check)


Saturday, March 03, 2018

Working with MIDI in Slackware

If you want to play MIDI files in Slackware you do need to install special software (synth, mixer, sequencer, etc.). There is a great page where it is explained clearly how to set up a basic environment in order to start working whit MIDI in Linux. All the software mentioned in that webpage is available for Slackware in Slackbuilds.org. Instead of copy-paste what is already clearly explained in the mentioned site, here, I highlight the differences I have observed.

Basically, the MIDI instructions are generated by reading a midi file, by a virtual instrument or by a hardware MIDI controller (as a keyboard), then the synth interprete the instructions a convert them into a sound signal. Several signals can be mixed (Jack), decoded and put in the speakers. 

1. I had by default a low latency kernel and a audio group in my Slackware box. 
2. I don't know how to modify the group limits, but I have realised that it is not strictly necessary. IT is possible to follow the procedure skipping this configuration and using the option -r when you run jackd (jackd -r ...), you will see a warning message. In my case, the performance is ok for what I want to do.
3. Considering that, at the end, you want to be able to use a MIDI sequencer (Rosegarden in this case). You will need to install the following set of software.
- Rosegarden : Sequencer
- liblo, liblrdf, dssi, lilypond : Rosegarden dependencies
- jack-audio-connection-kit, lirc, perl-xml-twig : Optional Rosegarden dependencies.
- fluidsynth : Softsynth
- fluid-soundfont : Base sound samples
- vmpk : Virtual piano keyboard. Used for testing purposes.
- qjackctl : GUI front end to configure Jack
- Qsynth : GUI front end to configure Fluidsynth.

4. Strictly, you don't need to use Jack to use MIDI, but it is recommended if you want to do more than very basic thinks. You do need Alsa and fluidsynth.

5. It is important to remark that Slackware is currently using Pulseaudio as sound engine. When Jack is running, Pulseaudio is shouted down.

Saturday, November 26, 2016

Kernel upgrade

As I mention in another post, Kaby Lake processors are not supported by the kernel version currently used in Slackware 14.2 and -current (4.4.x). So, in order to use Slackware in a system using this architecture, it is need to upgrade the kernel to someone above 4.5. In this case I used the version 4.8.10, the last stable available in that moment.
In general the upgrading was done by following the procedure explained in Aliens Bob's wiki. In simple, it is as follow:

- Configure the EFI boot loader to show two options, one with the old kernel and other with the new one. This is a bit different at what is explained in the Alien's wiki, because he uses lilo instead of elilo (it is an old post), but the situation is almost the same, even easier. I did this before compiling because I wanted to be sure that the configuration and both booting options were working properly (I loaded the same kernel in both option).

- Download the Kernel sources.
$ wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.8.10.tar.xz

- Check the source authenticity.
# wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.8.10.tar.sign
# gpg --keyserver wwwkeys.pgp.net --recv-keys 38DBBDC86092693E
# gpg2 --verify linux-4.8.10.tar.sign

- Extract the source to a local directory.
# tar -Jxvf linux-4.8.10.tar.xz

- Download an initial .config file from a Slackware mirror.
$ wget http://mirrors.slackware.com/slackware/slackware64-current/testing/source/linux-4.6-configs/config-generic-4.6.x64

- Configure the Kernel compilation.
# make oldconfig
# make menuconfig

- Make and Install.
# make bzImage modules
# make modules_install

- Add the new Kernel to elilo.
# cp arch/x86/boot/bzImage /boot/efi/EFI/Slackware/vmlinuz-custom-4.8.10
And edit to image=vmlinuz-custom-4.8.10 the second boot option in elilo.conf.

- Reboot.

Wednesday, July 27, 2016

Fine tuning

There was several acctions I had to take in order to configure the system better.

- I forgot to set the network during the installation, and I like to use a differnt hostname than the default. To run the network configuration program run the command:

# netconfig


- I changed the kernel from Huge to generic, I did it by following this procedure stated in SlackDocs. The only one difference was the configuration of lilo, in my case, I'm ussing elilo, so the procedure is a bit different.
I copyed the Slackware bootloader folder in EFI partition (/boot/efi/EFI/Slackware) and I renamed as Slackware-generic (/boot/efi/EFI/Slackware-generic), then I copyed the files /boot/vmlinuz-generic-4.4.14 and the RAM disk /boot/initrd.gz which were created previously into the Slackware-generic folder. Then, it is needed to modify the elilo configuration file to:

# /boot/efi/EFI/Slackware-generic/elilo.conf

chooser=simple
delay=1
timeout=1
default=Slackware-generic
#
image=vmlinuz-generic-4.4.14
    initrd=initrd.gz
    label=Slackware-generic
    root=/dev/sda3
  append="resume=/dev/sda2"
    read-only

This configuration includes the line that enables hibernation ("resume=/dev/sda2").

To finish I added the Slackware-generic boatloader to the UEFI boot configuration using the computer's firmware menu


- In Windowmaker, I used nm-applet to connect to a wifi network. The application loads in the system tray, so first it is needed to install and load wmsystemtray.


- I set the network time protocol script to run at starting the computer.

# chmod 755 /etc/rc.d/rc.ntpd

and I used the confuguration file:

# /etc/ntp.conf

driftfile /etc/ntp/drift
logfile /var/log/ntp.log

server 0.nl.pool.ntp.org
server 1.nl.pool.ntp.org
server 2.nl.pool.ntp.org
server 3.nl.pool.ntp.org

server 127.127.1.0
fudge 127.127.1.0 stratum 10

restrict default nomodify nopeer notrap
restrict 127.0.0.1 mask 255.0.0.0

Sunday, May 29, 2016

Synaptics touchpad configuration in Xorg

I wanted to customize the configuration of the Synaptics' driver because the click buttons were swapped and I wanted to disable it while typing.

This is the Xorg configuration file I wrote:

# /etc/X11/xorg.conf.d/50-synaptics.conf
Section "InputClass"
Identifier "touchpad"
Driver "synaptics"
MatchDevicePath "/dev/input/event*"
MatchIsTouchpad "on"
 Option "TapButton1" "1"
 Option "TapButton2" "3"
 Option "TapButton3" "2"
 Option "VertEdgeScroll" "on"
 Option "VertTwoFingerScroll" "on"
 Option "HorizEdgeScroll" "on"
 Option "HorizTwoFingerScroll" "on"
 Option "EmulateTwoFingerMinZ" "40"
 Option "EmulateTwoFingerMinW" "8"
 Option "PalmDetect" "1"
 Option "PalmMinWidth" "10"
 Option "PalmMinZ" "100"
EndSection

The touchpad is not really disabled while typing. Instead, it is sensitive to recognize the palm when I touch it accidentally, avoiding to do a click.

Saturday, January 23, 2016

Sound in Slackware64 current (14.2)

UPDATE:
I installed Plasma 5.2 and now it is possible to change the output device from the System Settings > Multimedia window. Still is not a clean process but, it is cleaner than to copy and delete the asound.conf file. The procedure consisted in just to move upwards the HDMI output device in the Audio Playback option from the Audio and Video section. In my case the sub device connected to the HDMI port is the 0,7 (HDMI 2). Then, this devise also should be selected as profile in the Audio Hardware Setup tab. I tried to make a new Activity with the new configuration, but it didn't work due to the fact that all the activities share the same System Configuration, if you change something in one, it will also change in the others. Also, the configuration file snd-hda-intel.conf is not needed anymore.
---

After installing Slackware64-current (2015.12.29) I did not have sound neither in the speakers nor in the headphones. So I checked how ALSA had detected the soundcards:

$ cat /proc/asound/cards
0 [HDMI ]: HDA-Intel - HDA Intel HDMI
               HDA Intel HDMI at 0xb211c000 irq 50
1 [PCH  ]: HDA-Intel - HDA Intel PCH
               HDA Intel PCH at 0xb2118000 irq 47

So, ALSA configured the HDMI card as first device and it used it as default. Connecting the HDMI port to a TV the sound flew from the TV speakers. The problem was solved by switching the name of both cards in the file /etc/modprobe.d/snd-hda-intel.conf


/etc/modprobe.d/snd-hda-intel.conf
options snd-hda-intel model=auto

alias char-major-116 snd

alias snd-card-0 snd-hda-intel
alias snd-card-1 snd-hda-intel

options snd-hda-intel id=PCH index=0

options snd-hda-intel id=HDMI index=1
#

After rebooting, the sound started to work properly in the speakers and headphones. Auto-mute mode worked fine as well. 

$ cat /proc/asound/cards
0 [PCH   ]: HDA-Intel - HDA Intel PCH
                HDA Intel PCH at 0xb2118000 irq 47 
1 [HDMI ]: HDA-Intel - HDA Intel HDMI
                HDA Intel HDMI at 0xb211c000 irq 50

In the other hand, connecting the HDMI port did not change the sound output. In other words, although there was video in the TV, the sound came out from the computer's speakers or headphones.  
The solution of this problem is not trivial. Some people try to solve it changing the default card every time they use a different card. Although it seem that it is possible to build a script to overwrite the setting (defined in /etc/asound.conf) i found this solution too dirty. Instead, I followed the idea of cloning the sound from one card to the another, so, always in both cards (PCH and HDMI) will sound the same audio and will be possible to just mute the computer's speakers when it will be connected to a TV.

After a couple of hours looking for a solution and a lot of try and error, I found a good reference to follow. Finally, The solution consisted in configure ALSA to create a virtual device which route the audio to both devices. Also, the configuration solves the error that occurs when multiple applications try to access to the virtual card at the same time. The configuration is made in /etc/asound.conf :

# /etc/asound.conf
pcm.PCH {
        type hw
        card 0
        device 0 }
        
ctl.PCH {
        type hw
        card 0
        device 0 }        

pcm.HDMI {
        type hw
        card 1
        device 7 }     

ctl.HDMI {
        type hw
        card 1
        device 7 }        

pcm.PCHDmixed {
   type dmix
   ipc_key 1024
   ipc_key_add_uid false
   ipc_perm 0666
   slave {
       pcm "PCH"
       period_time 0
       period_size 2048
       channels 2
    }
    bindings {
       0 0
       1 1
    }
}

pcm.HDMIDmixed {
   type dmix
   ipc_key 2048
   ipc_key_add_uid false
   ipc_perm 0666
   slave {
       pcm "HDMI"
       period_time 0
       period_size 2048
       channels 2
    }
    bindings {
       0 0
       1 1
    }
}

pcm.both {
    type route;
    slave.pcm {
        type multi;
        slaves.a.pcm "HDMIDmixed";
        slaves.b.pcm "PCHDmixed";
        slaves.a.channels 2;
        slaves.b.channels 2;
        bindings.0.slave a;
        bindings.0.channel 0;
        bindings.1.slave a;
        bindings.1.channel 1;
       
        bindings.2.slave b;
        bindings.2.channel 0;
        bindings.3.slave b;
        bindings.3.channel 1;
    }
   
    ttable.0.0 1;
    ttable.1.1 1;
   
    ttable.0.2 1; 
    ttable.1.3 1; 
}

pcm.!default {
        type  plug
        slave.pcm "both"}
        
ctl.!default {
        type  hw
        card PCH}
#

The sections pcm.PCHDmixed  and pcm.HDMIDmixed are needed to face the problem with concurrent sound from different applications. The section pcm.both defines a new PCM consisting of 4 channels, two from the PCH card and two from the HDMI card. PCM is a stereo card and, I guess, HDMI is it as well (at least the TV is it). The magic is finally done by routing the audio channels to the correct speakers (physical channels). This is done by the ttable sentence. It took me a bit long to understand the logic behind but finally I understood the syntax as follow:

ttable.speaker.channel gain

Here, the speakers are coded as: 0 = front left; 1 = front right; 2 = rear left; 3 = rear right;  4 = center; 5 = subwoofer. Meanwhile, channel is the number of the binding connected to an audio channel. Finally, gain is a factor applied to modify the loudness of the channel (0.5 -> 50%).

In between I found that ALSA stores it last parameters in the file /var/lib/alsa/asound.state (there is a link in /etc/) which is written when the computer shutdown. There is a method to temporarily remove it in this link.

I did a fast check connecting a TV and it works fine. But, I think, it still need to be tested with details.

Update: Skype reported that there is not mic available. It is needed to configure a capture channel with dmix. 

Tuesday, December 15, 2015

Asus UX305LA: Hardware

# lscpu
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                4
On-line CPU(s) list:   0-3
Thread(s) per core:    2
Core(s) per socket:    2
Socket(s):             1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 61
Model name:            Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz
Stepping:              4
CPU MHz:               799.968
CPU max MHz:           3000.0000
CPU min MHz:           500.0000
BogoMIPS:              4789.33
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              4096K

----------
# lspci 
00:00.0 Host bridge: Intel Corporation Broadwell-U Host Bridge -OPI (rev 09)
00:02.0 VGA compatible controller: Intel Corporation Broadwell-U Integrated Graphics (rev 09)
00:03.0 Audio device: Intel Corporation Broadwell-U Audio Controller (rev 09)
00:04.0 Signal processing controller: Intel Corporation Broadwell-U Camarillo Device (rev 09)
00:14.0 USB controller: Intel Corporation Wildcat Point-LP USB xHCI Controller (rev 03)
00:16.0 Communication controller: Intel Corporation Wildcat Point-LP MEI Controller #1 (rev 03)
00:1b.0 Audio device: Intel Corporation Wildcat Point-LP High Definition Audio Controller (rev 03)
00:1c.0 PCI bridge: Intel Corporation Wildcat Point-LP PCI Express Root Port #1 (rev e3)
00:1c.3 PCI bridge: Intel Corporation Wildcat Point-LP PCI Express Root Port #4 (rev e3)
00:1f.0 ISA bridge: Intel Corporation Wildcat Point-LP LPC Controller (rev 03)
00:1f.2 SATA controller: Intel Corporation Wildcat Point-LP SATA Controller [AHCI Mode] (rev 03)
00:1f.3 SMBus: Intel Corporation Wildcat Point-LP SMBus Controller (rev 03)
00:1f.6 Signal processing controller: Intel Corporation Wildcat Point-LP Thermal Management Controller (rev 03)
02:00.0 Network controller: Intel Corporation Wireless 7265 (rev 59)

----------
# lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 064e:9700 Suyin Corp. Asus Integrated Webcam
Bus 001 Device 003: ID 8087:0a2a Intel Corp. 
Bus 001 Device 002: ID 045e:07a5 Microsoft Corp. Wireless Receiver 1461C
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

----------
# lsblk 
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 238.5G  0 disk 
|-sda1   8:1    0   100M  0 part /boot/efi
|-sda2   8:2    0     8G  0 part [SWAP]
|-sda3   8:3    0    20G  0 part /
`-sda4   8:4    0 210.4G  0 part /home

----------
# free
              total        used        free      shared  buff/cache   available
Mem:        8059700      482956     6882264      234844      694480     7278928
Swap:       8388604           0     8388604

----------
# hdparm -i /dev/sda 

/dev/sda:

 Model=Micron_M600_MTFDDAV256MBF, FwRev=MA01, SerialNo=15130F491CAF
 Config={ Fixed DTR>10Mbs }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=0
 BuffType=unknown, BuffSize=unknown, MaxMultSect=16, MultSect=off
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=500118192
 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio3 pio4 
 DMA modes:  mdma0 mdma1 mdma2 
 UDMA modes: udma0 udma1 udma2 udma3 udma4 udma5 *udma6 
 AdvancedPM=yes: unknown setting WriteCache=enabled
 Drive conforms to: unknown:  ATA/ATAPI-3,4,5,6,7

 * signifies the current active mode

Saturday, March 19, 2011

Managing users and groups

To add a new user:
# useradd -m user_name

To crate a user for a daemon

This is a system account (-r), with no access to a shell.
# useradd -r -s /bin/false user_name

To set or change a user password :
# passwd user_name

To modify an user account:
# usermod [options] user_name

To delete an user:
# userdel - Delete a user account and related files
# deluser - remove a user from the system

To add an user to a secondary group (append a group to a user):
# usermod -aG group_name user_name

To show the groups that belongs a user:
This show a reduced set of groups (maybe just the secondary groups)
# groups user_name

If the user uses the command groups without a user name, it will show an extended list of groups (maybe the primaries and secondaries groups)

The command id -nG user_name has the same behavior that group.

To remove a user from a group:
it is needed write all the groups the user belongs less the unwanted groups.
# usermod -G {groupname1,groupname2,...} user_name

To add a new group:
 # groupadd group_name

To modify a group:
 # groupmod [options] group_mane

To delete a group:
# groupdel - Delete a group
# delgroup - remove a group from the system

You can edit manually the OS groups file (needs logout-login):
# vi /etc/group

Example:
In KDE with HAL: The error that appears when I pugged a USB HDD was solved adding my user to the groups users and plugdev:
# usermod -aG users my_user
# usermod -aG plugdev my_user

Sunday, December 26, 2010

Slackware 13.1+ i810

I have installed Slackware 13.1 six month ago and since that I have a problem with video. Sometimes while I'm working the screen keeps freezing, I can move the mouse and see how the pointer moves, but always the screen shows the same image. In the console I have found the following error:

(EE) intel(0): Failed to submit batch buffer, expect rendering corruption or even a frozen display: Input/output error.

I have tried a pair of times solve the problem, but never successfully. Now I'm going again, taking care of documenting everything.

My graphic card is: Intel Corporation 82852/855GM Integrated Graphics Device (rev 02)

I used to use the i810 driver from Intel, but now this driver is deprecated and replaced by Intel graphic driver that support more cards from Intel.

The configuration:

  • Kernel: 2.6.33.4-smp
  • Xorg server: 1.7.7
  • xf86-video-intel: 2.11.0

I have found these error in Xorg.0.log :

(II) LoadModule: "fbdev"
(WW) Warning, couldn't open module fbdev
(II) UnloadModule: "fbdev"
(EE) Failed to load module "fbdev" (module does not exist, 0)

I have used xorgsetup to create a xorg.conf file, after that I have not seen the error again. But glxgears goes very slow yet, and possibly the video will fail again.

Listing just directories with "ls"

Basic but not so obvious for me:
For listing only the directories in, for example, /dev:

$ ls -d /dev/*/
/dev/block/ /dev/bsg/ /dev/bus/ /dev/char/ /dev/disk/ /dev/dri/ /dev/fd/ /dev/input/ /dev/mapper/ /dev/pts/ /dev/shm/ /dev/snd/

$ ls -adl /dev/*/
drwxr-xr-x 2 root root 720 2010-12-26 11:41 /dev/block/
drwxr-xr-x 2 root root 140 2010-12-26 11:41 /dev/bsg/
drwxr-xr-x 3 root root 60 2010-12-26 08:31 /dev/bus/
drwxr-xr-x 2 root root 4660 2010-12-26 11:41 /dev/char/
drwxr-xr-x 6 root root 120 2010-12-26 11:41 /dev/disk/
drwxr-xr-x 2 root root 80 2010-12-26 08:31 /dev/dri/
dr-x------ 2 felipe felipe 0 2010-12-26 12:21 /dev/fd/
drwxr-xr-x 3 root root 260 2010-12-26 08:31 /dev/input/
drwxr-xr-x 2 root root 60 2010-12-26 08:31 /dev/mapper/
drwxr-xr-x 2 root root 0 2010-12-26 08:31 /dev/pts/
drwxrwxrwt 2 root root 40 2010-12-26 11:31 /dev/shm/
drwxr-xr-x 3 root root 240 2010-12-26 11:32 /dev/snd/

$ ls -adl /dev/*/*/
drwxr-xr-x 6 root root 120 2010-12-26 08:31 /dev/bus/usb/
drwxr-xr-x 2 root root 300 2010-12-26 11:41 /dev/disk/by-id/
drwxr-xr-x 2 root root 80 2010-12-26 11:41 /dev/disk/by-label/
drwxr-xr-x 2 root root 220 2010-12-26 11:41 /dev/disk/by-path/
drwxr-xr-x 2 root root 120 2010-12-26 11:41 /dev/disk/by-uuid/
drwxr-xr-x 2 root root 100 2010-12-26 08:31 /dev/input/by-path/
drwxr-xr-x 2 root root 60 2010-12-26 08:31 /dev/snd/by-path/

For listing the current directory: ls -d */

Saturday, December 25, 2010

WD My Passport for Mac on Slackware and formatted in NTFS

Ok, yes, this problem was a little weird, but some reasons I have bought an external USB HD for Mac and I want to use it with my Slackware 13.1 machine.
So step by step the problems I had to use it was:
  1. When I plug the disk on my PC appears two devices in /dev :
    1. /dev/sdb1 : hfsplus filesystem; this is the disk I want use.
    2. /dev/sr1 : udf filesystem; this is other small disk, about 600MB, that I don't care by now.
  2. The HD that was formatted for Mac (/dev/sdb1), it use HFS+ filesystem. I want use the disk on Linux and Windows so I need a NTFS filesystem disk. I have used fdisk to change the filesystem of sdb1 to NTFS and then I have formatted it with mkfs.ntfs -f -L Disk_label /dev/sdb1
  3. When I have mounted sdb1 I had no access to the data stored in the disk, but if I did it on windows it works fine, so the problem was the way that is was mounted. I had installed NTFS-3g and the problem was solved with:
    mount -t ntfs-3g /dev/sdb1 /media/hd
    By this way, now I have complete access to the disk, but I have to mount it manually and as root.
  4. On /etc/fstab I had the row:
    /dev/sdb1 /media/memory0 auto noauto,user,exec,rw 0 0
    When the disk was mounted it is did it using the native NTFS filesystem instead of NTFS-3g. I have changed it by:
    /dev/sdb1 /media/memory0 ntfs-3g defaults 0 0
    With it I can mount the drive with mount /dev/sdb1 but just as root. I suppose that with this change I could have problems with volumes with other filesystems (FAT32 for example) linked to the same device (/dev/sdb1). But this is another problem that don't care by now.
Nothing that I have searched and tried have helped.
  1. I have created the file /etc/filesystems like a copy of /proc/filesystem but changing the line ntfs by ntfs-3g, but doesn't work.
  2. From the FAQ of NTFS-3g I have found something that should have help me but it didn't. http://www.tuxera.com/community/ntfs-3g-faq/#unprivileged
  3. Another page referring to the FAQ but with more information. http://pxnh.wordpress.com/ (at the end of the page).
  4. I have changed the group of ntfs-3g to plugdev but doesn't work.
So much time I have gave it to that little problem, so I'm thinking in changing the HDD filesystem to EXT3 or 4.
Finally I have formatted the HDD with EXT4 supposing that it would resolve the problem. But when I have mounted the HDD, I didn't have access to write in it. I have deleted from /etc/fstab the line that define /dev/sdb1 and after mounting the drive for first time, as root, I have changed the owner and permissions to my user and 760. Now the drive is mounted automatically in KDE using HAL. A dirty solution but is ok by now.

The error that appears when I pugged a USB HDD was solved adding my user to the groups users and plugdev and restarting the computer:
# usermod -aG users my_user
# usermod -aG plugdev my_user

Sunday, March 23, 2008

Synaptics Touchpad + USB mouse

La compilación del driver Synaptics no dió especial problema, sin embargo X no partía pues decía que no encontraba un touchpad Syptics instalado. La solución pasó por editar el archivo /etc/rc.d/rc.modules-2.6.21.5-smp en la sección "PS/2 mouse support" se eliminó la opción "proto=imps" que trae por omición Slackware. Con ello todo funcionó bien. En la configuración de xorg se agregó un mouse USB, uso un MS IntelliMouse Optical 1.1, funciona pero no he probado si se pueden usar los 5 botones, por lo menos los tres tradicionales y la rueda funcionan bien.

El xorg.conf además considera la configuración para el monitor LCD y la salida de Svideo, al iniciar X veo que esto da algunos errores pero se ejecuta de todas maneras. No he probado la salida de Svideo, esto lo solucionaré más adelante. También veo que puede haber un problema con el teclado pues sale un error, pero esto no se nota al momento de usarlo. En resumen, esta configuración funciona, sucio pero funciona.

Slackbuid : synaptics.SlackBuild

xorg.conf : xorg.conf

Wednesday, March 05, 2008

Configurar Lilo y framebuffer

La configuración de lilo se hace en /etc/lilo.conf, en él cambié la posición de la sección Linux para arriba de la sección refente a windows, cambié el timeout desde 2 minutos a 10 segundos.
También cambié la cadena de texto que describe a cada SO en el archivo /boot/boot_messaje.txt nuevo texto:
Slackware 12
Windows XP

El framebuffer se eligió con las siguiente sentencia:
## VESA framebuffer console @ 1024x768x256
vga = 773

Para acelerar la partida agregué la siguiente palabra en la primera línea de /etc/lilo.conf:
compact

una vez terminado eso, ejecutar la aplicación lilo

Configurando tarjeta wifi

Este computador tiene la clásica tarjeta ipw2200, los drivers están instalados pero no se por que no está el firmware en su lugar, para instalarlos bajé la versión 3 del firmware desde el sitio del proyecto ipw2200, luego de descomprimir el archivo copié su contenido a la carpeta donde deben ir:
# cp ipw2200-bss.fw /lib/firmware
# cp ipw2200-ibss.fw /lib/firmware
# cp ipw2200-sniffer.fw /lib/firmware

Luego crear el archivo para dar parámetros al módulo cuando sea cargado, esto es, crear un archivo de texto /etc/modprobe.d/ipw2200 y escribir en su interior:
options ipw2200 led=1
Con ello se activará el led que indica el estado de la tarjeta wifi.

- Modifiqué el archivo /etc/rc.d/rc.inet1.conf en las siguientes lineas (se agregó "yes"):
USE_DHCP[0]="yes"
USE_DHCP[1]="yes"

- Se modificó el archivo /etc/rc.d/wireless.conf para la red wifi local que corresponde.
- Luego me cambié de casa y ahora la red wifi está encriptada con WPA. Para conectarse a la red se debe :
- Modificar el archivo /etc/wpa_supplicant.conf y poner los datos que corresponden a la red.
- ejecutar los comandos:
# wpa_supplicant -i eth1 -c /etc/wpa_supplicant.conf -B
# dhcpcd eth1

con ello se configura la tarjeta inalámbrica (eth1) para encriptación WPA.

Para que al iniciar el computador se conecte a al red WPA especificada en wpa_supplicant.conf editar el archivo /etc/rc.d/rc.inet1.conf y agregar esto en la sección de la tarjeta de red que corresponda, en este caso eth1.

WLAN_WPA[1]="wpa_supplicant"

Según leí hay otras opciones que se pueden agregar, pero cuando probé especificando el driver el computador no se pudo conectar a la red.

Primer boteo

- El teclado es qwerty/la-latin1.map
- El sonido está silenciado por omisión, para subir el volumen usar alsamixer y luego guardar configuración con alsactl.
- Crear un usuario para evitar usar al cuenta root:
# useradd -m felipe
# passwd felipe

El Hardware

La máquina destino a la que se refiere este sitio es un Laptop HP Pavilion dv1117la. El resultado de un lspci se agrega al final del post.

Todos los archivos de configuración y los slackbuilds que he usado están en:
http://alumnos.elo.utfsm.cl/~fperona/Linux/slackware/12.0/


Resultado de lspci:
00:00.0 Host bridge: Intel Corporation 82852/82855 GM/GME/PM/GMV Processor to I/O Controller (rev 02)
00:00.1 System peripheral: Intel Corporation 82852/82855 GM/GME/PM/GMV Processor to I/O Controller (rev 02)
00:00.3 System peripheral: Intel Corporation 82852/82855 GM/GME/PM/GMV Processor to I/O Controller (rev 02)
00:02.0 VGA compatible controller: Intel Corporation 82852/855GM Integrated Graphics Device (rev 02)
00:02.1 Display controller: Intel Corporation 82852/855GM Integrated Graphics Device (rev 02)
00:1d.0 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #1 (rev 03)
00:1d.1 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #2 (rev 03)
00:1d.2 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #3 (rev 03)
00:1d.7 USB Controller: Intel Corporation 82801DB/DBM (ICH4/ICH4-M) USB2 EHCI Controller (rev 03)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 83)
00:1f.0 ISA bridge: Intel Corporation 82801DBM (ICH4-M) LPC Interface Bridge (rev 03)
00:1f.1 IDE interface: Intel Corporation 82801DBM (ICH4-M) IDE Controller (rev 03)
00:1f.3 SMBus: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) SMBus Controller (rev 03)
00:1f.5 Multimedia audio controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller (rev 03)
00:1f.6 Modem: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Modem Controller (rev 03)
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
02:06.0 Network controller: Intel Corporation PRO/Wireless 2200BG Network Connection (rev 05)
02:09.0 CardBus bridge: Texas Instruments PCIxx21/x515 Cardbus Controller
02:09.2 FireWire (IEEE 1394): Texas Instruments OHCI Compliant IEEE 1394 Host Controller
02:09.3 Mass storage controller: Texas Instruments PCIxx21 Integrated FlashMedia Controller
02:09.4 Generic system peripheral [0805]: Texas Instruments PCI6411/6421/6611/6621/7411/7421/7611/7621 Secure Digital Controller

Poco duró Gentoo

Luego de dedicarle un tiempo a Gentoo, actualizarlo e instalar algunos programas, me decidí a volver a Slackware, ¿por qué?. Pues simplemente porque me dí cuenta que debía dedicarle mucho tiempo para sentirme cómodo utilizándolo. Unas de las cosas que me llevó a probarlo fue que se supone que es fácil de actualizar y de instalar nuevos programas y que la instalación compila cada programa en en computador destino. Bueno tuve algunos problemas para instalar algunos programas y no supe resolverlos rápidamente, para hacerlo tuve que dedicar más tiempo del que quería. Entonces pensé que si me siento cómodo con Slackware mejor dedicar tiempo a seguir conociéndolo. La idea es que ahora la instalación sea más limpia que la vez anterior y por lo mismo usaré este espacio para dejar manifiesto de los pasos que he seguido durante la configuración posterior a la instalación.

Sunday, February 03, 2008

Ahora la cosa es con Gentoo

Me tenía prometido que una vez terminara mi memoria debía borrar el disco duro de mi computador e instalar el sistema operativo de nuevo, originalmente no quería poner windows, pero por motivos de trabajo no me quedó más que usarlo. La promesa involucraba además que debía probar la distribución Gentoo pues, según algunos dicen, el hecho que compile todo hace que la maquina ande más rápido y mejor. Bueno ya tengo Gentoo andando a medias, claro, no le he dedicado mucho tiempo. El famoso Gentoo aún no me convence pero seguiré probándolo hasta que me aburra, hasta ahora lo destacable es el programa emerge que permite instalar programas en forma prácticamente automática, pero me ha dado algunos problemas con dependencias.

Friday, July 13, 2007

SSH Tunneling

Si el problema es el siguiente: La universidad da acceso a algunos recursos web sólo desde un computador interno. Por ejemplo acceso a alguna intranet.

El problema se puede solucionar si es que tienes acceso a un servidor ssh dentro de la universidad y conoces el servidor donde se encuentra el recurso buscado.

La solución se llama ssh tunneling y se implementa con una conexión ssh, pero con una opción especial, es la siguiente (todo en una línea):

ssh -l usuario -L puerto_local:servidor_del_recurso:puerto_del_recurso servidor_ssh

donde:
puerto_local es por donde saldrá el requerimiento
servidor_del_recurso es el nombre o dirección del recurso
puerto_del_recurso es el puerto por donde el servidor_del_recurso espera el requerimiento
servidor_ssh la dirección al servidor ssh que hace de intermedio (túnel)
usuario la cuenta con la que se accederá al servidor_ssh

cuidado con el puerto_local, si es menor que 1024 la sesión ssh debe ser realizado como usuario root, sólo si es mayor que ese número puede hacerla un usuario normal. si no hay acceso de root entonces se debe configurar el programa local para acceder al recurso de modo que salga por un puerto distinto.

por ejemplo:
Supongamos que la universidad tiene convenio con sitio de publicación de artículos y usted quiere buscar desde su casa uno a través de la página web del sitio, supongamos que el sitio se llama eiii.org, que usted tiene una cuenta de nombre mimismo en un servidor ssh cuya dirección es bolson.ucm.edu que se encuentra dentro de la universidad y por lo tanto tiene acceso al recurso. Entonces el comando sería:

ssh -l mimismo -L 1080:eiii.org:80 bolson.ucm.edu

En su navegador debe configurar el servidor proxi para HTTP como 127.0.0.1 y en el puerto 1080. mientras mantenga la sesión ssh abierta podrá acceder a la página de eiii.org y no al resto de internet, a menos que lo haga usando otro navegador.