{"id":18574,"date":"2022-07-19T00:25:48","date_gmt":"2022-07-19T00:25:48","guid":{"rendered":"https:\/\/harchi90.com\/quick-hack-the-phone-to-stream-deck-conversion\/"},"modified":"2022-07-19T00:25:48","modified_gmt":"2022-07-19T00:25:48","slug":"quick-hack-the-phone-to-stream-deck-conversion","status":"publish","type":"post","link":"https:\/\/harchi90.com\/quick-hack-the-phone-to-stream-deck-conversion\/","title":{"rendered":"Quick Hack: The Phone To Stream Deck Conversion"},"content":{"rendered":"
\n

What do you do with those old Android or iPhone phones and tablets? You have plenty of options, but it is pretty easy to build your own stream deck with a little off-the-shelf software. What’s a stream deck, you ask? The name comes from its use as a controller for a live-streaming setup, but essentially, it’s an LCD touchscreen that can trigger things on your computer.<\/p>\n

The software I’m using, Deckboard, is a server for Windows or Linux and, of course, an Android app. The app is free with some limitations, but for under $4 you can buy the full version. However, even the free version is pretty capable. You can use an Android phone or tablet and you can connect to the PC with a USB cable or WiFi. I’ve found that even with WiFi, it is handy to keep the phone charged, so realistically you are going to have a cable, but it doesn’t necessarily have to connect to the host computer.<\/p>\n

Linux Setup<\/h2>\n

Setup is very easy. The biggest hurdle is you might need to set up your firewall to allow the server to listen on port 8500 with TCP. There are a few minor issues when installing with Linux that you might want to watch out for. There are 32-bit and 64-bit versions in deb<\/code>, tar.gz<\/code>, and appimage format. There’s also a snap. The problem with the snap is it is sandboxed, so without effort you can’t easily launch programs, which is kinda the entire point. I finally removed it and installed the deb file which was fine.<\/p>\n

There were still two other wrinkles. First, while Deckboard offers a way to launch programs, it must be a program from a list it reads from your system. That would be acceptable, but the list wasn’t complete. I never did figure out why some things show up on the list and others don’t. For example, GIMP which shows up on my application menu was absent. Yet other things that were fairly obscure did show up.<\/p>\n

I thought this might be a dealbreaker until I found that Deckboard has a well-developed plugin system and one of those plugins lets you run an arbitrary command line. I guess it is a little less convenient, but it is much more flexible since you can launch any program you want and provide options to it as well.<\/p>\n

The only other complaint I had is that when you run the program, it shows its configuration interface and puts itself in the system tray. That’s great the first time you run it, but on system startup, it would be nice to just have it quietly start. If there’s an option for that I haven’t found it. I’ll tell you how I solved that later, but, for now, just live with it.<\/p>\n

Configuration<\/h2>\n

Of course, getting it installed on both machines is only the start. The whole point of something like this is to configure it to your whim. The program knows how to communicate with OBS, Spotify, Twitter, and Twitch. But you can also add generic programs, URLs, and so on. There are also plugins for things like Discord, Open Hardware Monitor, Steam, and more.<\/p>\n

\"\"
The multimedia panel lets me control media and open a few apps<\/figcaption><\/figure>\n

You can create a bunch of pages, so you don’t have to cram everything on one page. The free version limits how many buttons you can have on a page, but the upgrade lets you put way too many if you want. I found that three rows of 6 buttons in landscape mode on my old Pixel 2 XL was about right for me.<\/p>\n

Of course, everyone will have different ideas about how to set it up, and you are probably better able to create something aesthetic than I am. However, I tried to keep a few things constant. The top right corner of each screen is a time button that doesn’t do anything, just shows the time). This requires a plug in. The rest of the top row is reserved for buttons that open other pages and on every screen but the main screen, the button next to the clock takes you back to main.<\/p>\n

\"\"
Creating a new button is easy enough<\/figcaption><\/figure>\n

The bottom right button on each screen opens a multimedia panel because it is just so useful. Again, you won’t like my setup and will want your own.<\/p>\n

Creating buttons and pages is very easy on the PC. You can select actions ranging from keyboard macros to multimedia control. You can control the mouse, open a website, or take a screenshot. Of course, you can also run a program as I mentioned earlier.<\/p>\n

Form and Function<\/h2>\n
\"\"
Graphic buttons can make your deck look better but getting there isn’t obvious<\/figcaption><\/figure>\n

My buttons are a bit bland, I’ll admit. The icons are built into the program and come from Font Awesome. However, I didn’t realize that you can make each button use your own custom graphic. You do this by selecting the button’s shape which can be square, round, or a mysterious third option that looks like an image. At first, I thought that just meant \u201ctotally transparent\u201d but if you select that and then push the button in the edit window, it lets you pick a file for a background. I guess I’ll have to go reconfigure everything now that I know that.<\/p>\n

One thing that is nice is that you can have a button do multiple actions. So, for example, when I press the Hackaday button, it not only switches to the Hackaday page on the deck, it also flips over to my Hackaday desktop on the PC by sending a keyboard command. It could also run a script or folder, too.<\/p>\n

\"\"
Buttons can run more than one action<\/figcaption><\/figure>\n

It isn’t quite a scripting language, but it prevents you from having to tie buttons to a bash script in some cases.<\/p>\n

The Final Piece<\/h2>\n

I mentioned that I didn’t appreciate that loading the program on startup also causes the main window to appear. I found a fairly simple way to combat that, at least on KDE. First, run the program minimized. You can do that a few ways. I used a KWIN window rule to force it to iconify, but you could also use kstart<\/code> to do that. Of course, if you aren’t using KDE, you’ll have to find another way to do it and, honestly, it doesn’t really matter if you don’t mind seeing the config screen pop up for a bit on startup. That’s because in addition to setting the program to autostart, I also started a script file called deckboard-tidy.sh<\/code>:<\/p>\n


\n
\n#!\/bin\/bash
\nsleep 5
\nwmctrl -c deckboard
\n
\n<\/pre>\n

In other words, wait for the program to start and then close its window. It still stays running in the systemtray. You could also tell Deckboard not to load itself and then do the whole loading operation in this script. You can probably pull the same stunt on other desktops, but the details will depend on your setup.<\/p>\n

Honestly, this is a hack that is more useful than it is difficult. But you can spend a lot of time tweaking that perfect setup. But it makes that old phone something you can use every day.<\/p>\n

If you prefer a more rigorous hack, check out FreeDeck. Not that that’s the only one out there. If you want a really useful hack, it would be nice to reverse engineer Deckboard’s TCP protocol so we could have a Raspberry Pi server for this.<\/p>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"

What do you do with those old Android or iPhone phones and tablets? You have plenty of options, but it is pretty easy to build your own stream deck with a little off-the-shelf software. What’s a stream deck, you ask? The name comes from its use as a controller for a live-streaming setup, but essentially, …<\/p>\n

Quick Hack: The Phone To Stream Deck Conversion<\/span> Read More »<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-global-header-display":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[4],"tags":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":9350,"url":"https:\/\/harchi90.com\/steam-decks-web-browser-badly-needs-an-update\/","url_meta":{"origin":18574,"position":0},"title":"Steam Deck’s Web Browser Badly Needs An Update","date":"July 9, 2022","format":false,"excerpt":"screenshot: Valve \/ Mozilla \/ KotakuAs has been reported by Gaming on Linuxand chatted about on reddit, the Steam Deck has got a bit of a security problem concerning its pretty badly outdated version of Firefox. Valve has reportedly promised a fix, but it won't come until the next SteamOS\u2026","rel":"","context":"In "Technology"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":6562,"url":"https:\/\/harchi90.com\/microsofts-xcloud-game-streaming-looks-worse-on-linux-than-windows\/","url_meta":{"origin":18574,"position":1},"title":"Microsoft’s xCloud game streaming looks worse on Linux than Windows","date":"July 6, 2022","format":false,"excerpt":"A scene from Forza Horizon 5 on xCloud as seen with a Windows User-Agent string... ... and with a Linux User-Agent. Note the added blur on the cobblestone light reflections. Another scene with a Windows User-Agent string... ... and with a Linux User-Agent. The difference is subtler here but noticeable\u2026","rel":"","context":"In "Technology"","img":{"alt_text":"A GIF comparing one corner of the image in two xCloud-streamed sessions, with only the User-Agent string changing between them.","src":"https:\/\/i0.wp.com\/cdn.arstechnica.net\/wp-content\/uploads\/2022\/07\/xcloud-comparison-windows-linux.gif?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":4422,"url":"https:\/\/harchi90.com\/got-an-old-android-or-iphone-repurpose-it-as-a-security-camera\/","url_meta":{"origin":18574,"position":2},"title":"Got an Old Android or iPhone? Repurpose It as a Security Camera","date":"July 4, 2022","format":false,"excerpt":"Many people have at least one old phone stuffed in a drawer somewhere. Rather than leaving that defunct iPhone or Android to collect dust, why not give it a second life? Converting your old smartphone into a security camera is a cost-effective way to get eyes on your home when\u2026","rel":"","context":"In "Technology"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.cnet.com\/a\/img\/resize\/c7a4a0cca2d405c8f23940c252eb27c79f5951af\/2022\/06\/27\/85830db0-630d-411b-9cf6-9735e3fc7c24\/home-tips-logo-final.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":6936,"url":"https:\/\/harchi90.com\/steam-deck-review-a-game-console-for-the-quintessential-gamer\/","url_meta":{"origin":18574,"position":3},"title":"Steam Deck Review: A Game Console for the Quintessential Gamer","date":"July 7, 2022","format":false,"excerpt":"There's a new hard-to-get game console this year that's not a PlayStation or an Xbox. It's sold online only. Most casual gamers probably haven't heard of it.It's the $400 Steam Deck, a console as utilitarian as it sounds. The hand-held device, a slab of bulky black plastic with a built-in\u2026","rel":"","context":"In "Technology"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"fifu_image_url":"https:\/\/hackaday.com\/wp-content\/uploads\/2022\/07\/main.png","_links":{"self":[{"href":"https:\/\/harchi90.com\/wp-json\/wp\/v2\/posts\/18574"}],"collection":[{"href":"https:\/\/harchi90.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/harchi90.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/harchi90.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/harchi90.com\/wp-json\/wp\/v2\/comments?post=18574"}],"version-history":[{"count":0,"href":"https:\/\/harchi90.com\/wp-json\/wp\/v2\/posts\/18574\/revisions"}],"wp:attachment":[{"href":"https:\/\/harchi90.com\/wp-json\/wp\/v2\/media?parent=18574"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/harchi90.com\/wp-json\/wp\/v2\/categories?post=18574"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/harchi90.com\/wp-json\/wp\/v2\/tags?post=18574"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}