ubuntu on a laptop: auto-start networks on wake-up? (incl order)

When I suspend my laptop, it will try and restart a network connection when it wakes up from a suspend.

But it will only retry LAN + Wifi.

Is there a way to tell the network manager to – first try whether I have an ethernet connection – if not, then second – try the known wifi network SSIDs – finally, if that doesn’t work, bring up a (4G) modem connection…

The first two it seems to do by itself – but can I configure an auto-fallback to 4G, if the other two don’t come up?

(individually LAN, WIFI and 4G connections work — so this is purely, how can I configure an order which also tries to start 4G if LAN/WIFI can’t be found)

PCManFM 1.2.5 in Lubuntu 18.04 – custom command to batch rename all files in dir incl. subdir to subdir001, 002,

PCManFM 1.2.5 in Lubuntu 18.04 here.

want to add a custom command to right click menu to batch rename all files in the selected dir, including all files in all subdirs, to subdir001, subdir002, …

For example, if a directory x has subdirs abc and def containing files a1.mp3, a2.mp3, a3.mp3 each, I want the files in abc to be renamed abc001.mp3, abc002.mp3, abc003.mp3, in the same order. Same for the def dir, except to def001.mp3, etc…

How do I do this? I was searching for solutions, but they all seem to be PCManFM version dependent.

Build Platform SDK for Windows (incl. adb) with debug information

I’m suffering from How do I get my Nexus 7 to show up in the adb devices list? and since the phone’s “debug interface” device is present in Windows’ Device Manager, I decided to run adb under debugger to see firsthand why it ignores it.


Using information from Set up for Android Development | Android Open Source Project and docs/howto_build_SDK.txt – platform/sdk – Git at Google, I cross-compiled a Windows version of Platform SDK with the following sequence:

# VM: Ubuntu 18.04.2 LTS (Bionic) x64 Desktop minimal installation # 16GiB RAM, 330GiB HDD, 28GiB swap, 6 cores  sudo apt-get install -y <long list as per https://source.android.com/setup/build/initializing> mkdir ~/.local/bin; echo 'export PATH="~/.local/bin:$  PATH"' >>~/.bashrc; exec bash curl https://storage.googleapis.com/git-repo-downloads/repo > ~/.local/bin/repo; chmod a+x ~/.local/bin/repo sudo apt install python -y   #needed for `repo` repo init -u https://android.googlesource.com/platform/manifest -b android-9.0.0_r42   #latest release branch at the time of trying repo sync echo 'export MAKEFLAGS="-j$  (nproc)"' >>~/.bashrc; exec bash . ./build/envsetup.sh lunch sdk-userdebug sudo apt install tofrodos -y m make sdk make win_sdk 

However, the resulting binaries have no debug information despite userdebug. While the Linux version does:

$   objdump -g out/host/windows/sdk/sdk/android-sdk_eng.vmuser_windows/platform-tools/adb.exe  adb.exe:     file format pei-i386  $   objdump -g out/host/linux-x86/sdk/sdk/android-sdk_eng.vmuser_linux-x86/platform-tools/adb  Contents of the .eh_frame section: <etc, lots of output> 

The lunch command and the followind build commands print the following configuration banner. I suspect that TARGET_BUILD_TYPE=release may be the cause for no debug info but don’t see from the above docs how to switch it.

============================================ PLATFORM_VERSION_CODENAME=REL PLATFORM_VERSION=9 TARGET_PRODUCT=sdk TARGET_BUILD_VARIANT=userdebug TARGET_BUILD_TYPE=release TARGET_ARCH=arm TARGET_ARCH_VARIANT=armv7-a-neon TARGET_CPU_VARIANT=generic HOST_ARCH=x86_64 HOST_2ND_ARCH=x86 HOST_OS=linux HOST_OS_EXTRA=Linux-4.18.0-22-generic-x86_64-Ubuntu-18.04.2-LTS HOST_CROSS_OS=windows HOST_CROSS_ARCH=x86 HOST_CROSS_2ND_ARCH=x86_64 HOST_BUILD_TYPE=release BUILD_ID=PD2A.190115.032 OUT_DIR=out ============================================ 

AFAICS, AdbWinApi.dll and AdbWinUsbApi.dll are not built during the above process, precompiled binaries are used instead. Fortunately, I found .pdb files for them at https://github.com/aosp-mirror/platform_development/tree/master/host/windows/prebuilt/usb.


So the question is:

  • How to build Android Platform SDK for Windows with debug information?

A side question is:

  • What format is that debug information going to be in? (This would dictate possible choices for a Windows debugger)

Duplicating a chrome user (incl. bookmarks, passwords etc)

I sometimes need to open the same sites on different sessions for testing purposes. Until now I did it with an incognito window, but I’d prefer if it was through a different chrome user, which is more dynamic and comfortable.

Is it any way to duplicate an existing user with all of its data? I tried a brute force approach of creating a new profile and copying all the contents from the first one, but obviously, that didn’t work (I guess because the data is unique in some manner)

Thanks for your answers!

What photo editing software will keep tags (incl. face/people tags) with the file (EXIF/XMP)?

I am evaluating Photoshop Elements and Lightroom for my photos. I store my photos in the cloud (currently OneDrive) and on a website (currently SmugMug). At the end of every year I like to go through the photos for the year on my laptop, organize the photos into folders, and add metadata to my photos including a description, tags, and face tags. After I am done I put them up on the cloud and they will no longer be on my laptop. I am looking for software that will make it quicker for me to add metadata to my photos than my old approach (Windows Live Photo Gallery) and will allow for the workflow defined above.

I desperately want the software I use to store all metadata within the JPG file itself. This is what EXIF is for! I realize that face tags are not part of the EXIF standard, but understand that face tagging is part of Adobe’s XMP “standard” (Is there an EXIF standard for tagging people in photographs?). I want all of my photos to be portable to whatever location I choose so that I am not bound to any storage service or image editor.

I see that Photoshop Elements by default stores the user added notes/description to the file, but does not by store much of the metadata in the EXIF properties such as title/caption, tags, or face tags. However, I did discover that the “File > Save Metadata to File” menu option does save title/caption and regular tags. However, face tags are still missing. Does anyone know how I store face tags to the image file with Photoshop Elements? If not Elements, would Lightroom or some other software do this for me?

I see that Picasa (which I once tried and stopped using for this same reason) now may have the ability to export metadata: How can you write/convert Picasa's People tags to the EXIF data?. I’d like to stay with Elements or Lightroom (I’m undergoing a trial of both right now), but this problem needs to be solved or I won’t use them.