Friday, September 9, 2022

OneDrive for Linux

OneDrive for Linux


Dell Precision 5550: Mouse drag lock bug

 

Dell Precision 5550: Mouse drag lock bug

Works on generic Ubuntu 20.04.

Open a terminal and type xinput for a list of devices. Then xinput disable <id> the ELANxx device.

$ xinput disable 15

Swipe gently on the screen and then reenable touchscreen

$ xinput enable 15

Repeat if necessary.

[post #47 on https://bugs.launchpad.net/ubuntu/+source/rapidsvn/+bug/402892]

Linux: How to list group members

The follwing group and user operations are usefull in linux

Add users

To add a user to Linux

$ sudo adduser username

List users

To list users in Linux

$ less /etc/passwd

To serch for users/a user

$ more /etc/passwd | grep username

List members in group

To list the members of a group in Linux

$ getent group groupname

Add user to group

To add a user to a group in Linux

$ sudo usermod -aG group usernamename

Sunday, August 21, 2022

How to reset Oneplace satellite box

How to reset Oneplace satellite box 

(Allente / Canal  Digital)

To reset the Oneplace Android Satelite box do the following:

  • Pull the power from the Box for 30 seconds.
  • Plug the power back in while pressing the "left" rapidly (more than 2 times per second), and wait for the boot up process to boot into á "bios"-like state.
  • Press "2" to reset / reload presets. The screen will display a splash status message indicating work in progress. When done it will read succes near the bottom left of the screen.
  • Recycle the power and the box should boot normally as new.

Friday, April 5, 2013

Remember to remove the GPS data from your images

Many smartphones and cameras today also contain a GPS module, which enables the devices to store the GPS position of the site/location where the picture was taken, inside the picture itself, inside the EXIF data.
This information is then public to everyone when you upload the pictures to the evil www....
Therefore remember to remove the GPS data before uploading image file.
A tool for this is here: www.digitalconfidence.com/downloads.html

Friday, December 28, 2012

NSLU2: How to change the hard drive

To migrate the hard drive of your NSLU2 to a new one perform the two follwing steps:
Step 1: Copy the content of the hard disk to a new hard disk.
Step 2: Expand the partition to fill all the available space on the the new hard disk.


Step 1: Copy the content of the hard disk to a new hard disk.

 (in part from http://linuxcommando.blogspot.com/2008/06/show-progress-during-dd-copy.html )

Copy the content of disk 1 (mounted on /dev/sdb) to disk 2 (mounted on /dev/sdc ) (if adjust sdb, sdc, sdd, etc acording to your own configuration, you might use gparted to check the names). Block size below is 1M (1 mb):
$ dd if=/dev/sdb of=/dev/sdc bs=1M  

Follow the progress forof the process by executing the following command in an other command window:
$ kill -USR1  8789
Find the process ID by running the command (and replace 8789 acordingly):
$ pgrep -l '^dd$'
8789 dd
$

Step 2: Expand the partition to fill all the available space on the the new hard disk.

Install gparted, launch it. Expand the large partition on the disk to fill to take advantage of all the available space.Move the other partitions acordingly. Do not delete og shrink any othe the other partitions.

Tuesday, December 25, 2012

Suspend Ubuntu 12.04 LTS on Asus U32U

Do the following
(all instructions from: http://thecodecentral.com/2011/01/18/fix-ubuntu-10-10-suspendhibernate-not-working-bug):

Step 1

Create a script under /etc/pm/sleep.d/. It can be any name, but to ensure the load order, use the prefix 20_.
gksudo gedit /etc/pm/sleep.d/20_custom-ehci_hcd 

#or the way you would normally do when creating a file as superuser  
 

Step 2

Note that if you use the code from "Step 2 Old" below, please skip this step. This script is contributed by commenter Danne.
Insert the following code into the file you have just created:

#!/bin/sh
#inspired by http://art.ubuntuforums.org/showpost.php?p=9744970&postcount=19
#...and http://thecodecentral.com/2011/01/18/fix-ubuntu-10-10-suspendhibernate-not-working-bug    
# tidied by tqzzaa :)

VERSION=1.1
DEV_LIST=/tmp/usb-dev-list
DRIVERS_DIR=/sys/bus/pci/drivers
DRIVERS="ehci xhci" # ehci_hcd, xhci_hcd
HEX="[[:xdigit:]]"
MAX_BIND_ATTEMPTS=2
BIND_WAIT=0.1

unbindDev() {
  echo -n > $DEV_LIST 2>/dev/null
  for driver in $DRIVERS; do
    DDIR=$DRIVERS_DIR/${driver}_hcd
    for dev in `ls $DDIR 2>/dev/null | egrep "^$HEX+:$HEX+:$HEX"`; do
      echo -n "$dev" > $DDIR/unbind
      echo "$driver $dev" >> $DEV_LIST
    done
  done
}

bindDev() {
  if [ -s $DEV_LIST ]; then
    while read driver dev; do
      DDIR=$DRIVERS_DIR/${driver}_hcd
      while [ $((MAX_BIND_ATTEMPTS)) -gt 0 ]; do
          echo -n "$dev" > $DDIR/bind
          if [ ! -L "$DDIR/$dev" ]; then
            sleep $BIND_WAIT
          else
            break
          fi
          MAX_BIND_ATTEMPTS=$((MAX_BIND_ATTEMPTS-1))
      done  
    done < $DEV_LIST
  fi
  rm $DEV_LIST 2>/dev/null
}

case "$1" in
  hibernate|suspend) unbindDev;;
  resume|thaw)       bindDev;;
esac

Step 3

Add executable permission:
sudo chmod 755 /etc/pm/sleep.d/20_custom-ehci_hcd

Result

Your suspend should be now working as expected. Suggestions on improving this script are welcome.

Thursday, April 7, 2011

Linux on Windows: CYGWIN

In order to setup a working linux environment on Windows try Cygwin. Cygwin is a implementation of a range of linux functions/functionality for Windows.

  1. Go to www.cygwin.com and download the setup file.
  2. Run the file by double click and choose "install from internet".
  3. When prompted I prefer to install Cygwin to "Program Files", which although warned about does not seem to give problems.
  4. When prompted for choosing packages choose:
    • Editors
      • emacs
      • mc
    • Net
      • openssh
      • rsync
  5. Finish the installation. 
  6. Run (double click) the shortcut on the desktop. It will create your home folder in the appropriate location (in this case (english WinXP) "C:\Program Files\cygwin\home\you").
  7. In the Cygwin window run "ssh" which will create the ".ssh" folder in your home folder.

Friday, February 11, 2011

Cygwin: Setting up a trusted ssh-relationship

If you are frequently connecting via ssh to the same server or if you are using rsync to backup your files as will be described in a later guide, you might want to set up a trusted relationship between your local computer and the remote server.

Start by generating a private/public key set.
Run the following command:
$ ssh-keygen -t rsa

Now go to your local .ssh folder.
Then download the "authorized_keys" file from the server
scp user@server.com:/home/user/.ssh/authorized_keys .
then make a backup copy of the file:
$ cp authorized_keys authorized_keys.backup
now merge public key id_rsa.pub into the authorized_keys file
$ cat authorized_keys id_rsa.pub
and upload the authorized_keys file to the server
$ scp authorized_keys user@server.com:/home/user/.ssh

Now try and connect via ssh:
$ ssh user@server.com
It should now not prompt for password.

NSLU2: When the power supply (PSU) dies ...

Problem: My NSLU2 has stopped working. Problem pinned down to being the power supply. The following description matches very well my experience, although my power supply worked 24/7 for 3 years (the first two supplying a 2.5' disc.:

"It showed an interesting mode of failure.... after being used for about 1 year 24/7, the LED still illuminated and the unloaded votlage was 5.0V (good) but when a Slug was switched on, the voltage dropped to about 3V and the Slug could not boot. The Slug's Power LED showed faint 'pulsing' in time with USB Memory stick access attempts (difficult to see with your finger over the Power button though). The power supply was binned. "

Diagnose:
"It has been noticed that the supplied Linksys PSU appears to fail after about a year if supplying two USB powered 2.5" laptop drives from the NSLU2.Symptoms include, but not limited to hard drives not being mounted properly at boot time, although the slug will boot with no disks attached for a while until the supply dies completely." - nslu2-linux.org

My solution:
I bought a "AC Power Adapter/Charger for PSP 1000/2000/3000" from dealextreme.com. Then I exchanged the plug that the Power Adapter/Charger came with the plug from the original NSLU2 PSU. When doing this, BE CAREFUL and use a voltmeter/multimeter to make sure + and - are connected correctly. Double double check, because you might end up destroying your NSLU2 if applying a wrong voltage.

I did all this, and my slug is again running like a charm.