sent curl command from tasker? - Tasker Tips & Tricks

hi, im trying to setup tasker to send a curl command to my raspberry pi.
here is the command:
curl h t t p ://192.168.1.9/scripts/dash.py | python (not allowed to post links yet)
the dash.py is just a simple script to toggle my hue lights and mpd on/off,
it works when i send the command from my ubuntu terminal.
im dont use tasker much, but i found on google that i should use http get/post,
but i dont know how to set this up
hope someone can help me with this

Hi,
To my understanding, the pipe ('|') symbol in the command takes the output of the curl command and sends it as input to Python. So, when you execute the command on your Ubuntu terminal, it downloads the dash.py script from 192.168.1.9 (Raspberry Pi, I assume?) and executes it using Python on your Ubuntu terminal, as far as I know.
You can use Tasker's HTTP Get to download the dash.py script to your phone, and then you would need to use Scripting Layer for Android (SL4A) with Python for Android to execute the dash.py script on your phone. If the dash.py script has a lot of dependencies (Modules), this probably won't work. If the dash.py script doesn't change, you don't have to download it each time, so you can just keep the dash.py file on your phone.
However, this is not very elegant, as the script is executed on your phone each time. Alternatively, you could execute dash.py on your Raspberry Pi, possibly triggered from your phone using Tasker and AutoRemote (h t t p s://youtu.be/1F8XvdrrdIE), for example.
Anyway, here's how to download dash.py to your phone and execute it on your phone:
(This involves installing APKs from unknown sources, so that's your own risk. Make sure 'Unknown Sources' is enabled in your phone's settings.)
Keep in mind, if the dash.py script has a lot of dependencies (Modules), this probably won't work.
Download and install SL4A from h t t p s://github.com/kuri65536/sl4a/releases
Scroll to find the correct version of sl4a-r*-debug.apk for your phone (probably armv7 or arm).
If you're on Android 6.0+, revoke any permissions you don't need, but keep the Storage permission.
Download and install Python for Android from h t t p s://github.com/kuri65536/python-for-android/releases
Depending on whether dash.py is written for Python 2.* or Python 3.*, you would need PythonForAndroid-debug-r*.apk or Python3ForAndroid-debug-r*.apk, respectively.
Scroll to find it.
Launch Python for Android, and press 'Install'.
Launch SL4A. You should see a list of Python scripts. Tap one to check if it works (say_time.py for example).
Now for the Tasker part, create the following task:
Net --> HTTP Get (only necessary once if dash.py never changes)
Serverort: h t t p ://192.168.1.9
Path: /scripts/dash.py
Output File: sl4a/scripts/dash.py
Run it once, so dash.py is on your phone. (If dash.py never changes, you can disable this Action after you ran it once.)
To have the script be executed in the foreground, add this Action:
Plugin --> SL4A
Tap dash.py
To have the script be executed in the background instead, add this Action:
System --> Send Intent
(Make sure there are no spaces in any of the values.)
Action: com.googlecode.android_scripting.action.LAUNCH_BACKGROUND_SCRIPT
Extra: com.googlecode.android_scripting.extra.SCRIPT_PATH:storage/emulated/0/sl4a/scripts/dash.py
Package: com.googlecode.android_scripting
Class: com.googlecode.android_scripting.activity.ScriptingLayerServiceLauncher
Target: Service (Activity also works)
That's it! The Tasker task isn't very extensive, only one Action (Either 'Plugin --> SL4A' or 'System --> Send Intent') if dash.py only needs to be downloaded once.
I hope this is useful to you!

Related

How To Install The Android Sdk and Adb and Fastboot in Linux

!! THIS TUTORIAL IS All Linux Distros
!!START -------------------------------------- Optional
You will now install the SDK.​
!!START -------------------------------------- Installing Android SDK --------------------------------------
Installing the SDK is the easiest of all.
Download the SDK.169.9 MB [http://developer.android.com/sdk/]​
Right-click and select Extract Here.
Move the contents of the android-sdk-linux_x??-??_ directory to your desired location.If you followed Optional Installation, move the contents to your /AndroidSDK directory in the root of your filesystem.​
Close directory window.
-------------------------------------- Installing Android SDK -------------------------------------- END!!​
You will now set up your bashrc file and UDEV to recognize your HTC Device.​
!!START -------------------------------------- ADB + FASTBOOT --------------------------------------
The Android Debug Bridge (adb) is one of the tools that will help you the most when you run into flashing problems or running shell commands directly from your machine. UDEV will not recognize your G1 out of the box, but we will configure it with some rules so it can connect.
We will work with /AndroidSDK as the location of your sdk. If this is not your setup, I think you're smart enough to figure it out.
Editing .bashrc file to use tools from /AndroidSDK/tools/ directory -
Go to your home folder.Example: /home/wddglr/​
Press Control + H to view hidden files.
Look for your .bashrc file and double click to open it with gedit.
Add the following lines to the top of the file:
Code:
#AndroidDev PATH
export PATH=${PATH}:/AndroidSDK/tools
IMPORTANT NOTE​
Setting up UDEV to recognize HTC Device -
Type the following into a terminal (Applications > Accessories > Terminal):
Code:
gksudo gedit /etc/udev/rules.d/51-android.rules
Now add the following line to the blank file:
Code:
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", MODE="0666"
Click save and close.
To restart udev, open up a terminal and enter:
Code:
sudo /etc/init.d/udev restart
Setting up fastboot -
Download this fastboot binary from http://android-dls.com.130.4 KB [http://android-dls.com/files/linux/fastboot]​
Once downloaded to your desktop, right click and select Properties.
Navigate to the Permissions tab and configure the following option:Execute: [√] Allow executing file as program​
Click Close.
Move the fastboot bianary to your /AndroidSDK/tools/ directory.
Reboot.
-------------------------------------- ADB + FASTBOOT -------------------------------------- END!!​
Thank to http://forum.xda-developers.com/showthread.php?t=537508 for making this for the g1
In newer versions of Debian based systems "sudo /etc/init.d/udev restart" will not work as the command have been changed..
Instead use: "sudo restart udev"
BTW, thanks for a very useful post
In modern distros, none of this nonsense is necessary. Download and extract the SDK, use it. No udev tinkering.
In Slackware it's /etc/rc.d/rc.udev restart and probably something similar with anything using a BSD-style init.
This is nice, but like so many linux how-tos I see these days, it's really a ubuntu how-to. Anything with a "g" in front of it (gksudo, gedit) will probably only work on half of linux boxes.
how do you find out what vendor ids to use for other devices? I see the first one here http://developer.android.com/guide/developing/device.html but what about the second one?
pietro_spina said:
how do you find out what vendor ids to use for other devices? I see the first one here http://developer.android.com/guide/developing/device.html but what about the second one?
Click to expand...
Click to collapse
You very unlikely have to do this.. Which is the point of my first post in this thread. It'll most likely just work.

[IDEA] Shell Script from Nexus one: want to rsync my music dir to linux box

In short,
I want to be able to
1) have a shell script which will connect via wireless to my local linux server and sync a directory
2) call this shell script from an icon on my home screen
3) see the output in window that popped up
Is this possible?
http://digitizor.com/2010/03/24/how-to-sync-nexus-one-with-rythmbox-music-player/
Not sure if a similar method works with Amarok
To kick it off from your phone.. vnc into your machine and start the process.
btw...this is a question and should have gone to the Q/A section.
I had a set of scripts on my Zaurus pda some years ago that, when a connection to my home network was detected, would try a rsync with my rsync server. It allowed me to have a always updated backup of my data. I have to look it up, even if only to set it up as a script, without a nice interface... It looks like a nice way of backing up my photos as soon as I am on my home wifi network.
there is app called Fsync that can do that for you.
Been doing this for months. Here is how.
Install Ampache on your Linux box. www.ampache.org
Configure Ampache and make sure you password protect! Open ports on your router/firewall.
Install Amdroid or Lullaby from the Market on your Android. Both apps will connect to your ampache server. I have been using Lullaby and prefer it.
Connection over 3G has almost no delay between songs and works well in the car
Thanks to both of you guys, but...
I don't know if that is will be enough for what the OP had in mind, but I wasn't talking about music/video streaming, I was talking of configurable automatic sync of directories, so ampache doesn't help me. Also, Fsync seems to need a ftp server, and all I need is a rsync server. I don't want to go around configuring ftp shares, etc, when rsync is way more suited to keeping two (or more) directories in sync.
I found out what I used on the zaurus: zNetBackup. Now is time to look at the sources, and if android runs scripts when setting up interfaces...
ruineraz said:
In short,
I want to be able to
1) have a shell script which will connect via wireless to my local linux server and sync a directory
2) call this shell script from an icon on my home screen
3) see the output in window that popped up
Is this possible?
Click to expand...
Click to collapse
You should already have everything you need, which is just rsync on the phone and ssh on the Linux box. Just run ssh on the box, set up keys, then figure out your rsync command and run it from GScript on the phone. GScript allows you to create a shortcut to a command or script on your home screen.
I use this general ssh/scp command to recursively transfer a directory to my sdcard all the time. Should be easy to adjust for rsync.
scp -i /path/to/keyfile -P port_number -r [email protected]:/path/to/directory /sdcard
fubaya said:
You should already have everything you need, which is just rsync on the phone and ssh on the Linux box. Just run ssh on the box, set up keys, then figure out your rsync command and run it from GScript on the phone. GScript allows you to create a shortcut to a command or script on your home screen.
I use this general ssh/scp command to recursively transfer a directory to my sdcard all the time. Should be easy to adjust for rsync.
scp -i /path/to/keyfile -P port_number -r [email protected]:/path/to/directory /sdcard
Click to expand...
Click to collapse
Thanks. Just can't seem to get ssh keys set up... dunno where to put them (don't seem to be .ssh folder anywhere)
ruineraz said:
Thanks. Just can't seem to get ssh keys set up... dunno where to put them (don't seem to be .ssh folder anywhere)
Click to expand...
Click to collapse
Good point. You can put the key anywhere, but you need a .ssh directory for the known_hosts file. It should be simple on a Linux based device, but... it's not really.
There is a Cyanogen wiki page about setting up ssh using dropbear, and you can probably get rsync working in a terminal with that.
However, trying to ssh with the normal ssh binary using GScript (to launch the script from home screen) gave me "Unknown own user" errors. To fix it, I replaced the ssh binary (maybe it was a link to busybox or dropbear, I dunno) with a link to the ssh binary from Better Terminal Emulator Pro. I've been doing that through several roms over the past few months and the BTEP ssh always works flawlessly. I run this every time I install a new rom:
rm /system/xbin/ssh
ln -s /data/data/com.magicandroidapps.bettertermpro/bin/ssh /system/xbin/ssh
I checked, and BTEP creates it's own home and .ssh directories at /data/data/com.magicandroidapps.bettertermpro/home/.ssh and the ssh command uses the known_hosts file from there, so basically, BTEP might be the best way to do all this but it costs a few bucks in the market.
This inspired me to start using rsync and I did successfully get it working with the below command:
Code:
rsync -rltDv -e "ssh -l USER -i /data/dropbear/dropbear_rsa_host_key -p XXXXX" --port=XXXXX [email protected]:/home/me/test /sdcard
rltDv is used to get around an rsync bug that gives chgrp errors. The -e command specifies the ssh command to use when connecting and I had to specify the user with "-l username", -i is the key to use which can be anywhere. You don't need the ssh option "-p XXXXX" unless you use something other than 22 for ssh. The same is probably true of the rsync --port=X option, but I didn't test it.
This worked successfully with GScript which is exactly what you're wanting. Here's the only downside.. Better Terminal Emulator Pro costs a few bucks so I don't know if it's worth it to you to get it for a replacement ssh binary that works with GScript.
EDIT: it's 2am and im half asleep so i hope all this makes sense. Can clarify tomorrow if needed
Thanks for the update, just got some time to pick this back up
sent from my nexus one from the future...
http://forum.xda-developers.com/showthread.php?p=8917482&highlight=rsync#post8917482

Setting up USB Access in Ubuntu 11.10

trying to start learning to dev, however I need help setting up usb access for the Bionic. Anyone care to help a newb?
ROB281 said:
trying to start learning to dev, however I need help setting up usb access for the Bionic. Anyone care to help a newb?
Click to expand...
Click to collapse
these should help you out
http://forum.xda-developers.com/showthread.php?p=19446284#post19446284
how-to-get-adb-to-work-on-ubuntu
1. Make sure you have the Android SDK for Linux installed with the package for Platform Tools. Take your SDK folder and move it to your home folder, so that for example to navigate to my SDK folder I type: cd /home/miles/android-sdk-linux/
2. Edit your environment path variable. Everyone uses a more complicated way but I change my Linux distribution quite regularly, almost all based off of Ubuntu, and this is a very easy way that I figured out how to do it. Open up a Terminal and type:
sudo gedit /etc/environment
you will be prompted for your password, then a document will open. you can at the end of the text, inside the last quotation mark, type :/home/username/android-sdk-linux/platform-tools:/home/username/android-sdk-linux/tools mine looks like this::
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/brandon/android-sdk-linux/platform-tools:/home/brandon/android-sdk-linux/tools" then save it and exit the word processor
3. Now you have to set up your computer so that it recognizes the Android device through ADB. To do this, type this exactly: sudo gedit /etc/udev/rules.d/51-android.rules
A blank file should open up for you. Assuming you are using a Bionic, copy and paste this, SUBSYSTEM=="usb", ATTR{idVendor}=="22B8", MODE="0666", GROUP="plugdev"
if you are using or will be using any other device go to the link below this text for developer.android.com and scroll down to the manufacturer of your device and take the 4 characters and put them where 22B8 is above. I have various devices and my girl has a droid and my dad so I go ahead and set it up to work with all. All you have to do to set up the file for multiple devices is copy and paste the text above on separate lines for each manufacturer you will be developing for, and replace the value following {idVendor} with the respective value for that Manufacturer. For example HTC would be "0BB4". After you have this file setup, you don't need to type anything else, just save it and exit. Then in the terminal type: sudo restart udev
Link for ADB vendor ID's
http://developer.android.com/guide/developing/device.html
4. Make sure your android device has Debugging enabled. To do this go to Settings > Applications > Development and make sure the box for debugging is checked. After this, plug your phone up to the computer and type: adb devices
If you get an error with the command, just restart your computer and it should then work, that just means that your path environment hadn't taken its new effect. and if it still doesn't recognize adb as a command from the terminal, open up that /etc/environment file and make sure the pathname to your android-sdk platform tools is entered correctly.
This is what I do every time I have to set my computer up for development on my device. Also you should check out the Android Source pages at http://source.android.com/

[Instructions] Minimal Arch Linux UEFI 64 bit

Minimal Arch Linux installation instructions​
NOTICE: I am not responsible if something happens with your device, proceed at your own risk. It is always recommended to follow Arch's own installation guide, even though these instructions below are from it already just more simplified.​
Welcome to my post about installing Arch Linux on UEFI 64bit systems. These instructions were first tested in VMs, and then I installed it on my main system. Both were successful. Please follow the instructions very correctly, and don't miss anything. If there is an error, don't panic, do these instead:
Check if you typed the command correctly, if you didn't, no need to panic further. Just type it again.
Search online about the error, it is possible that a solution is already there for you.
I just want to also add that, whatever happens with your device is not my responsibility. These instructions were done under UEFI 64bit systems, even in the VM there is a setting which lets you enable ‘Enable EFI (Special OSes only)’ (Oracle VM VirtualBox) and it acts as a UEFI system. I am not the one to be guiding you with other errors, so for that reason please post it in a separate place. These instructions were written by me and a friend of mine that helped with most of the things, I am a beginner as much as you are while following these instructions.
Before continuing, visit this link to install the ISO from a server, it's usually named like "archlinux-2021.03.01-x86_64.iso". Then prepare an installation medium by checking here. Once you have created a live USB for Arch Linux, shut down your PC. Plugin your USB and boot your system. While booting keep pressing F2, F10 or F12 key (depending upon your system) to go into boot settings, then choose "Boot Arch Linux (x86_64)", if that didn't work then check online to do it accordingly.
Notes before starting:
1. if you type commands and it says "you cannot perform this unless you are root" or similar, add "sudo" before the main command which then asks for your password and runs it as root.
2. In some areas characters are capitalized, if the CAPS LOCK isn't working do this combination: SHIFT+the key word. As in if I want to type the letter W capitalized, I hold SHIFT and then click W.
---
Table of Content:
I. Minimal Arch Linux Installation Instructions
A. Verifying boot mode
B. Connecting to the internet
C. Updating system clock
D. Creating the partitions
E. Formatting the partitions
F. Mounting the partitions
G. Installing the necessary system packages
H. Configuring the system
I. Applying localization
J. Setting up hostname
K. Setting up root password
L. Setting up bootloader
M. Exiting and restarting
N. Adding a non-root user
O. Setting a password for the account
P. Giving the user permissions
Q. Giving super user privileges to all the users in the wheel group
R. Installing KDE Plasma
II. Things worth looking at
III. Programs worth installing/looking at
---​
I. Minimal Arch Linux Installation Instructions​
A. Verifying boot mode​First, run this command to know if your system is UEFI based:
ls /sys/firmware/efi/efivars
If the result is empty, then don't continue. If it does have files, then it is UEFI based and you may continue.
B. Connecting to the internet​Connect to internet by following this for wireless and this for others, usually there's no need if you're doing this in a VM. The instructions on the wiki are straight forward, I don't have to write it here.
C. Updating system clock​In order to update system clock, let's start it:
timedatectl set-ntp true
Now let's list the timezones available to see if yours is here:
timedatectl list-timezones
Then let's set your timezone:
timedatectl set-timezone Zone/SubZone
instead of "Zone/SubZone" insert one from the command that we did before, for example:
timedatectl set-timezone Canada/Eastern
Now let's check if it worked:
timedatectl status
If it doesn't say the timezone you set, then do the instructions again.
D. Creating the partitions​First type this (if you want to use fdisk, check here):
cfdisk
Delete all of your current partitions until it's 1 partition that has your full storage (by choosing each partition and then do "Delete" that's at the bottom), then create 2 partitions (by choosing "New" that's at the bottom when on an empty non-labeled partition storage without any type):
- The first with size 260MiB and with the type: EFI system partition. If you already have a partition for EFI system similar to this one then there's no need to do this again.
Now go back to the second one which has the rest of your storage (not the EFI system, the one that has no type), and create ("New" at the bottom) another one:
- With size rest (as in just click enter so all of the rest storage will be set to it) and with the type: Linux x86-64 root
After creating the 2 partitions with their correct sizes and the type, write the 2 partitions by first choosing the first one then there's "Write" at the bottom of the cfdisk place, just like you did with type and creating the partitions, choose the first partition then click "Write" and then type "yes", do this for the second partition as well. And then when you write both of the partitions, do "Quit" and run this:
wipefs -a device
Here ^ instead of "device" write the partition name of the second one that we created up, which has Linux x86-64 root. For example it can look like this: /dev/sda2, so you replace that with device, for example:
wipefs -a /dev/sda2
E. Formatting the partitions​Now let’s format the partitions we created (do cfdisk back to check if sda1 is EFI and if sda2 is the root partition! If it isn't rewrite it accordingly):
For the EFI system partition:
mkfs.fat -F32 /dev/sda1
For the root partition:
mkfs.ext4 /dev/sda2
F. Mounting the partitions​Now let’s mount the partitions (do cfdisk back to check if sda1 is EFI and if sda2 is the root partition! If it isn't rewrite it accordingly):
For the EFI system partition:
mkdir /mnt/efi
mount /dev/sda1 /mnt/efi
For the root partition:
mount /dev/sda2 /mnt
G. Installing the necessary packages​These packages are for the basic functionality of Arch Linux, we still didn’t go to the KDE installation. Please take these into consideration before continuing:
1. "intel-ucode" may be replaced, I use intel processor that's why I have written that package. Check here to install according to your processor, and replace “intel-ucode” with your processor’s package.
2. "linux" can be replaced with another kernel of your choice, this is the most stable for daily usage according to Arch Linux, check here to choose the kernel of your choice, and replace the package.
3. "efibootmgr" is needed by "grub" for EFI systems, it’s necessary to have it.
4. "nano" used for text editing which we will use later on, and "networkmanager" used for connecting to wifi with typing "nmtui", but we have to enable it first then restart the pc, as we move on we will enable it.
After choosing the packages that you will replace, if you will any, type this and replace the packages accordingly (if you have to replace some, feel free to add more but make sure you know how to use the package!):
pacstrap /mnt base base-devel linux linux-firmware nano intel-ucode grub efibootmgr networkmanager
H. Configuring the system​Since we installed the necessary packages, now we will configure the system. Run these commands separately:
genfstab -U /mnt >> /mnt/etc/fstab
arch-chroot /mnt
Note for the next command: change “Zone/SubZone” according to what you put in C
ln -sf /usr/share/zoneinfo/Zone/SubZone /etc/localtime
hwclock --systohc
I. Applying localization​Now we will apply localization, follow these commands:
nano /etc/locale.gen
After running the command above, uncomment "en_US.UTF-8 UTF-8" OR the language of your choice.
Save the file and then run:
locale-gen
Now let’s create the configuration file:
nano /etc/locale.conf
Type this in the file: LANG=en_US.UTF-8
OR replace "en_US.UTF-8" with the language you uncommented before. Save it with CTRL+S and then quit (it should be written below the shortcuts for the operations, make sure to read them)
J. Setting up hostname​Now we will setup the hostname file, type this:
nano /etc/hostname
Then type a host name of your choice in the file and save it with CTRL+S and then quit.
Now we need to setup another file before moving on, run this command:
nano /etc/hosts
And type these in the file (respect the new lines! If a line is in a separate line, don't type it next to each other):
127.0.0.1 localhost
: :1 localhost
127.0.1.1 myhostname.localdomain myhostname
Replace "myhostname" with the hostname you put in the /etc/hostname file. Then save the file and quit.
K. Setting up root password​Now let’s setup the root password, type:
passwd
And insert the password (it should prmopt up).
L. Setting up the bootloader​Now let’s setup the bootloader (GRUB), run these separately:
grub-install --target=x86_64-efi --efi-directory=/efi --bootloader-id=GRUB
grub-mkconfig -o /boot/grub/grub.cfg
M. Exiting and restarting​Exit chroot by typing "exit" and now restart by typing "reboot", the second it reboots remove the USB.
If you're in a VM type "shutdown now" and go remove the Arch Linux image from the VM settings (this is according to Oracle’s VM software) by going to the settings of your VM, then storage, then the one under "Controller: IDE", under the other tab in "Attributes" next to Optical Drive there's a CD icon, click on that and change from the ISO to your Host Drive.
​After rebooting login by typing the username as "root" and the password the one you wrote before.
N. Adding a non-root user​Now let’s add a non-root user, it’s not safe to use root as a daily usage account. Run this command and replace “user” with a username of your choice:
useradd -m user
O. Setting a password for the account​Now let’s set a password for that account, run this command and replace “user” with the username you put in N (from the previous step):
passwd user
P. Giving the user permissions​Now let’s add the user to the required groups, as in giving permissions. Run this command and replace “user” (the last word) with the username you created above (in step N):
usermod -aG wheel,audio,video,optical,storage user
For example if I created an account named “serjsx” then I run this command:
usermod -aG wheel,audio,video,optical,storage serjsx
Note: don’t be surprised if it doesn’t output anything, just move on. If something is wrong it’ll already tell you the error.
Q. Giving super user privileges to all the users in the wheel group​Now we will give the necessary privilege to the users that we create (either now or in the future, currently it’s the one we did in step N and O), run this command:
EDITOR=nano visudo
Uncomment (remove the #) the line that says:
# %wheel ALL=(ALL) ALL
Remove the # that’s at the beginning of the sentence, and now exit root account by typing “exit” and then login to your user (write the username of the account you created and then the password).
R. Installing KDE Plasma​Now let’s install KDE! KDE is one of the most popular desktop environments for Arch Linux, that's why I went with it. However, you can install any desktop environment you want after this step. Because, even without installing a desktop environment, you successfully installed Arch Linux on your system. You can check here to know about other desktop environments available for Arch Linux: https://wiki.archlinux.org/title/desktop_environment
You can check here to see my lightweight custom environment setup instructions: https://forum.xda-developers.com/t/arch-linux-lightweight-custom-environment-setup.4385985/
First, let’s enable Network Manager (nmtui) by running this command:
sudo systemctl enable NetworkManager
If it asks for your password just type it and click enter. Then type “reboot”, login, run “nmtui” and connect to your wifi.
Next, update your system by typing this command:
sudo pacman -Syu
Now let’s install the necessary packages, type these:
sudo pacman -S xorg-server plasma sddm gwenview konsole kate dolphin okular spectacle partitionmanager ark packagekit-qt5 appstream noto-fonts-emoji noto-fonts gvfs-mtp android-file-transfer android-udev
Note: there are several applications here ^ that I chose, which are: dolphin (file manager), kate (text editor), konsole (terminal), gnenview (picture viewer), okular (document viewer), spectacle (screenshot taker), paritionmanager (to manage your partitions), ark (archive extractor and other related), packagekit-qt5, noto-fonts noto-fonts-emoji (popular fonts), gvfs-mtp android-file-transfer android-udev (Android-related runtimes and software, giving you a better experience when trying to move files from your phone to your desktop) and appstream needed for Discover to install applications. You can add/remove any of these, these are just applications nothing related to the system, but make sure you install konsole or a terminal! Also you can just install kde-applications instead of the softwares I have added, kde-applications has ALL of the KDE applications (can include a lot of bloatware, but don't exclude packagekit-qt5, appstream, sddm, plasma and xorg-server!).
After the packages are installed, now let’s enable SDDM by typing:
sudo systemctl enable sddm.service
Just in case you want to check if the session is working, run this:
loginctl show-session $XDG_SESSION_ID
Type “reboot” to reboot, and after rebooting you should see SDDM login page! Type the password of your account and you should go in KDE.
This step is optional, but it is recommended because it will let you install packages from the AUR (user repisotary). We will also install yay by running these separately:
(Let’s install git in order to install yay afterwards with it)
sudo pacman -S git
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
And now, one last thing to do before you enjoy your system. Sometimes Discover won’t work, you may face an issue, so it is recommended to reinstall appstream. Run this command:
sudo pacman -S appstream
If it says no application found, do it with yay:
yay -S appstream
​
That’s it! You should now have a full working OS, running Arch Linux. This is a very important thing to do nowadays, because Microsoft is installing more and more tracking solutions within their operating systems, and you may eventually ask yourself: "Do I really have control over what happens on this operating system?"
The answer is, "No". Linux distributions give you the control and freedom that you deserve, so what you did today is a great accomplishment and a good start. I hope you can learn more about the usage of this distribution by checking their wiki from this link: https://wiki.archlinux.org/
II. Things Worth Looking At​
If you need help, go here: https://wiki.archlinux.org/title/Arch_IRC_channels​
If you need help, go here: https://bbs.archlinux.org/​
KDE: https://kde.org/​
Arch Linux's installation guide: https://wiki.archlinux.org/title/Installation_guide​
Arch Linux applications list: https://wiki.archlinux.org/title/List_of_applications​
Best practices for hardening Arch Linux: https://wiki.archlinux.org/title/Security​
Swap: https://wiki.archlinux.org/title/Swap​
Pacman: https://wiki.archlinux.org/title/pacman​
AUR: https://aur.archlinux.org/ ​
Arch Linux - Desktop Environments: https://wiki.archlinux.org/title/desktop_environment​
III. Programs Worth Installing/Looking At​
Firefox/LibreWolf: if you choose Firefox, make sure to use https://ffprofile.com/ for adjusting the settings, the default settings aren't good enough. If you use LibreWolf, they're already there.
Firefox: sudo pacman -S firefox
Librewolf: yay -S librewolf-bin
GNOME Disk Utility: this is, in most cases, better than KDE's partition manager.
sudo pacman -S gnome-disk-utility
LibreOffice: FOSS office productivity tool, this is the best one you can get for Linux distributions.
If you want stable release:
sudo pacman -S libreoffice-still
If you want the latest features:
sudo pacman -S libreoffice-fresh
Xarchiver: even though Ark is installed already, Xarchiver has a smoother experience in most cases. However, you can still use Ark, eventually they result the same thing.
sudo pacman -S xarchiver
GIMP: this is the best image editor for Linux distributions, it is recommended to have it installed just in case you need it one day. Also did I forget to mention that it's free?
sudo pacman -S gimp
Check out the tutorials as well: https://www.gimp.org/tutorials/
Kdenlive: this is the best video editor for Linux distributions, and it's free!
sudo pacman -S kdenlive
zip, unzip: these three command line tools are used for extracting and compressing to zip format.
sudo pacman -S zip unzip
Read these to know how to use them:
zip: https://man.archlinux.org/man/zip.1
unzip: https://man.archlinux.org/man/unzip.1
Have a good day! Let me know if it worked with you

[DEPRECATED] A new way to automate sending Whatsapp messages via Tasker

EDIT: This method can be considered deprecated as now there is much easier and more effective solution thanks to the great u/HunterXProgrammer from Reddit. Check it here:
https://www.reddit.com/r/tasker/comments/11wi2om
OLD SOLUTION:
For a long long time I've been searching for a way to automate sending Whatsapp messages via Tasker. The previous method with inserting text into database doesn't work with newer Whatsapp versions and so far nobody was able/willing to fix it. But now, thanks to the whatsmeow library and the undeserved kindness of u/Black616Angel from Reddit, we finally have a working solution!
ROOT IS NOT REQUIRED, although it certainly makes things much easier.
REQUIREMENTS:
(1) Tasker
(2) Termux
(3) [FOR ROOTED USERS] A file manager with root access. I recommend MiXplorer.
(4) [FOR NON-ROOTED USERS] Termux:Tasker plugin (detailed configuration description here)
(5) One free place in Whatsapp multidevice feature
(6) A second device from which you will scan the QR code
INITIAL TERMUX SETUP:
(1) Open Termux, run apt update && apt upgrade and approve all when asked
(2) Run pkg install git
(3) Run git clone https://github.com/tulir/whatsmeow (this will clone the needed repository from Github to your device)
(4) Run pkg install golang and approve all when asked (it will download necessary tools to your device, around 800 MB)
PROCEDURE FOR ROOTED USERS:
(1) Open MiXplorer and go to /data/data/com.termux/files/home/whatsmeow/mdtest directory. Select main.go file and open it as text (in MiXplorer: OPEN AS... > Text > Text Editor). Find the line no. 114 (or very close) which should contain these signs: }(). Make a new line below and paste the following text there:
args := os.Args[1:]
if len(args) > 0 {
handleCmd(strings.ToLower(args[0]), args[1:])
return
}
Save the file and exit.
(2) Go back to Termux and enter cd whatsmeow/mdtest. Run go build command. Wait for the operation to be finished.
(3) Run ./mdtest command. If all has been done correct so far, you should see a QR code. Make a screenshot of it and send it to your secondary device. Then open Whatsapp on your main device, tap three dots in the right-upper corner, select Linked devices, select LINK A DEVICE and scan the QR code from your second device. You should see a new device linked, described as whatsmeow.
[Please note that the after a short while a new QR code is generated and the previous one gets invalid, so make this operation quickly.]
Go back to Termux. Exit the whatsmeow program by selecting CTRL on the Termux panel and tapping "c" on the keyboard.
(4) Open Tasker, create a task (name it as you wish) and add Run Shell action. In the Command field put the following text:
cd /data/data/com.termux/files/home/whatsmeow/mdtest && ./mdtest send <receipient_number_preceded_by_a_country_calling_code_without_"+"_sign">@s.whatsapp.net <your_message>
Edit above text according to your information. Example:
cd /data/data/com.termux/files/home/whatsmeow/mdtest && ./mdtest send [email protected] "My test message"
[If your message contains multiple lines, don't forget to put " sign at the beginning and the end of the message.]
You can also send images instead of just a text (optionally with a caption). Open Tasker, create a task (name it as you wish) and add Run Shell action. In the Command field put the following text:
cd /data/data/com.termux/files/home/whatsmeow/mdtest && ./mdtest sendimg <receipient_number_preceded_by_a_country_calling_code_without_"+"_sign">@s.whatsapp.net </exact/path/of/your/image.jpg> <[optional] any caption>
Edit above text according to your information. Example:
cd /data/data/com.termux/files/home/whatsmeow/mdtest && ./mdtest sendimg [email protected] /storage/emulated/0/image_example.jpg "My caption"
Mark Use root box. Go back to the task and run it by tapping the Play icon. If the message has been delivered to your recepient, you succeeded!
(5) If you want to send a message to a group instead of a single contact, you will need a precise jid ODE]number of this group. You can get it this way:
Make a test task in Tasker. Create a Shortcut action. Tap on the Magnifying glass icon and select Whatsapp: Whatsapp field, then select your group. In the command line of the Tasker action a string of signs will appear, among others the jid number of your group. It is located between jid= and %40.
Make another task (name it as you wish) with the Run Shell action. In the Command field put the following text:
cd /data/data/com.termux/files/home/whatsmeow/mdtest && ./mdtest send <jid_number_of_your_group>@g.us <your_message>
Edit above text according to your information. Example:
cd /data/data/com.termux/files/home/whatsmeow/mdtest && ./mdtest send [email protected] "My test message"
You can also send images to your groups instead of just a text. To do that, follow the pattern for the individual contact, but use the jid number of the group.
Mark Use root box. Go back to the task and run it by tapping the Play icon. If the message has been delivered to your recepient, you succeeded!
Now you can link your task to any profile as well as create additional tasks in order to automatically send different messages. Enjoy!
PROCEDURE FOR NON-ROOTED USERS:
(1) In Termux, enter cd whatsmeow/mdtest command. Then enter nano main.go command. The file editor will open. Find this block of text:
c := make(chan os.Signal)
input := make(chan string)
signal.Notify(c, os.Interrupt, syscall.SIGTERM)
go func() {
defer close(input)
scan := bufio.NewScanner(os.Stdin)
for scan.Scan() {
line := strings.TrimSpace(scan.Text())
if len(line) > 0 {
input <- line
}
}
}()
Below this block of text make a new line and paste the following text there:
args := os.Args[1:]
if len(args) > 0 {
handleCmd(strings.ToLower(args[0]), args[1:])
return
}
Save the file by selecting CTRL on the Termux panel and tapping "o" on the keyboard. Confirm by tapping ENTER. Exit the file by selecting CTRL on the Termux panel and tapping "x" on the keyboard.
(2) Make sure you are in the ~/whatsmeow/mdtest directory. Then run go build command. Wait for the operation to be finished.
(3) Run ./mdtest command. If all has been done correctly so far, you should see a QR code. Make a screenshot of it and send it to your secondary device. Then open Whatsapp on your main device, tap three dots in the right-upper corner, select Linked devices, select LINK A DEVICE and scan the QR code from your second device. You should see a new device linked, described as whatsmeow.
[Please note that the after a short while a new QR code is generated and the previous one gets invalid, so make this operation quickly.]
(4) Go back to Termux. Exit the whatsmeow program by selecting CTRL on the Termux panel and tapping "c" on the keyboard. You should return to the ~/whatsmeow/mdtest directory. Go back to the main directory by entering cd - command.
(5) Setup Tasker:Termux plugin. In Termux, enter the following commands:
$ mkdir -p /data/data/com.termux/files/home/.termux/tasker
$ chmod 700 -R /data/data/com.termux/files/home/.termux
Now, you have to grant Tasker the permission to run commands in Termux environment. You can do this in two ways:
- grant the permission manually in the device settings. Look at:
Android Settings > Apps > Tasker > Permissions > Additional permissions > Run commands in Termux environment
[The exact place of this permission may vary depending on the device model and software.]
- run the following commands on PC via Android Debug Bridge (ADB):
$ adb shell
$ pm grant net.dinglisch.android.taskerm com.termux.permission.RUN_COMMAND
[We assume you know how to use ADB. If not, please consult this page.]
(6) Go back to Termux. Enter cd .termux/tasker command. Make a new .txt file (name it as you wish) by entering nano <name_of_your_file>.txt command. In the editor, put the following text inside:
cd whatsmeow/mdtest
./mdtest send <receipient_number_preceded_by_a_country_calling_code_without_"+"_sign">@s.whatsapp.net <your_message>
Edit above text according to your information. Example:
cd whatsmeow/mdtest
./mdtest send [email protected] "My test message"
[If your message contains multiple lines, don't forget to put " sign at the beginning and the end of the message.]
You can also send images instead of just a text (optionally with a caption). In Termux, enter cd .termux/tasker command. Make a new .txt file (name it as you wish) by entering nano <name_of_your_file>.txt command. In the editor, put the following text inside:
cd /data/data/com.termux/files/home/whatsmeow/mdtest && ./mdtest sendimg <receipient_number_preceded_by_a_country_calling_code_without_"+"_sign">@s.whatsapp.net </exact/path/of/your/image.jpg> <[optional] any caption>
Edit above text according to your information. Example:
cd /data/data/com.termux/files/home/whatsmeow/mdtest && ./mdtest sendimg [email protected] /storage/emulated/0/image_example.jpg "My caption"
Save the file by selecting CTRL on the Termux panel and tapping "o" on the keyboard. Confirm by tapping ENTER. Exit the file by selecting CTRL on the Termux panel and tapping "x" on the keyboard.
(7) If you want to send a message to a group instead of a single contact, you will need the precise jid number of this group. You can get it this way:
Make a test task in Tasker. Create a Shortcut action. Tap on the Magnifying glass icon and select Whatsapp: Whatsapp field, then select your group. In the command line of the Tasker action a string of signs will appear, among others the jid number of your group. It is located between jid= and %40.
In Termux, enter cd .termux/tasker command. Make a new .txt file (name it as you wish) by entering nano <name_of_your_file>.txt command. In the editor, put the following text inside:
cd whatsmeow/mdtest
./mdtest send <jid_number_of_your_group>@g.us <your_message>
Edit above text according to your information. Example:
cd whatsmeow/mdtest
./mdtest send [email protected] "My test message"
You can also send images to your groups instead of just a text. To do that, follow the pattern for the individual contact, but use the jid number of the group.
Save the file by selecting CTRL on the Termux panel and tapping "o" on the keyboard. Confirm by tapping ENTER. Exit the file by selecting CTRL on the Termux panel and tapping "x" on the keyboard.
(8) Test your setup. Open Tasker and create a task with Plugin > Termux:Tasker action. Go to Configuration and in the Executable field at the top start typing the name of the file you have created (the full name should be shown as soon as you start typing). Select the file, then click on Save icon. Go back to the task and run it by tapping the Play icon. If the message has been delivered to your recepient, you succeeded!
Now you can link your task to any profile as well as create additional files in the ~/.termux/tasker directory in order to automatically send different messages. Enjoy!
PS. Credits go to whatsmeow creators as well as u/Black616Angel from Reddit who contributed massively to this method and without his help it wouldn't be possible at all. Check this Reddit thread for the reference.
Wow! What a write-up! Amazingly painful way just to send a message via WhatsApp. I really wish these messaging providers made things more open.
BinkXDA said:
Wow! What a write-up! Amazingly painful way just to send a message via WhatsApp. I really wish these messaging providers made things more open.
Click to expand...
Click to collapse
There are many autoresponders available on the market, INITIATING a message is difficult because Whatsapp doesn't provide API. This way isn't a simplest one, but at least it works with screen off using web interface.
Lord Sithek said:
There are many autoresponders available on the market, INITIATING a message is difficult because Whatsapp doesn't provide API. This way isn't a simplest one, but at least it works with screen off using web interface.
Click to expand...
Click to collapse
You finally managed to find a system to be able to send messages using Tasker
I need to ask you a question.
When I send messages with this system the person receiving cannot see the text correctly.
A warning comes out that says so:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
how can this problem be solved?
Thank you very much
westenlive said:
You finally managed to find a system to be able to send messages using Tasker
I need to ask you a question.
When I send messages with this system the person receiving cannot see the text correctly.
A warning comes out that says so:
View attachment 5728319
how can this problem be solved?
Thank you very much
Click to expand...
Click to collapse
I've seen that before, but honestly I have no idea why is this happening... Maybe unlinking and linking whatsmeow again would help or recreating Tasker action
Lord Sithek said:
I've seen that before, but honestly I have no idea why is this happening... Maybe unlinking and linking whatsmeow again would help or recreating Tasker action
Click to expand...
Click to collapse
ephemeral messages is the problem.
if they are enabled by this problem, by disabling ephemeral messages the problem is not there
cmq thanks for this great tool.
westenlive said:
ephemeral messages is the problem.
if they are enabled by this problem, by disabling ephemeral messages the problem is not there
cmq thanks for this great tool.
Click to expand...
Click to collapse
ohh good to know honestly I just compiled all the info into one post, I got a lot of help from more skilled users. You can read the Reddit thread as well and the posts from others:
https://www.reddit.com/r/tasker/comments/wcoc7h
Hi there! rooted device using SuperSU app here. i used the root guide, but when i run the shell command in tasker, nothing happens, the linked device whatsmeow shows "last active" the moment i uploaded the QR and not when i ran the shell command..... maybe i am doing something wrong?
EDIT: i made it! something weird was happeneing with main.go file.. the non-root explanation is more clear. thanks!
hernanbozzano said:
Hi there! rooted device using SuperSU app here. i used the root guide, but when i run the shell command in tasker, nothing happens, the linked device whatsmeow shows "last active" the moment i uploaded the QR and not when i ran the shell command..... maybe i am doing something wrong?
EDIT: i made it! something weird was happeneing with main.go file.. the non-root explanation is more clear. thanks!
Click to expand...
Click to collapse
Nice that you got it working, although root way is kinda easier to me I'm courious though what went wrong there
All who follow: Check the OP, there is much easier way to do the same now
I prefer this method.
Is much simpler.
But for a few days it hasn't been working for me.
Does this method work for you?
thanks
westenlive said:
I prefer this method.
Is much simpler.
But for a few days it hasn't been working for me.
Does this method work for you?
thanks
Click to expand...
Click to collapse
Sorry, but I switched to the new solution myself. Maybe you could try V2 of the new project since as far as I remember it was just kind of extended solution of mine:
https://www.reddit.com/r/tasker/comments/11a4k49
this system works really well.
I thank you so much.
it helps me so much with my work .
thank you brother
westenlive said:
this system works really well.
I thank you so much.
it helps me so much with my work .
thank you brother
Click to expand...
Click to collapse
Im glad I could help!

Categories

Resources