Running 'rclone gui', with '--addr', in Powershell, on Windows, via a function or alias

What is the problem you are having with rclone?

I cannot get a PowerShell alias, or function, to do C:\Portable_apps\rclone\rclone\rclone.exe gui --addr localhost:5580.

Run the command 'rclone version' and share the full output of the command.

rclone v1.74.1

  • os/version: Microsoft Windows 11 Pro 25H2 25H2 (64 bit)
  • os/kernel: 10.0.26200.8037 (x86_64)
  • os/type: windows
  • os/arch: amd64
  • go/version: go1.26.3
  • go/linking: static
  • go/tags: cmount

Which cloud storage system are you using? (eg Google Drive)

Irrelevant.

The command you were trying to run (eg rclone copy /tmp remote:tmp)

function rclonegui() {
    Start "Rclone GUI" "C:\Portable_apps\rclone\rclone\rclone.exe gui" "--addr localhost:5580"
}

Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.

Irrelevant.

A log from the command that you were trying to run with the -vv flag

Irrelevant.

 
Further information

The following, run from a PowerShell terminal, works.

C:\Portable_apps\rclone\rclone\rclone.exe gui --addr localhost:5580

But trying to run that command via the function does not work. For, PowerShell throws an error when loading the profile that contains the function. If I remove the function from the profile and enter the function directly into PowerShell, and run that function, then the following happens.

function rclonegui() { Start "Rclone GUI" "C:\Portable_apps\rclone\rclone\rclone.exe gui" "--addr localhost:5580" }
$ rclonegui
Start-Process: A positional parameter cannot be found that accepts argument '--addr localhost:5580'.

I have tried several variants to no avail. The variants include:

  • not using 'Start';
  • combining the true arguments ('gui' and the '--addr' argument);
  • using a PowerShell alias rather than a PowerShell function.
PS C:\> & C:\Portable_apps\rclone\rclone.exe gui --addr localhost:5580 -vv
DEBUG : rclone: Version "v1.74.1" starting with parameters ["C:\\Portable_apps\\rclone\\rclone.exe" "gui" "--addr" "localhost:5580" "-vv"]
INFO  : No username specified. Using default username: gui
INFO  : No password specified. Using random password: pNotyyIV2TXmwahPyYUb-w
INFO  : Using --user gui --pass XXXX as authenticated user
NOTICE: Serving remote control on http://127.0.0.1:62441/
NOTICE: Serving GUI version 1.1.7 on http://127.0.0.1:5580/
NOTICE: GUI available at http://127.0.0.1:5580/login?pass=pNotyyIV2TXmwahPyYUb-w&url=http%3A%2F%2F127.0.0.1%3A62441%2F&user=gui

Jojo,

Thank you for your reply. I fail to understand that reply. Are you soliciting debugging output? Are you suggesting that I use a particular command within my PowerShell profile?

sorry, i misunderstood what you need help with.

these all work

# path of rclone.exe is NOT in $env:Path
function rclonegui() 
{ Start -FilePath "C:\Portable_apps\rclone\rclone.exe" -ArgumentList "gui --addr localhost:5580 -vv" }

# path of rclone.exe is in  $env:Path
function rclonegui() { rclone.exe gui --addr localhost:5580 -vv }

# add path to $env:Path
function rclonegui() {
$env:Path += ';C:\Portable_apps\rclone'
rclone.exe gui --addr localhost:5580 -vv }

Here is my guess

You need two arguments

 "--addr"  "localhost:5580" 

Or like this

 "--addr=localhost:5580"

also, these work

function rclonegui() {
start "C:\Portable_apps\rclone\rclone.exe" "gui --addr=localhost:5580"}
function rclonegui() {
start "C:\Portable_apps\rclone\rclone.exe" "gui --addr localhost:5580"}

Thanks all. I tried all of those variants within a batch file, and I think that they all worked (though getting a browser to launch seemed problemic). None of them worked via the profile. For instance,

function rclonegui() {
   start "C:\Portable_apps\rclone\rclone.exe gui" "--addr=localhost:5580"
}
produced

start "C:\Portable_apps\rclone\rclone.exe gui" "--addr=localhost:5 …
     |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | This command cannot be run due to the error: An error occurred trying to start process 'C:\Portable_apps\rclone\rclone.exe gui' with working directory 'C:\Users\nicholas'. The system cannot find the
     | file specified.

I see the problem. You've got an argument "gui" in the exe path.

Try

function rclonegui {
    Start-Process "C:\Portable_apps\rclone\rclone.exe" -ArgumentList 'gui', '--addr=localhost:5580'
}

Or

function rclonegui {
    & "C:\Portable_apps\rclone\rclone.exe" gui --addr=localhost:5580
}

Thanks, Nick. Both those options work. But no browser no opens. And trying to get a browser to open - from the function, or even just in a PowerShell terminal, or in a cmd.exe - does nothing, for some reason, and whichever way I try to start it and whether or not I use a portable Firefox installation.

that is working for me. firefox opens a new tab.

in windows settings, what is the default web browser?

Dear both, or all

Apologies: the problem was the program 'WindHawk', possibly in combination with the program 'Eset'; once Windhawk is unloaded, or firefox.exe is added to WindHawk's 'process exclusion' list, the following command works (as I suspect would several variants) when included within a function that itself resides within my PowerShell profile.

&"C:\Portable_apps\FirefoxESR\firefox.exe" '-foreground' '-new-tab http://127.0.0.1:5580' '-wait-for-browser' '-P "default-esr"'

That particular command launches a portable version of Firefox, in the foreground, in a new tab if the portable Firefox is running already, and with a particular Firefox 'profile'.