Issues using setappvolume with nircmd - linux

I am using nircmd for a personal group project. I am trying to use the setappvolume command to send specific program/process sounds to a sound device other than the default sound device.
This is the format of the command:
setappvolume [Process] [volume level] {Device Name/Index}
I have tried this:
setappvolume Spotify.exe 1 "Speakers"
This command doesn't work. However, when I drop the optional command, the function does work:
setappvolume Spotify.exe .5
The same issue applies to the changeappvolume command. Every other listed command that I've tried works. Does anyone know what I'm doing wrong? Or if there is an alternative way to accomplish this, please let me know (Windows or Linux, but preferably Windows).

Related

How to run selected text using keyboard shortcut joined together with a command in background?

I am trying to be able to select text anywhere within my manjaro linux system and run it along with a TTS text to speech program. The program is called google_speech and it got a really clear default voice and is really easy to use, however I am finding it hard to implement what I want to do with it...
The program is ran by the following command:
$ google_speech -l en "I am just a robot but one day I plan to rule humans"
so I am trying to be able to select text and press a keyboard shortcut and the text will automatically be importing here:
$ google_speech -l en "HERE"
and ran as a command in the background hopefully without having to open a terminal window but if so then thats totally fine... I was thinking xclip would be able to do this but I can figure out what command or options I need to be using... my research so farhas gotten me nowhere...
Thanks you so much for your time and skills...

Running a program in linux (debian) on startup

I would like to point out that I tried A LOT of different tutorials from the internet but they don't seem to work...
Adding stuff to init.d, rc.local etc. for some reason it doesn't work.
I'm really desperate to get this done, but I'm a total noob when it comes to linux.
when I type in "matchbox-keyboard" it runs just fine and as intended.
That's literally all I want, but I'd like to run it every time so when I turn my raspberry pi on, I won't have to connect a keyboard and a mouse to initialize on-screen keyboard.
Is there a simple way to get this done, something like dropping the program into autostart folder in windows?
I have no experience with linux at all, I don't know how to write scrips and all that stuff and all I want is to run this "matchbox-keyboard" after every reboot...
Please help me, I'm really desperate and I can't figure it out. Spent all day doing it and still nothing...
The simplest way is to drop in a new cronjob (a cronjob is a task that is scheduled to run at a particular time):
crontab -e
This allows you to edit your cron file. Instead of putting in a time, use #reboot. So you should have a new line in your cronjob file that looks like this:
#reboot matchbox-keyboard
The cronjobs run in a different environment from your login environment, so you may need to use the full path to the program. I'm also not familiar with the matchbox-keyboard program, but it looks like it will run fine since it can run as a background process.
Maybe you have gnome-tweaks installed?
apt list gnome-tweaks
Listing... Done
gnome-tweaks/stable,now 3.30.2-1 all [installed,automatic]
It has a graphical Startup Applications function that allows you to select application icons and start them at LOGIN time. I use it to start my favorite text editor.
Starting things like an Apache server (e.g. XAMPP) at BOOT time is a whole new ball game. I used this link as a starting point.

Custom print on DNP DS620 cutting problems

Hi everyone i'm currently using a DNP DS620 on a raspberry pi and i'm doing some printing with the lpr commands like lpr -P printername -o landscape picturename
This gave me a picture of 4x6 inch (10x15cm)
So i'm able to order some prints with a command system (good yeah!) but i don't find any way to use the cutting option to have a double 2x6inch picture at the end.
I know that some Epson printers use the source=DocFeedCut command but it didn't work in my case.
So does everyone know the command for that or a way to do that?
So I contact someone from the driver's developer's team explaining my issue to him, this operation wasn't possible at that time on this device. They made some modifications to enable this kind of process on this new kind of printer, now it's possible.

Powerhsell/batch file script I can't quite get right

I've found two great tricks and I'd really like to get them to work together, but how to do so is totally eluding me.
One I just found is this: https://stackoverflow.com/a/2611394/12943 which is a batch file that starts powershell and feeds itself to powershell which is awesome.
the other trick is this one: https://stackoverflow.com/a/18739839/12943 Which lets PowerShell elevate itself if necessary (Feeding the script to itself once elevated)
I think it might work if the first line of the batch file that looks like this:
#findstr/v "^#f.*&" "%~f0"|powershell -&goto:eof
instead looked something like this:
#findstr/v "^#f.*&" "%~f0"|powershell "start-process powershell -verb runas" -&goto:eof
but that doesn't work and I can't quite get it right (I think the piping in that case goes to the original powershell process but not the one you runas).
The two methods obviously won't easily work together because they use similar mechanisms, but I can't help think that there is a clean solution that will both let me easily run a powershell script by typing the name into a command window AND self-elevate--both without any prior setup or extra software (since this is the first step of some system-configuration scripts on a system that cannot be attached to the internet).
I can (and will) do this by simply using the batch file solution and requiring the user to elevate manually but it seems like there should be an easier way.
Note that the batch file seems to also get around the executionpolicy which is somewhat curious but in this case preferred.
perhaps you should autoelevate the batch instead of your ps script. running powershell.exe from elevated cmd opens an elevate ps console. you can find auto elevating batch here https://stackoverflow.com/a/12264592/381149 .

Is there a Linux command to replicate/replace the "banner" command?

I am writing a script on Red Hat Linux (I forget the version) that needs a header, but the banner command is not there for me to use and I won't be able to get it installed. I read via Google that it may well have been deprecated.
So is there a new version of the command that produces similar results, or a way I can replicate the command, or even just temporarily change the script output so that characters are a different size?
I've tried looking at stty but we don't access via xterm, we log in directly via putty.
In its simplest form, 'banner' is less than a few pages of code (e.g. this one). Perhaps you could just compile and run it from your home directory?
Use some web site, for example http://patorjk.com/software/taag/.
If you need it frequently you can create a script to scrap the result.
BTW, stty has nothing to do with your problem, I don't know why you mentioned it.

Resources