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

Friday, September 22, 2023

How to Mirror the Screen of an Android Smartphone to a Linux PC

  1. On the smartphone, set developer options on
  2. On the Linux PC, install  scrcpy (sudo snap install scrcpy on Ubuntu)
  3. Connect the smartphone to the PC via a USB cable then open a terminal session on the PC and type scrcpy

Tuesday, August 10, 2010

How to get Huawei E1750 USB modem working on Ubuntu Lucid

Some times ago I installed Ubuntu 10.4 LTS (aka Lucid) on my laptop. At that point I wasn't sure whether my Huawei E1750 USB modem were recognized or not by the new OS, so I plugged it into a USB port. The result was the USB modem was recognized as a mere USB drive, so no internet connection could be established.
In order to solve this problem, I discovered that I needed to install a package named "usb-modeswitch".
As the documentation says, several new USB devices have their proprietary Windows drivers onboard, especially WAN dongles. When plugged in for the first time, they act like a flash storage and start installing the driver from there. If the driver is already installed, the storage device vanishes and a new device, such as an USB modem, shows up. This is called the "ZeroCD" feature.
On Debian, this is not needed, since the driver is included as a Linux kernel module, such as "usbserial". However, the device still shows up as "usb-storage" by default. usb-modeswitch solves that issue by sending the command which actually performs the switching of the device from "usb-storage" to "usbserial".
Also I discovered that before installing "usb-modeswitch" the package "usb-modeswitch-data" must be installed.
I then downloaded these two packages using a Windows machine with a working internet connection. The URL I used were:
Using a USB storage key I moved the downloaded packages on the Ubuntu machine.
Then I installed them using the following terminal commands:
    sudo dpkg -i usb-modeswitch-data.deb
    sudo dpkg -i usb-modeswitch.deb
I restarted Ubuntu, connected the USB modem and now it was perfectly recognized. As a proof for this I noticed that Ubuntu's network menu (located top right) showed a new item, Mobile Broadband, with the option to connect to a mobile network.
Please note that this solution is working not only for Huawei E1750 USB modem but also for many other devices, as specified here.

Sunday, November 23, 2008

When a good antivirus turns into a terrible virus

Some nights ago I was involved in an unexpected adventure: back at home after a day of work, I turned on my Windows XP laptop and after logging in I was alerted by AVG antivirus 8 Free edition that the file "user32.dll" contained a troian.

Although quite surprised, I didn't hesitate a moment and let my antivirus move the infected file into its vault.

It was a really bad move, because, after restarting, I wasn't able to start Windows XP anymore: a blue screen of death appeared regularly shortly after each restart and the computer booted up again coming at the blue screen of death and then restarting again.

I fought against this problem for about one hour, trying to find a way to get my "user32.dll" back in the right place. Finally, I came up with a solution: I booted from a Linux-live distro, then I copied the user32.dll under system32\dllcache into system32.

Now, thanks to Linux my Windows XP is back again. It's frightening to think that a good antivirus - as I consider AVG - turned suddenly into a terrible virus. For more information, check this out.

BTW during my Linux session I noticed Firefox is about 1.5x faster than the same version under Windows. I'm asking myself why I'm still using Windows...