LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Bodhi
User Name
Password
Bodhi This forum is for the discussion of Bodhi Linux.

Notices


Reply
  Search this Thread
Old 05-25-2020, 08:15 AM   #1
Rosika
Member
 
Registered: Apr 2017
Distribution: Lubuntu 64 bit
Posts: 280

Rep: Reputation: Disabled
Bodhi in VM: 2 desktop environments installed - problems with copy-and-paste (spice)


Hi altogether,

Iīve encountered a peculiar problem lately which puzzles me quite a bit.

Hereīs what Iīve done:

Iīve been running BodhiLinux (32 bit, latest version, up-to-date) in a virtual machine (qemu/kvm) for quite a while now. My host is Linux/Lubuntu 18.04.4 LTS, 64 bit (also up-to-date).

In order to make copy-and-paste from clipboard work I installed spice-client on my host:

Code:
sudo apt-get install spice-client-gtk
sudo apt-get install python-spice-client-gtk

and spice-vdagent on my guest (Bodhi):
Code:
sudo apt-get install spice-vdagent
.

This works very well. The only thing Iīve got to do is start it on Bodhi with
Code:
spice-vdagent
. Then clipboard exchange works for the duration of the session (both directions).

Out of curiosity I installed a 2nd desktop-environment on Bodhi (still my VM) with
Code:
sudo apt-get install lubuntu-core
.
That works fine as well and itīs easy to select the respective desktop-environment at start.

The only thing which gives me problems is spice.

Starting spice with "spice-vdagent" in Bodhi seems to fail now.
"systemctl status spice-vdagent" produces a red line which says:

Code:
multiple agents in one session, disabling agent to avoid potential information leak
[and]
closed vdagent virtio channel
.

On another occasion I got this:

Code:
spice-vdagent.service: Canīt open PID file /var/run/spice-vdagentd/spice-vdagentd.pid (yet?) after start: No such file or directory
.
This was connected to time-mark 13:53:26.

BUT: "ll /var/run/spice-vdagent" gave me two entries:

"spice-vdagentd.pid" and "spice-vdagent-stock=" both with a time-mark of 13:53 !

So "spice-vdagentd.pid" was created and available after all.

I have no idea why I keep running into that kind of problem. The only explanation Iīve got is that it must have something to do with the fact that I have two desktop environments installed (moksha and LXDE) although only one of them is running at any given time of course.

Bodhi-VM running with moksha alone DOESNīT produce any problems with spice.

Does anybody know a solution to that?

Thanks a lot in advance.
Greetings.
Rosika
 
Old 05-26-2020, 02:23 PM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Apparently only one instance of spice-vdagent can run on a system.
If it's started via systemd you don't need to start it manually.
So reboot your vm, do NOT start spice-vdagent manually, and show us:
Code:
systemctl status spice-vdagent
systemctl is-enabled spice-vdagent
 
3 members found this post helpful.
Old 05-27-2020, 06:18 AM   #3
Rosika
Member
 
Registered: Apr 2017
Distribution: Lubuntu 64 bit
Posts: 280

Original Poster
Rep: Reputation: Disabled
@ondoho:

Hello and thank you so much for your reply.

Quote:
Apparently only one instance of spice-vdagent can run on a system.
If it's started via systemd you don't need to start it manually.
Well, Iīll be blessed. It seems youīre perfectly right in your assumption that spice-vdagent has already started.

Hereīs the output of Bodhi VM, the version with 2 desktop environments installed (moksha and LXDE):

Code:
systemctl status spice-vdagent
● spice-vdagentd.service - Agent daemon for Spice guests
   Loaded: loaded (/lib/systemd/system/spice-vdagentd.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2020-05-27 12:41:18 CEST; 2min 15s ago
  Process: 451 ExecStart=/usr/sbin/spice-vdagentd $SPICE_VDAGENTD_EXTRA_ARGS (code=exited, status=0/SUCCESS)
  Process: 448 ExecStartPre=/bin/rm -f /var/run/spice-vdagentd/spice-vdagent-sock (code=exited, status=0/SUCCESS)
 Main PID: 452 (spice-vdagentd)
    Tasks: 1 (limit: 2306)
   CGroup: /system.slice/spice-vdagentd.service
           └─452 /usr/sbin/spice-vdagentd

Mai 27 12:41:18 rosika2-Standard-PC-i440FX-PIIX-1996 systemd[1]: Starting Agent daemon for Spice guests...
Mai 27 12:41:18 rosika2-Standard-PC-i440FX-PIIX-1996 systemd[1]: spice-vdagentd.service: Can't open PID file /var/ru
Mai 27 12:41:18 rosika2-Standard-PC-i440FX-PIIX-1996 systemd[1]: Started Agent daemon for Spice guests.
Mai 27 12:42:35 rosika2-Standard-PC-i440FX-PIIX-1996 spice-vdagentd[452]: opening vdagent virtio channel
Mai 27 12:42:35 rosika2-Standard-PC-i440FX-PIIX-1996 spice-vdagentd[452]: Set max clipboard: 104857600
lines 1-15/15 (END)


systemctl is-enabled spice-vdagent
enabled
And indeed, clipboard exchange worked immediately after booting Bodhi.

As a a second step I performed the same procedure with my other Bodhi VM.
Hereīs the output of Bodhi VM, the version with just one desktop environment installed (moksha):

Code:
systemctl status spice-vdagent
● spice-vdagentd.service - Agent daemon for Spice guests
   Loaded: loaded (/lib/systemd/system/spice-vdagentd.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2020-05-27 12:47:24 CEST; 3min 11s ago
  Process: 457 ExecStart=/usr/sbin/spice-vdagentd $SPICE_VDAGENTD_EXTRA_ARGS (code=exited, status=0/SUCCESS)
  Process: 404 ExecStartPre=/bin/rm -f /var/run/spice-vdagentd/spice-vdagent-sock (code=exited, status=0/SUCCESS)
 Main PID: 460 (spice-vdagentd)
    Tasks: 1 (limit: 2306)
   CGroup: /system.slice/spice-vdagentd.service
           └─460 /usr/sbin/spice-vdagentd

May 27 12:47:19 rosika2-Standard-PC-i440FX-PIIX-1996 systemd[1]: Starting Agent daemon for Spice guests...
May 27 12:47:24 rosika2-Standard-PC-i440FX-PIIX-1996 systemd[1]: spice-vdagentd.service: Can't open PID file /var/run/spice-vda
May 27 12:47:24 rosika2-Standard-PC-i440FX-PIIX-1996 systemd[1]: Started Agent daemon for Spice guests.


systemctl is-enabled spice-vdagent
enabled
Here clearly these entries are missing:

Code:
opening vdagent virtio channel
 Set max clipboard: 104857600
HOWEVER: After starting spice with "spice-vdagent" those lines were added:

Code:
systemctl status spice-vdagent
● spice-vdagentd.service - Agent daemon for Spice guests
   Loaded: loaded (/lib/systemd/system/spice-vdagentd.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2020-05-27 12:47:24 CEST; 4min 32s ago
  Process: 457 ExecStart=/usr/sbin/spice-vdagentd $SPICE_VDAGENTD_EXTRA_ARGS (code=exited, status=0/SUCCESS)
  Process: 404 ExecStartPre=/bin/rm -f /var/run/spice-vdagentd/spice-vdagent-sock (code=exited, status=0/SUCCESS)
 Main PID: 460 (spice-vdagentd)
    Tasks: 1 (limit: 2306)
   CGroup: /system.slice/spice-vdagentd.service
           └─460 /usr/sbin/spice-vdagentd

May 27 12:47:19 rosika2-Standard-PC-i440FX-PIIX-1996 systemd[1]: Starting Agent daemon for Spice guests...
May 27 12:47:24 rosika2-Standard-PC-i440FX-PIIX-1996 systemd[1]: spice-vdagentd.service: Can't open PID file /var/run/spice-vdagentd/spice-vdagentd.pid (y
May 27 12:47:24 rosika2-Standard-PC-i440FX-PIIX-1996 systemd[1]: Started Agent daemon for Spice guests.
May 27 12:51:21 rosika2-Standard-PC-i440FX-PIIX-1996 spice-vdagentd[460]: opening vdagent virtio channel
May 27 12:51:21 rosika2-Standard-PC-i440FX-PIIX-1996 spice-vdagentd[460]: Set max clipboard: 104857600
and clipboard exchange works.

So, to sum up:

Thereīs definitively a difference in spice-vdagent behaviour as far as the two Bodhi installations are concerned.

By installing LXDE as a second desktop-environment spice-bahaviour has changend in such a way that it now starts automatically after login.
Thatīs not the case with Bodhi (moksha as single desktop).

As I didnīt know that I tried to start it anyway which resulted in the described problem.

So thanks a lot again for helping to clarify this phenomenon.
I surely couldnīt have done it on my own.

Many greetings and good health.
Rosika
 
1 members found this post helpful.
Old 05-28-2020, 02:17 AM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Is it clear now, SOLVED?
Looking at your output, there seems to be 2 different binaries: spice-vdagentd and spice-vdagent.
To make matters more confusing, the systemd spice-vdagent.service actually starts the spice-vdagentd binary. This is definitely bad style, the service should be called spice-vdagentd.service.
Since I know nothing about this software and how these two binaries interact, I can only point this out, and not suggest a solution.
Are you saying the clipboard thingimajick works without explicitely starting spice-vdagent on one system, but not the other?
Is that SOLVED now?
 
Old 05-28-2020, 06:44 AM   #5
Rosika
Member
 
Registered: Apr 2017
Distribution: Lubuntu 64 bit
Posts: 280

Original Poster
Rep: Reputation: Disabled
Hi ondoho and thanks for your reply,

Quote:
Is that SOLVED now?
Yes, thanks. I already marked this thread as "solved".

Quote:
Are you saying the clipboard thingimajick works without explicitely starting spice-vdagent on one system, but not the other?
Yes, thatīs exactly it.

spice-vdagent is needed to get clipboard exchange working when using qemu as qemu doesnīt provide such a facility per default (https://wiki.ubuntuusers.de/QEMU/#QEMU-per-VNC [in German]).
All that is needed to achieve this is spice-client-gtk in the host and spice-vdagent in the guest.

When using Bodhi as a "normal" installation with just moksha as the single desktop-environment spice-vdagent has to be started manually with the command spice-vdagent.

Apparently the other Bodhi installation with moksha AND LXDE does that automatically.

I installed LXDE desktop with the command
Code:
sudo apt-get install lubuntu-core
.

As described at https://wiki.ubuntuusers.de/LXDE_Ins...ufendes-System besides installing LXDE additional programmes would be installed by that command as well.
I think thatīs probably why the 2nd Bodhi installation handles things differently.
One of those additionally installed programmes surely takes care of that.

Greetings.
Rosika
 
1 members found this post helpful.
Old 05-28-2020, 07:04 PM   #6
cordx
Member
 
Registered: Oct 2018
Location: texas
Distribution: bodhi 5.1.0
Posts: 797

Rep: Reputation: 184Reputation: 184
thanks for a bit of a description about what spice does. i had run across a page a while back that suggested installing it, but not really what it would do
 
Old 05-30-2020, 06:51 AM   #7
Rosika
Member
 
Registered: Apr 2017
Distribution: Lubuntu 64 bit
Posts: 280

Original Poster
Rep: Reputation: Disabled
Hi cordx,

youīre welcome.

I had to look around a bit as well for finding a solution for clipboard exchange in quemu.
Spice works well and the respective packages are quickly installed (host and guest).

Have a nice weekend.
Greetings.
Rosika
 
1 members found this post helpful.
Old 05-31-2020, 10:44 AM   #8
Rosika
Member
 
Registered: Apr 2017
Distribution: Lubuntu 64 bit
Posts: 280

Original Poster
Rep: Reputation: Disabled
additional info:

Hi,

I just got myself up to look up autostart-entries in Bodhi (with LXDE installed).

LXSession Configuration is the place to go.
Command:
Code:
lxsession-default-apps
And indeed I found the entry "Spice vdagent", and it was checked.
So basically thatīs solved then. And itīs a confirmation that LXDE installation (sudo apt-get install lubuntu-core) has taken care of that.

If I want to have that convenience in moksha Iīd have to put "spice-vdagent" in autostart as well.
Iīll have to look up how thatīs done.

Greetings.
Rosika
 
1 members found this post helpful.
Old 05-31-2020, 11:12 AM   #9
enigma9o7
Senior Member
 
Registered: Jul 2018
Location: Silicon Valley
Distribution: Bodhi Linux
Posts: 1,389

Rep: Reputation: 560Reputation: 560Reputation: 560Reputation: 560Reputation: 560Reputation: 560
Quote:
Originally Posted by Rosika View Post
If I want to have that convenience in moksha Iīd have to put "spice-vdagent" in autostart as well.
Iīll have to look up how thatīs done.
~/.e/e/applications/startup/startupcommands
 
2 members found this post helpful.
Old 05-31-2020, 04:29 PM   #10
cordx
Member
 
Registered: Oct 2018
Location: texas
Distribution: bodhi 5.1.0
Posts: 797

Rep: Reputation: 184Reputation: 184
Quote:
Originally Posted by enigma9o7 View Post
~/.e/e/applications/startup/startupcommands

thanks for the info. i had been wondering about that location as well
 
Old 06-01-2020, 06:54 AM   #11
Rosika
Member
 
Registered: Apr 2017
Distribution: Lubuntu 64 bit
Posts: 280

Original Poster
Rep: Reputation: Disabled
Hi enigma9o7,

thanks for the info of how itīs done. Much appreciated.

Following your hint regarding the startupcommands-file Iīm not quite sure as far as syntax is concerned.
My current single entry in that file is:

Code:
xrandr --output Virtual-3 --off --output Virtual-2 --off --output Virtual-1 --off --output Virtual-0 --primary --mode 1440x900 --pos 0x0 --rotate normal
Basically Iīd have to add "spice-vdagent" as a second command.

It says on https://www.bodhilinux.com/w/configu...a_Command_Line :

Quote:
[...] adding commands to be executed when Moksha starts is using editing the file below file; both lines were added with a text editor:

.e/e/applications/startup/startupcommands
Below are two examples:

conky -p 1 -d | \
compton -b
Brief explanation of commands:

-p (seconds) makes conky pause before it starts

-d makes conky work as a daemon

| (the pipe symbol) is needed between two different commands in this file

\ (backslash) causes the next character to be interpreted differently, in this case needed to have the enter key function as “New Line”

-b makes compton run in the background
If I understand correctly Iīd have to use whitespace, the pipe symbol followed by whitespace again and then backslash after the 1st command and then enter the 2nd command in a new line.

So in my case it would have to look like this:

Code:
xrandr --output Virtual-3 --off --output Virtual-2 --off --output Virtual-1 --off --output Virtual-0 --primary --mode 1440x900 --pos 0x0 --rotate normal | \
spice-vdagent
Hopefully this syntax is correct. Would you be so kind as to confirm that, if possible?

Thank you so much for your help.

Greetings.
Rosika
 
1 members found this post helpful.
Old 06-01-2020, 10:42 AM   #12
enigma9o7
Senior Member
 
Registered: Jul 2018
Location: Silicon Valley
Distribution: Bodhi Linux
Posts: 1,389

Rep: Reputation: 560Reputation: 560Reputation: 560Reputation: 560Reputation: 560Reputation: 560
No pipes or backslash. The commands are executed in sequence. Conky or compton are unique cases, cuz when you run them, they don't return the command prompt. So unless they're the lass command in your startupcommands, they need something (I usually used &) at the end to make the next line run.

But xrandr is not like that. It sets your display then exits. So you can put your command on the next line no problem.

Last edited by enigma9o7; 06-01-2020 at 10:43 AM.
 
2 members found this post helpful.
Old 06-02-2020, 06:57 AM   #13
Rosika
Member
 
Registered: Apr 2017
Distribution: Lubuntu 64 bit
Posts: 280

Original Poster
Rep: Reputation: Disabled
Hi enigma9o7,

thank you very much for clarifying the matter.

Thanks to your explanation Iīve learnt something new again.

Quote:
No pipes or backslash. The commands are executed in sequence.
I see. So thatīs one command per (new) line

And it works!
Iīve just edited ~/.e/e/applications/startup/startupcommands with nano that way:

Code:
xrandr --output Virtual-3 --off --output Virtual-2 --off --output Virtual-1 --off --output Virtual-0 --primary --mode 1440x900 --pos 0x0 --rotate normal
spice-vdagent
After that I started Bodhi anew (even a cold start for that matter).
And without further ado spice-vdagent did indeed start all by itself.

So thatīs what I call comfort. Iīm really pleased.
Just another point in favour of BodhiLinux.

On a sidenote:

I recently installed Bodhi 64 bit for a friend of mine whose recently acquired laptop (HP 15-db0400ng) almost came to a grinding halt when even trying to struggle with WIN10 (preinstalled).
Now with Bodhi running on that laptop it can be considered as the sheer definition of smoothness and elegance.
It works perfectly now.

So thanks a lot again for your kind help.

Greetings.
Rosika
 
1 members found this post helpful.
Old 06-02-2020, 07:17 AM   #14
the_waiter
Bodhi Developer
 
Registered: Jun 2018
Location: Banská Bystrica, Slovakia
Distribution: Bodhi Linux
Posts: 864

Rep: Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665
enigma9o7: enable your reputation on the forum. It is our only salary
 
1 members found this post helpful.
Old 06-02-2020, 07:18 AM   #15
the_waiter
Bodhi Developer
 
Registered: Jun 2018
Location: Banská Bystrica, Slovakia
Distribution: Bodhi Linux
Posts: 864

Rep: Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665
Quote:
Originally Posted by Rosika View Post

Now with Bodhi running on that laptop it can be considered as the sheer definition of smoothness and elegance.
It works perfectly now.
Nice words thx
 
2 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Preventing the screen copy and paste error on first paste slackartist Slackware 0 04-03-2016 06:48 PM
LXer: Set up qemu-kvm-1.0+noroms as spice enabled qemu server vs qemu-kvm-spice on Ubuntu Precise LXer Syndicated Linux News 0 05-26-2012 07:41 AM
LXer: Qemu-kvm 1.0 & Spice-protocol 0.10.1 & Spice-Gtk 0.8 USB Redirection on Ubuntu Precise LXer Syndicated Linux News 0 01-19-2012 03:00 PM
LXer: Qemu-kvm 1.0 & Spice 0.10 & Spice-Gtk 0.7.159 & Libusb 1.0.9-rc3 (official) for Ubuntu Precise LXer Syndicated Linux News 0 12-27-2011 02:50 PM
LXer: Qemu-kvm 1.0 & Spice 0.10.0 & Spice-Gtk-0.7.81 USB redirection for Ubuntu Precise and Oneiric LXer Syndicated Linux News 0 11-30-2011 08:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Bodhi

All times are GMT -5. The time now is 12:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration