Bug 1122447 - xdg-open cannot open virt-viewer connection file with right application over ssh
Summary: xdg-open cannot open virt-viewer connection file with right application over ssh
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: xdg-utils
Version: 7.1
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Alexander Larsson
QA Contact: Desktop QE
Depends On:
Blocks: 1134653
TreeView+ depends on / blocked
Reported: 2014-07-23 09:43 UTC by CongDong
Modified: 2014-08-29 08:16 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1134653 (view as bug list)
Last Closed: 2014-08-29 08:16:00 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description CongDong 2014-07-23 09:43:16 UTC
Description of problem:
when login the host over ssh, xdg-open cannot open virt-viewer connection with right application(remote-viewer)

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. start a spice guest with qxl on host A
# virsh dumpxml $guest_name
    <graphics type='spice' port='5901' autoport='yes' listen=''>
      <listen type='address' address=''/>
      <model type='qxl' ram='65536' vram='65536' heads='1'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
2. Prepare a connection file for the guest:
# cat console.vv
3. open console.vv with xdg-open
#xdg-open console.vv
4. login host A on another host B over ssh, and try to open consolve.vv with xdg-open
# ssh root@$host_A_ip -X
# xdg-open console.vv

Actual results:
Step3, a remote-viewer window comes out and connect the guest, this is expected.
Step4, the file console.vv is opened by gedit, this is not right.

Expected results:
Step4, the file should not be opened by gedit, remote-viewer should connect the guest.

Additional info:

Comment 2 Alexander Larsson 2014-08-29 08:16:00 UTC
As in bug 1134653, this works as "expected". xdg-open is really a desktop environment tool, it will not work in a "raw" ssh login. You can either directly use whatever desktop-specific open too you want, or you can set/forward the right environment variables from your source desktop machine into the ssh session so that the right environment is picked up.

Picking different default applications for a file for different desktop environments is "works as intended".

Note You need to log in before you can comment on or make changes to this bug.