2

Trying to add a desktop environment to Ubuntu Server 13.10. The machine is offline and needs to stay that way for a while. I burned the Ubuntu Destop ISO (ubuntu-13.10-desktop-amd64.iso, nabbed here) to a DVD and tried to use apt to install ubuntu-desktop like so:

# add cdrom to apt repos
apt-cdrom add 
# "apt-cdrom ident" and a look in sources.list confirmed that this worked

# refresh sources
apt-get update

# install ubuntu-desktop from DVD
apt-get install ubuntu-desktop 
# fails, package not found

However, ubuntu-desktop doesn't appear to be present. (ubuntu-minimal and ubuntu-standard both are, FYI.) Have I downloaded the wrong image? Is there a better source?

Thanks so much for your help!

  • You forgot to include the link. Also, you might be interested in the approaches described here. – terdon Mar 25 '14 at 16:24
  • 1
    The ubuntu-desktop package would not be present on a server installation. To add it, see the link terdon posted. – fooot Mar 25 '14 at 16:33
  • @user4186 that's a good point, the ISO probably doesn't contain the package. Why not post an answer explaining that? – terdon Mar 25 '14 at 17:08
  • 1
    @terdon You guys are great, thank you so much. But I'm still missing something... I downloaded the Ubuntu Desktop ISO. I would think that would have to have desktop packages present. If not on the Ubuntu Desktop ISO, then where? Thanks again, so much. – Andrew LaPrise Mar 25 '14 at 19:37
  • 1
    @terdon I think my previous comment just reiterated my original question, so I'm not sure that my original issue has been solved. Maybe I worded something poorly? I said in the original question that I downloaded the Desktop ISO and used apt-cdrom to add it to my sources. But I suppose I could listed my other commands more thoroughly. Would it be poor form to just edit this question to include all of my commands, or should I actually start a new question with the same issue but more information? – Andrew LaPrise Mar 25 '14 at 20:19
1

The ubuntu-desktop package is used to pull in all of the graphical packages, like Xorg, Gnome, Unity, etc. (see here for a list).

As such, you won't find the ubuntu-desktop package on a server installation disk.

You can find a list of these "metapackages" here.

0

-Hello! I hope you can try to get the ISO here, http://distrowatch.com/?newsid=08111 on this site could have good results when I had some problems for packages ...

0

I recently found myself in a similar situation. I needed a way to get xorg (just xorg, not the full ubuntu-desktop) onto an offline Ubuntu Server. I figured, “Hey, Ubuntu Desktop has it, it must be on the DVD.” Sadly, it turns out the common suggestion to use apt-cdrom to install packages offline from the Desktop Edition DVD is a bit outdated, or at least unfortunately unspecific. Supposedly (“supposedly” because I haven’t confirmed this for myself yet…) the procedure only works with the Alternate Desktop Edition DVDs (i.e. Kubuntu/Lubuntu/Xubuntu — see here for more information) and not the official Ubuntu Desktop Edition DVD. From what I can gather, the official Desktop DVD images have had the on-disc software repository severely stripped down to reduce filesize since around version 10.04 (or possibly even earlier):

$ sudo mount /dev/cdrom /media/cdrom  # ubuntu-14.04.4-server-amd64.iso
$ du -ach /media/cdrom/pool
[…]
461M total

$ sudo umount /dev/cdrom
$ sudo mount /dev/cdrom /media/cdrom  # ubuntu-14.04.4-desktop-amd64.iso
$ du -ach /media/cdrom/pool
[…]
5.0M total

Don’t worry, though. If you’re in an area with a limited interenet connection and all you have to work with are the official Desktop and Server DVDs, you are not without recourse. And no, you don’t have to start from a Desktop install and work your way backwards by stripping things out that you don’t need from Desktop and installing stuff you do need from Server. That method works, but it’s quite time consuming. It would be better to start from a Server install and only add those things from the Desktop DVD which you know you need. To do that, you’ll have to rebuild the software repository from the compressed filesystem on the Desktop DVD. Once done, though, you’ll have a fully offline software repository containing most things present in the Desktop Edition of the OS, and should be able to install anything from the Desktop Edition that you might need:

# Comment out everything in sources.list
# For an offline system, it's not needed
$ cp -v /etc/apt/sources.list ./sources.list.orig
$ awk '{print "# " $0}' sources.list.orig >sources.list

# Get dpkg-repack from the Server DVD
# Might as well get build-essential too, while you're at it
$ sudo mount /dev/cdrom /media/cdrom  # ubuntu-14.04.4-server-amd64.iso
$ sudo cp -v sources.list /etc/apt/
$ sudo apt-cdrom -d /media/cdrom -m -a --no-auto-detect add
$ sudo apt-get update
$ sudo apt-get -y install build-essential dpkg-repack
$ sudo umount /dev/cdrom

# Mount the compressed filesystem from the Desktop DVD
$ sudo mount /dev/cdrom /media/cdrom  # ubuntu-14.04.4-desktop-amd64.iso
$ sudo mkdir /mnt/fs.sfs
$ sudo mount /media/cdrom/casper/filesystem.squashfs /mnt/fs.sfs \
>     -t squashfs -o loop

# Create an offline repository from the Desktop DVD
# NOTE: this will take about 30 minutes to complete
$ cd /var/cache/apt/archives
$ sudo chroot /mnt/fs.sfs dpkg --get-selections | awk '{print $1}' | \
> while IFS="" read -r pkg; do
>   sudo dpkg-repack --root /mnt/fs.sfs "$pkg"
> done
$ cd -

# Create the offline repository from the collection of DEBs and update apt
$ dpkg-scanpackages /var/cache/apt/archives | gzip -9c >Packages.gz
$ sudo mv -v Packages.gz /var/cache/apt/archives/
$ echo "deb file:/var/cache/apt/archives ./" >>sources.list
$ sudo mv -v sources.list* /etc/apt/
$ sudo apt-get update

Once all that’s done, you should be good-to-go:

$ suto apt-get install xorg

(Replace xorg with ubuntu-desktop or whatever else you might need.)

If you ever get internet access later on and want to update any packages, just restore /etc/apt/sources.list.orig and run apt-get update to get apt back into an online mode of operation.

Obligatory “A GUI on a Server is Almost Always a Bad Idea™” Warning

Conventional wisdom states that in most cases it is better to not install a GUI on a production server. Several preferable user interface alternatives for managing servers are presented.

ServerGUI page on the Ubuntu Community Help Wiki

There are some legitimate use-cases for having a GUI on a server, but they’re usually few and far between. Still, depending upon the server, the environment, the intended use-case for the server, etc., it usually does pose an increased security risk (especially if you’re installing outdated stuff from the DVDs rather than using the latest stuff from the online repositories) so it’s good to be aware of the negative consequences to such a configuration. The above link has some good information on the topic, and as the larger discussion is out of the scope of the actual question, I’ll now leave to the reader both the task of doing the proper research, and also the responsibility of making an informed decision one way or the other.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.