Saturday, July 19, 2014

Using Alien to Convert .DEB to .RPM and get Chrome-Remote-Desktop working on Fedora

From the alien manual:
alien is a program that converts between Red Hat rpm, Debian deb, Stampede slp, Slackware tgz, and Solaris pkg file formats. If you want to use a package from another linux distribution than the one you have installed on your system, you can use alien to convert it to your preferred package format and install it. It also supports LSB packages.

First things first, you need to get Chrome and the Remote Desktop Application it offers.
Once you try to Share your Computer, a notification message will appear about the need to install a package on your Operating System and a Download will commence.

At the time of this writing the file on Fedora 20 KDE which got downloaded was
chrome-remote-desktop_current_amd64.deb
which of course is not an RPM file and must be converted first.

In case you do not have alien
$sudo yum install alien -y

Next, convert the .deb to .rpm
$alien chrome-remote-desktop_current_amd64.deb -r

and now try to install the converted file
$sudo yum localinstall chrome-remote-desktop-36.0.1985.102-2.x86_64.rpm

The transaction test may fail complaining that:
Transaction check error:
  file / from install of chrome-remote-desktop-36.0.1985.102-2.x86_64 conflicts with file from package filesystem-3.2-19.fc20.x86_64
  file /etc/init.d from install of chrome-remote-desktop-36.0.1985.102-2.x86_64 conflicts with file from package chkconfig-1.3.60-4.fc20.x86_64
This is a problem from the alien converter.
To fix it we need another program called rpmrebuild so install it if you do not have it already...
$sudo yum install rpmrebuild -y

Now you need to issue
$rpmrebuild -pe chrome-remote-desktop-36.0.1985.102-2.x86_64.rpm

You will probably get VI edit, so search for the '%files' section remove all the lines that refer to already
existing directories such as:
%dir %attr(0755, root, root) "/"
%dir %attr(0755, root, root) "/etc"
%dir %attr(0755, root, root) "/etc/cron.daily"
%dir %attr(0755, root, root) "/etc/init.d"
%dir %attr(0755, root, root) "/etc/opt"
%dir %attr(0755, root, root) "/etc/opt/chrome"
%dir %attr(0755, root, root) "/etc/pam.d"
%dir %attr(0755, root, root) "/opt"
%dir %attr(0755, root, root) "/opt/google"
%dir %attr(0755, root, root) "/usr"
%dir %attr(0755, root, root) "/usr/share"
%dir %attr(0755, root, root) "/usr/share/doc"

Now write your changes and exit VI
(by pressing Shift plus : and then wq and enter)

It will ask about rebuild, press Y and enter.
Now wait, it could take a couple of minutes without any progress notification.

Finally, the file ~/rpmbuild/RPMS/x86_64/chrome-remote-desktop-36.0.1985.102-2.x86_64.rpm
will be generated which you can successfully install without the transaction errors...

$sudo yum localinstall ~/rpmbuild/RPMS/x86_64/chrome-remote-desktop-36.0.1985.102-2.x86_64.rpm -y

Now you can head to Chrome, open the Remote Desktop App, click the Share button and get the Access Code to share!

8 comments:

  1. Thanks worked great on Fedora 21

    ReplyDelete
  2. OMG, it Works !
    Thank you so much ! ! !

    ReplyDelete
  3. Novice question: I'm not getting the $alien chrome-remote-desktop_current_amd64.deb -r command to work. Getting a "command not found" error. I logged on as root and ran the yum install alien, then logged out and back in as my regular user account. Not sure if I'm pointing it to the right directory or if it's a rights issue. Just installed Centos 7 this morning.

    ReplyDelete
  4. Hi Nice post,
    I'm using Redhat 6
    In my machine "rpmrebuild" tool is not there, I've "rpmbuild" tool when im trying to excute "rpmbuild -pe chrome......xx" its showing error like "-pe unknow option" then i open help for -pe is not there, -bc, -bp, -bi .. options are there but its asking specfic file...
    So how can I go for next step..?
    Can you guide me?

    ReplyDelete
  5. Tried on Fedora 22 x86_64 with Cinnamon. Works flawlessly :)

    ReplyDelete
  6. Works fine on Fedora 23. Thanks!

    ReplyDelete
  7. It works on CentOS Linux release 7.2.1511 (Core)
    Linux tinca 3.10.0-327.13.1.el7.x86_64 #1 SMP Thu Mar 31 16:04:38 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
    mate-desktop

    ReplyDelete