Here I go again with Barrier

Let me preface that I had worked out the issues with Barrier on Kubuntu 23.04. I had recently installed LM on an old computer I donated to a friend to switch to Linux. Having liked it, I added it to my Kubuntu with dual boot. Been running smoothly about 4 days now. Two issues I had recently gotten on Kubuntu were the printer not recognized (after years of use) and Barrier randomly stopping working AGAIN. After LM install, printer was instantly recognized and added (more on that in another topic) and setting up Barrier worked great across my dual boot & Windows 11 laptop. In fact, it worked this morning for me to copy a customer doc from W11 to LM.

But I could not get videos to play in the browser (Opera One) and knew I had all the codecs installed, so I switched driver from noveau to nvidia. Now I am not positive Barrier had stopped working prior to this, as I had not used it this afternoon. But after rebooting with nvidia driver, barrier reported ā€œno neighbor to the rightā€ on LM server. Stopped/restarted on both LM server & W11 client, still not working. Since the only change was the driver, I went back to noveau, rebooted, still no Barrier. AND, before reverting from nvidia, suddenly videos did not give me an error from all the sites, so wondering if the nvidia was the fix for that issue, but since reverting, they continue to play in Opera. Sheesh.

I have now tried the steps @Rosika gave me related to barrier running and here is the output in terminal:

~$ sudo systemctl is-enabled barrier.service
Failed to get unit file state for barrier.service: No such file or directory
~$ sudo systemctl enable barrier.service
Failed to enable unit: Unit file barrier.service does not exist.
~$ /usr/bin/barrierc
bash: /usr/bin/barrierc: No such file or directory

So any help on why this is happening or what changed will be much appreciated.

Thanks,
Sheila Flanagan

Since I cannot for the life of me figure this out, I uninstall/reinstalled on both machines, but this time in LM, I used the system package vs flathub to see if it made a difference. It did not. So I switched: made W11 the server and LM the client and dang if it did not start working.

If it dies again, Iā€™ll be backā€¦with a headache. :crazy_face:

Sheila Flanagan

1 Like

From the error message, it seems like the new systemd service for barrier was not even created.

2 Likes

Hi Shiela,
Just wondering, ā€¦ if barrier is so ill behaved , there is an alternative that does some
of the things barrier does.
You can use the X window system to display graphic output from an app running in a remote machine.
What you do is ssh into the remote machine, and use setenv display host:0.0 to direct any graphic output back to your local host. You can then start something like gimp in the ssh terminal, and its window will display locally.

I know, that is not a replacement for a full KVM, ā€¦ for example it does not show the full remote screen, only a window, but in some cases that would be sufficient. It will only work between machines running an Xserver.

Not sure it will cure your headache, but X11 has been around a long time and is reliable.
I use it thst way quite a lot.

Regards
Neville

1 Like

Hi Neville, :wave:

Is this the same as ā€œx-forwardingā€ with ssh connections?

I use it like this:

firejail ssh -X rosika2@192.168.122.174

(firejail is optional of course)

from ssh man pages:

Enables X11 forwarding. This can also be specified on a per-host
basis in a configuration file.

Cheers from Rosika :slightly_smiling_face:

1 Like

@abhishek not only that, but the LM (now client) keeps asking for a .conf file now, which is not to be found. This morning it stopped working, started for a bit, then stopped. I thought auto config creates the .conf file, but since this pop up appears each time I try to start it on LM, I am trying a few things, but if it still refuses to stay connected, work, etc. I donā€™t know what else to do. Let me see if I can get it running again, then I will save a .conf file. If I cannot, the issue you mentioned needs to be resolved.

Thanks,
Sheila Flanagan

Hi Rosika,
Not sure, I will have to test it.
Sounds like it might be the same , only built into ssh.
Regards
Neville

2 Likes

Thanks, Neville. :wave:

Until now IĀ“ve used the command just with virtual machines and it worked well.

I know ssh-ing into the laptop works the same way, so the command should work there as well. Of course IĀ“ll also test it next time I power up the laptop.

Many greetings from Rosika :slightly_smiling_face:

@nevj see my reply to @abhishek but since I know nothing about your suggestion, let me just say what I need most from a solution like Barrier:

Rather than have to download an item from Mega that resides on the W11 pc, I can just copy it (or contents of anything) from there to my Linux pc. And not just files, but anything I can see on one can be copied and pasted between them.

I have a mouse/keyboard that is bluetooth with switches for 3 machines. I can simply hit the button for the one I need to use and can switch between them easily. But I cannot seem to copy/paste from one to the other, even though Iā€™m pretty sure Logitech claimed I could (maybe it meant between Windows machines, idk).

Addiitonally, it delays the actions (having to hit the switch button) and as fast as I work/type, I often find I forgot to hit the switch and am now typing on the wrong machine.

I am gonna try again to get this working as it was last night and see if I can resolve the .conf file and what Abhishek referred to. After that, I need to understand your solution and see if displaying the graphics from W11 means I can actually copy anything in that display.

Thanks, and Iā€™ll be back.

Sheila

Hi Rosika,
I did some reading.
Looks like I have been doing it the old fashioned way by setting the default X display variable in the remote environment.
Ssh does it automatically. If @Sheila_Flanagan tries it, she should use the modern ssh method.

Sounds like @Sheila_Flanagan needs more than X forwarding. Doesnt hurt to know about it , evdn if it does not help with current needs.

Thanks for clarifying that
Neville

1 Like

Thanks, Neville, for the feedback. :+1:

IĀ“m not quite sure whether I understood all of what Sheila is trying to achieve.
But if itĀ“s downloading contents from another machine wouldnĀ“t the sftp command and using get from within a running instance of it be a practicable solution?

ā€¦ just a thought.

Cheers from Rosika :slightly_smiling_face:

1 Like

@Rosika I do not want to ā€˜downloadā€™ as I have Mega for that. I want to be able to copy a line of text in a file open on one machine and paste it into a different machine. I want to copy an image on one machine and paste it into my notebook on the other. Things like this are why I searched and found Barrier.

If I cannot get it working, I need to look into what @nevj suggested, and as he said, it might not be the total solution, but it could help.

Thanks,
Sheila Flanagan

1 Like

Sorry, Sheila, it seems I misunderstood. :blush:

I didnĀ“t know what ā€œMegaā€ is, so I looked it up:

ā€œMEGA is a secure cloud storage service with end-to-end encryption that lets you upload
files to the cloud on Windows, Mac, Linux, Android and iOS.ā€

When using the term"downloading" I meant downloading contents from one machine to another, in a direct way, not via cloud.

Therefore my suggestion of using the sftp command (OpenSSH secure file transfer), which works directly between machines.

I thought that was what were afterā€¦ Sorry again. :neutral_face:

Many greetings from Rosika :slightly_smiling_face:

@Rosika right. But I do not want to download files, I only wish to copy portions of text or copy images that reside on one machine and paste them into another machineā€™s app. The point being I do not need to have the actual files residing on both machines (taking up disk space) I just need some of the text or an image from certain things to be able to be copied from one and pasted to another. I even use copying a link in a browser from one to the other so I do not have to type it in again.

Thanks,
Sheila

1 Like

icloud is a folder in home in Linux Mint and a disk in Windows. No downloading. I believe a person gets 4 or 6 GB for free. Just a thought. Not familiar with benefits of Barrier, but icloud is sure easy to install and use.

1 Like

@easyt50 Mega has the same folder. It is for downloading items from the cloud, which all my 6 machines back up to. Barrier shares mouse/keyboard so that you can copy a block of text, an image displayed, etc. from one machine by right-clicking ā€˜copyā€™ and then moving to the other machine and ā€˜pastingā€™.

Thanks,
Sheila

2 Likes

@abhishek I have tried uninstalling/reinstalling (both apt & flatpak) but still it is not working. My latest try in terminal:
libdvd-pkg: `apt-get check` failed, you may have broken packages. Aborting...
And I still get the same results from:

Failed to get unit file state for barrier.service: No such file or directory
myviolinsings@mint-desktop:~$ sudo systemctl enable barrier.service
Failed to enable unit: Unit file barrier.service does not exist.

What else can I try?

Thanks,
Sheila Flanagan

You can do both of those examples with ssh and X forwarding, but probably not as conveniently as with barrier. I am not sure how Mega fits into this?
If you need to transfer whole files, use sftp or scp, as Rosika suggested.

1 Like

@nevj then this is what I need to learn. I have seen ssh, not X forwarding. Mega was mentioned as it is the cloud drive and some thought I wanted to transfer the file, image from one machine to anotherā€“I do not. So explain your answer so that I can understand what those commands mean and how to use them to copy an image open on one machine (W11 or Linux) and paste on the other; how to highlight a block of text or web address and copy and paste it to the other. And as for convenienceā€¦Barrier not working is taking too much time, days, convenience is relative. :grinning:

Thanks,
Sheila

Hi Shiela,
OK, I will put together a demo with illustrations.
It will take me a while, like a day, can you be patient?
Neville