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!

terdon
  • 242,166
  • 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
  • Yes, the Desktop should have it. Both answers are relevant though, you also need to run apt-get update to refresh the list of available sourced after adding the new CD. – terdon Mar 25 '14 at 19:53
  • @terdon Yes, I've been doing all of this from the start. I used apt-cdrom to add a Desktop DVD to the sources, then called apt-update, checked sources.list (to be sure), and then used apt-cache search to find any desktop package I could. Nothing. What else could I be doing wrong? I'm assuming I'm missing something pretty trivial... Is my administration greenness showing much...? – Andrew LaPrise Mar 25 '14 at 20:08
  • OK, in that case, since people have answered (and kinda solved) your original issue, could you accept one of the answers and post a new question? Make sure to include all the commands you ran and your sources.list files so we don't reinvent the wheel – terdon Mar 25 '14 at 20:10
  • 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
  • Sorry, yes, my bad. The original question did not have the link and I had understood you'd downloaded the server iso. Have you had a look at the suggestions from the link in my first comment? – terdon Mar 25 '14 at 20:29
  • @terdon Well, your first suggestion is the one that's not working for me, and the second one requires internet (which isn't an option). I was previously under the impression that your third suggestion requires internet as well, but at a closer inspection, I see I was mistaken. I'll give #3 a shot and let you know how it goes. Really, thank you so much for your help. – Andrew LaPrise Mar 25 '14 at 20:46
  • @terdon Should there be proc, dev, and sys directories already present on the DVD? I don't know anything about the structure of an ISO... – Andrew LaPrise Mar 26 '14 at 16:01

3 Answers3

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.

fooot
  • 794
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.

Mark G.
  • 101
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 ...

Joke Sr. OK
  • 903
  • 1
  • 8
  • 11