Annoying XRDP issue

I've long had both a Windows laptop and a Linux desktop on my desk.  I will occasionally have things going on both machines at the same time and want to switch back and forth between them.  I have a KVM switch for this, but I'm lazy and it's kind of annoying because it takes a few seconds for the multi-monitor setup to refresh between systems.

In the past, I dealt with this by setting up XRDP on the Linux box.  That way I can just open an RDP window and quickly check it whenever I want.  I prefer XRDP to something like VNC or TeamViewer because it's free software and requires no additional configuration once it's set up.  I don't have to install VNCviewer on Windows, I don't have to make sure that VNCserver is running on Linux - I just start the xrdp service and I'm good to go.  XRDP has it's own login manager and will start a session if one doesn't already exist.

The problem: That last part no longer works.

It's been a while since I used that setup, but I used to be able log in on the physical machine and then connect to that same session using RDP.  Turns out, you can't do that anymore.  I didn't dig into the details, but I found this GitHub issue, which pointed me to this section of the docs, which basically says, "Yeah, this doesn't really work with systemd."  Apparently, the way systemd doesn't play well with DBUS, so you can't log into an existing session that was initiated from the physical terminal.

The work-around is to log into another account.  Which is not great, but I guess it's better than nothing.  So I just created a "<mylogin>-rpd" user, added it to the same groups and my regular login, and it works reasonably well.  It's certainly not ideal, but it's easier than switching to a distro that doesn't use systemd.

Annoying external monitor issues

My work laptop has this annoying issue where sometimes the external monitors don't disconnect when I unplug them.  I have two external monitors that I connect to it via a USB-C hub.  It works pretty well most of the time, but every now and then it will lose the external monitors.  This comes in two flavors:

  1. The hub is plugged in, but the monitors disconnect.
  2. I've unplugged the hub, but Windows still thinks the monitors are connected.

Case 1 is simple enough to deal with - just unplug the hub, wait a few seconds until I hear the notification for the device being unplugged, and then plug it back in.

The second case is kind of annoying.  Because Windows still thinks the monitors are attached, it doesn't reposition any windows.  That means I'll be using just my laptop screen, but most of my work is sitting off-screen on non-existent monitors.  I've tried explicitly disconnecting the monitors through the display settings, but it doesn't work - literally nothing changes and Windows still thinks they're connected.

The only solution I've found for this is manually moving the windows.  In the old days, you could just right-click the task bar icon and get a menu with the "move" item in it.  But that's gone now.  Instead, you have to select the window in the task bar to make it active, then press "Alt+Space, M" to move the window and then use the arrow keys and mouse to get it on the screen.  Unless it's maximized, in which case "move" isn't available.  For that case, you have to do "Alt+Space, R" to restore it and then press "Alt+Space, M" to move it.

That last part I didn't actually realize until just now, when this happened and I was trying to figure out why the "move" trick only worked for some of the windows.  Sigh....

Enable shift+enter in Claude Code

This is yet another "thing I will forget, so I'm writing a note here" post.

I've been used to using Claude Code inside the IntelliJ plugin.  That plugin is very basic and still in beta, but it works well enough.  All it really does is run Claude Code in the integrated terminal, provide the current file as context, and show changes in the integrated diff viewer.  But it also pre-configures the setting to allow you to press shift+enter in the Claud Code to enter a newline.

If you fire up Claude Code in a Windows Terminal session, this does not work.  To enter a newline, you have to type a backslash followed by enter, which sort of makes sense, but is annoying and unintuitive.  There is a /terminal-setup command, but that also doesn't work in Windows Terminal.  Apparently Anthropic hasn't gotten around to implementing that yet.

Fortunately, there is a work-around.  You can manually add the key bindings to your Windows Terminal configuration.  

"actions": [
  {
    "command": {
      "action": "sendInput",
      "input": "\u000A"
    },
    "id": "User.sendLF"
  }
],
"keybindings": [
  {
    "id": "User.sendLF",
    "keys": "shift+enter"
  }
]

That's what Claude spit out from a scape of Github, anyway.  I originally got it from a Redit post that said essentially the same thing, but now I can't find it.  Either way, it seems to work just fine.

Disabling the terminal in vim-ps1

This is another one of those "note to myself because I can never remember this" posts. 

For quite a while, I've been using the vim-ps1 plugin for Powershell syntax highlighting.  It's generally fine, but I have one annoyance with it: When I open a Powershell file, the plugin opens a horizontal split with a Powershell terminal in it.  That's...fine, but most of the time I don't want that.  And the documentation doesn't say anything about it.

Well, fortunately there's a resolved Github issue with the answer.  Turns out the issue isn't actually with vim-ps1, it's with coc-powershell, which actually does mention this issue in the docs.  Why the language server is popping up a terminal window isn't clear to me, but the solution is to add this to your coc-settings.json file:
"powershell.integratedConsole.showOnStartup": false

Easy fix!  Unfortunately, I can't check that into my vim-config Git repo because I have my Intelephense license key in that file, so I need to document it someplace else.  Hence this post.

As an aside, before scouring the web for that answer, I tried asking Claude.  That didn't go well.  It's first answer was to "look at your Vim config" or try disabling plugins, which was not even remotely useful.  When I pointed that I knew there was a setting for this, it asked me where I saw it.  If I remembered that, I wouldn't need to ask the AI!  At that point, I decided it was easier to do this the old-fashioned way and ended up checking the Github issues and found the solution in a couple of minutes.

Things like that make me appreciate William Bernstein's comments in his interview with Rob Berger.  When asked about using AI in his writing and research, he said that AI is extremely useful, but it's kind of like having a very dumb graduate assistant.  That seems about right to me.  Even a dumb grad student is still smart enough to get into grad school, so they're capable of doing some very helpful work, but they still have some significant limitations.

PayPal Debit Card Review

I've had a PayPal account for a long time.  For most of that time, I barely used it.  But recently, I've been using it fairly regularly.  Mostly, that's a choice of convenience - I can easily link credit cards to my PayPal account and then pay with them through PayPal rather than directly entering my card information in a bunch of different sites.  This makes the checkout process a bit smoother and also adds a layer of indirection, and therefore control, to the payment process.  (I've also had at least one dispute where PayPal was significantly more accommodating then my bank.) 

What I hadn't done was set up a PayPal balance account.  In other words, I didn't have money sitting "in PayPal", for lack of a better description.  In fact, I didn't even have a bank account linked to PayPal, just credit cards.  That changed this year.  First, I needed to send someone money, so I actually had a reason to link a bank account.  That opened the door.  And then, I heard about the PayPal debit card.

PayPal debit card

The last year or two, I've gotten into the credit card rewards game a bit.  Not to a crazy extent, but I started actually paying some attention to the rewards structure on our cards and signing up for cards specifically to maximize the rewards.  That leads me to occasionally look at cards that would fill in gaps in rewards categories.

Important Note: For anyone who doesn't already realize this, you shouldn't be playing the credit card rewards game if you're carrying balances from month to month.  And make no mistake - it is a game.  While you can make a decent amount in credit card rewards, it's not going to be enough to change your financial situation.  And if you're paying any interest, that's going to wipe out any gains, so you've already lost before you start.  So if you're going to do this, have your financial house in order and view it as a recreational activity, not a money-making scheme.

This is where the PayPal debit card comes in.  Normally, debit cards give you little to nothing in rewards.  For example, my credit union has a program that will give you 1% back on debit card purchases, but only if you meet certain additional requirements.  The PayPal debit card, however, has a superpower - it gets you 5% back on one category.

If you're not into the credit card game, this is very good.  However, elevated rewards rates - especially as high as 5% - almost always come with a catch of some kind.  In the case of the PayPal Debit Card, there are a few catches:

  1. You only earn rewards on that one category.  So if your category is "groceries", you get 5% back at grocery stores, but that's it.  You get zero on any other purchases.
  2. Your rewards category must be set every month, and once it's set, it can't be changed until the next month.  Nothing you buy before setting the category earns any points, even if you set the category later.
  3. The rewards are capped at $1,000 in spending per month.  So at most, you can make $50 per month, or $600 per year.

The "choose your category every month" thing is not unique to PayPal, but it is slightly annoying.  I set a calendar reminder for the first of each month, and they send you an email reminder as well, so it's not hard to remember.

The limit of $50 a month isn't fantastic, but it isn't unusual.  Pretty much all of the 5% category cards I've seen have some form of limit - whether monthly, quarterly, or annually.  The only exceptions I've seen are things like the Amazon Prime Visa, that give you 5% uncapped, but only at specific retailers.  And if you're consistently spending more than $1,000 a month at just Amazon, you're either very well off or you have a serious spending problem (or both).

The rewards categories are pretty much the same ones that every other card company has.  Currently the choices are groceries, gas, restaurants, clothing, and rideshare/public transit.  If you're like me, you probably already have some cards with elevated rewards on most or all of these categories.  However, if you're willing to do a little extra work, the PayPal debit card can help you elevate some of those categories.

In my case, two of my biggest categories are groceries and restaurants.  To cover those, I have two cards:

  1. The AAA Daily Advantage, which pays 5% on groceries and 3% on gas, with an annual cap of $500 in rewards on those two categories combined.
  2. The Chase Freedom Unlimited, which pays 3% on restaurants.

My main issue with this setup is the annual cap on the AAA card.  If applied only to groceries, that $500 rewards cap comes to $10,000 per year in spend, and I know for a fact that I average a bit more than that on groceries and gas combined.  This past year, I correctly forecasted that I would hit that limit and drop back down to 1% on that card in October, which leaves me with a few thousand dollars of grocery spend without elevated rewards.  Of course, I can just put it on my flat 2% catch-all card, but where's the fun in that?  With the PayPal Debit Card, I have something to fill in that blank couple of months and continue to get 5% on groceries.  And after the new year, when my rewards counter reset on the AAA card, switched the PayPal Debit to restaurants and am getting 5% there instead.

The points redemption for your cash-back is pretty simple.  Of course, they offer the option to "shop with points" and similar, but you can also just opt for plain-old cash back.  You request the redemption through PayPal app and it gets deposited to your PayPal deposit account.  It seems that you can redeem points as soon as they hit your account, which is nice.  

One "gotcha" that I discovered early in using this card was the method of funding your balance account.  I initially funded it from my linked bank account, which just uses ACH transactions.  That works fine, obviously, but it generally takes at least a couple of days to go through.  I was thrown off because the first time I did that, it was credited more or less immediately.  But that didn't happen the next time, so I guess that must just be an initial funding thing.  So instead, I took their recommendation to link another debit card to my balance account.  I actually used the debit card for the same checking account at my credit union that I had linked, so the money comes from the same place.  The difference is that the debit card transactions clear almost immediately.  I tested that in grocery store one day, when I literally added funds to my PayPal account while I was standing in line and then spent them a couple of minutes later.  It worked just fine.

Of course, manually reloading your balance account is tedious and annoying, so who wants to do that?  That's why PayPal also has auto-reload features.  I have two of these turned on: 

  1. An automatic timed transfer.  The amount and time frame are configurable, within some parameters.  I do a token $25 every Monday.
  2. Reload when your balance drops below a given threshold.  You can set the threshold wherever you want, but the reload amount has to be at least as large as the threshold amount.  I have both my threshold and reload amount set at $100.

As far as the card loading, I have two goals.  First, I want to have enough money in my account to cover anything I would reasonably buy with it, but no more.  Second, I want to have 12 reloads per month.  Why?  Because I can use them to get extra rewards, of course!  I tested it and discovered that the PayPal balance account reloads count for the rewards program I'm enrolled with at my credit union.  The program gives you an elevated interest rate on your savings account, currently 5% on the first $10,000 (compared to the normal 0.03%), provided you meet certain criteria.  Those include direct deposit, e-statements, and at least 12 debit card transactions on your linked checking account.  So by manually triggering a few extra transfers each month, I'm able to unlock an extra $500 in interest.  Not bad.

It's been about 3 months and so far I'm pretty happy with the PayPal debit card.  Even though it's not a credit card, it fits nicely into my rewards care lineup.  It's easy to use and the category picking isn't too annoying.  I'm definitely going to keep it around.