Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: cannot link container's themes to host home. #13

Closed
alxlg opened this issue Dec 5, 2021 · 5 comments
Closed

Error: cannot link container's themes to host home. #13

alxlg opened this issue Dec 5, 2021 · 5 comments
Labels
bug Something isn't working

Comments

@alxlg
Copy link

alxlg commented Dec 5, 2021

Can't initialize the container, what's the rationale of these themes/icons operations? Here there's the log:

podman logs -f fedora-35
+ HOST_LINKS='/etc/host.conf /etc/hosts /etc/resolv.conf /etc/localtime /etc/timezone'
+ for link in ${HOST_LINKS}
+ rm -f /etc/host.conf
+ ln -s /run/host/etc/host.conf /etc/host.conf
+ for link in ${HOST_LINKS}
+ rm -f /etc/hosts
+ ln -s /run/host/etc/hosts /etc/hosts
+ for link in ${HOST_LINKS}
+ rm -f /etc/resolv.conf
+ ln -s /run/host/etc/resolv.conf /etc/resolv.conf
+ for link in ${HOST_LINKS}
+ rm -f /etc/localtime
+ ln -s /run/host/etc/localtime /etc/localtime
+ for link in ${HOST_LINKS}
+ rm -f /etc/timezone
+ ln -s /run/host/etc/timezone /etc/timezone
++ basename /bin/bash
+ shell_pkg=bash
+ command -v mount
+ command -v apk
+ command -v apt-get
+ command -v dnf
/usr/bin/dnf
+ dnf install -y --setopt=install_weak_deps=False sudo shadow-utils passwd procps-ng util-linux bash
Fedora 35 - x86_64                              6.6 MB/s |  61 MB     00:09    
Fedora 35 openh264 (From Cisco) - x86_64        4.1 kB/s | 2.5 kB     00:00    
Fedora Modular 35 - x86_64                      3.1 MB/s | 2.6 MB     00:00    
Fedora 35 - x86_64 - Updates                    4.7 MB/s |  15 MB     00:03    
Fedora Modular 35 - x86_64 - Updates            484 kB/s | 717 kB     00:01    
Package sudo-1.9.7p2-2.fc35.x86_64 is already installed.
Package shadow-utils-2:4.9-7.fc35.x86_64 is already installed.
Package bash-5.1.8-2.fc35.x86_64 is already installed.
Dependencies resolved.
================================================================================
 Package                Architecture  Version              Repository      Size
================================================================================
Installing:
 passwd                 x86_64        0.80-11.fc35         fedora         107 k
 procps-ng              x86_64        3.3.17-3.fc35        fedora         328 k
 util-linux             x86_64        2.37.2-1.fc35        fedora         2.2 M
Installing dependencies:
 cracklib-dicts         x86_64        2.9.6-27.fc35        fedora         3.6 M
 libfdisk               x86_64        2.37.2-1.fc35        fedora         155 k
 libuser                x86_64        0.63-7.fc35          fedora         380 k
 libutempter            x86_64        1.2.1-5.fc35         fedora          26 k
 systemd-libs           x86_64        249.7-2.fc35         updates        616 k
 util-linux-core        x86_64        2.37.2-1.fc35        fedora         434 k

Transaction Summary
================================================================================
Install  9 Packages

Total download size: 7.8 M
Installed size: 27 M
Downloading Packages:
(1/9): libfdisk-2.37.2-1.fc35.x86_64.rpm        708 kB/s | 155 kB     00:00    
(2/9): libuser-0.63-7.fc35.x86_64.rpm           1.5 MB/s | 380 kB     00:00    
(3/9): libutempter-1.2.1-5.fc35.x86_64.rpm      583 kB/s |  26 kB     00:00    
(4/9): passwd-0.80-11.fc35.x86_64.rpm           604 kB/s | 107 kB     00:00    
(5/9): procps-ng-3.3.17-3.fc35.x86_64.rpm       1.3 MB/s | 328 kB     00:00    
(6/9): util-linux-core-2.37.2-1.fc35.x86_64.rpm 888 kB/s | 434 kB     00:00    
(7/9): cracklib-dicts-2.9.6-27.fc35.x86_64.rpm  3.4 MB/s | 3.6 MB     00:01    
(8/9): util-linux-2.37.2-1.fc35.x86_64.rpm      3.2 MB/s | 2.2 MB     00:00    
(9/9): systemd-libs-249.7-2.fc35.x86_64.rpm     1.1 MB/s | 616 kB     00:00    
--------------------------------------------------------------------------------
Total                                           3.9 MB/s | 7.8 MB     00:02     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1
  Installing       : systemd-libs-249.7-2.fc35.x86_64                       1/9
  Running scriptlet: systemd-libs-249.7-2.fc35.x86_64                       1/9
  Installing       : util-linux-core-2.37.2-1.fc35.x86_64                   2/9
  Running scriptlet: util-linux-core-2.37.2-1.fc35.x86_64                   2/9
  Running scriptlet: libutempter-1.2.1-5.fc35.x86_64                        3/9
  Installing       : libutempter-1.2.1-5.fc35.x86_64                        3/9
  Installing       : libuser-0.63-7.fc35.x86_64                             4/9
  Installing       : libfdisk-2.37.2-1.fc35.x86_64                          5/9
  Installing       : util-linux-2.37.2-1.fc35.x86_64                        6/9
warning: /etc/adjtime created as /etc/adjtime.rpmnew

  Running scriptlet: util-linux-2.37.2-1.fc35.x86_64                        6/9
  Installing       : passwd-0.80-11.fc35.x86_64                             7/9
  Installing       : procps-ng-3.3.17-3.fc35.x86_64                         8/9
  Installing       : cracklib-dicts-2.9.6-27.fc35.x86_64                    9/9
  Running scriptlet: cracklib-dicts-2.9.6-27.fc35.x86_64                    9/9
  Verifying        : cracklib-dicts-2.9.6-27.fc35.x86_64                    1/9
  Verifying        : libfdisk-2.37.2-1.fc35.x86_64                          2/9
  Verifying        : libuser-0.63-7.fc35.x86_64                             3/9
  Verifying        : libutempter-1.2.1-5.fc35.x86_64                        4/9
  Verifying        : passwd-0.80-11.fc35.x86_64                             5/9
  Verifying        : procps-ng-3.3.17-3.fc35.x86_64                         6/9
  Verifying        : util-linux-2.37.2-1.fc35.x86_64                        7/9
  Verifying        : util-linux-core-2.37.2-1.fc35.x86_64                   8/9
  Verifying        : systemd-libs-249.7-2.fc35.x86_64                       9/9

Installed:
  cracklib-dicts-2.9.6-27.fc35.x86_64       libfdisk-2.37.2-1.fc35.x86_64       
  libuser-0.63-7.fc35.x86_64                libutempter-1.2.1-5.fc35.x86_64     
  passwd-0.80-11.fc35.x86_64                procps-ng-3.3.17-3.fc35.x86_64      
  systemd-libs-249.7-2.fc35.x86_64          util-linux-2.37.2-1.fc35.x86_64     
  util-linux-core-2.37.2-1.fc35.x86_64     

Complete!
+ HOST_MOUNTS_RO='/etc/machine-id /var/lib/flatpak /var/lib/systemd/coredump /var/log/journal'
+ for mount_ro in ${HOST_MOUNTS_RO}
+ mount_bind /run/host/etc/machine-id /etc/machine-id ro
+ source_dir=/run/host/etc/machine-id
+ target_dir=/etc/machine-id
+ mount_flags=ro
+ mount_o=
+ '[' -d /run/host/etc/machine-id ']'
+ '[' -f /run/host/etc/machine-id ']'
+ '[' -d /run/host/etc/machine-id ']'
+ '[' -f /run/host/etc/machine-id ']'
+ touch /etc/machine-id
+ '[' ro = '' ']'
+ mount_o='-o ro'
+ mount --rbind -o ro /run/host/etc/machine-id /etc/machine-id
+ return 0
+ for mount_ro in ${HOST_MOUNTS_RO}
+ mount_bind /run/host/var/lib/flatpak /var/lib/flatpak ro
+ source_dir=/run/host/var/lib/flatpak
+ target_dir=/var/lib/flatpak
+ mount_flags=ro
+ mount_o=
+ '[' -d /run/host/var/lib/flatpak ']'
+ '[' -d /run/host/var/lib/flatpak ']'
+ mkdir -p /var/lib/flatpak
+ '[' ro = '' ']'
+ mount_o='-o ro'
+ mount --rbind -o ro /run/host/var/lib/flatpak /var/lib/flatpak
+ return 0
+ for mount_ro in ${HOST_MOUNTS_RO}
+ mount_bind /run/host/var/lib/systemd/coredump /var/lib/systemd/coredump ro
+ source_dir=/run/host/var/lib/systemd/coredump
+ target_dir=/var/lib/systemd/coredump
+ mount_flags=ro
+ mount_o=
+ '[' -d /run/host/var/lib/systemd/coredump ']'
+ '[' -d /run/host/var/lib/systemd/coredump ']'
+ mkdir -p /var/lib/systemd/coredump
+ '[' ro = '' ']'
+ mount_o='-o ro'
+ mount --rbind -o ro /run/host/var/lib/systemd/coredump /var/lib/systemd/coredump
+ return 0
+ for mount_ro in ${HOST_MOUNTS_RO}
+ mount_bind /run/host/var/log/journal /var/log/journal ro
+ source_dir=/run/host/var/log/journal
+ target_dir=/var/log/journal
+ mount_flags=ro
+ mount_o=
+ '[' -d /run/host/var/log/journal ']'
+ '[' -d /run/host/var/log/journal ']'
+ mkdir -p /var/log/journal
+ '[' ro = '' ']'
+ mount_o='-o ro'
+ mount --rbind -o ro /run/host/var/log/journal /var/log/journal
+ return 0
+ HOST_MOUNTS='/media /mnt /run/systemd/journal /run/libvirt /var/mnt /var/lib/libvirt'
+ for mount in ${HOST_MOUNTS}
+ mount_bind /run/host/media /media rw
+ source_dir=/run/host/media
+ target_dir=/media
+ mount_flags=rw
+ mount_o=
+ '[' -d /run/host/media ']'
+ '[' -d /run/host/media ']'
+ mkdir -p /media
+ '[' rw = '' ']'
+ mount_o='-o rw'
+ mount --rbind -o rw /run/host/media /media
+ return 0
+ for mount in ${HOST_MOUNTS}
+ mount_bind /run/host/mnt /mnt rw
+ source_dir=/run/host/mnt
+ target_dir=/mnt
+ mount_flags=rw
+ mount_o=
+ '[' -d /run/host/mnt ']'
+ '[' -d /run/host/mnt ']'
+ mkdir -p /mnt
+ '[' rw = '' ']'
+ mount_o='-o rw'
+ mount --rbind -o rw /run/host/mnt /mnt
+ return 0
+ for mount in ${HOST_MOUNTS}
+ mount_bind /run/host/run/systemd/journal /run/systemd/journal rw
+ source_dir=/run/host/run/systemd/journal
+ target_dir=/run/systemd/journal
+ mount_flags=rw
+ mount_o=
+ '[' -d /run/host/run/systemd/journal ']'
+ '[' -d /run/host/run/systemd/journal ']'
+ mkdir -p /run/systemd/journal
+ '[' rw = '' ']'
+ mount_o='-o rw'
+ mount --rbind -o rw /run/host/run/systemd/journal /run/systemd/journal
+ return 0
+ for mount in ${HOST_MOUNTS}
+ mount_bind /run/host/run/libvirt /run/libvirt rw
+ source_dir=/run/host/run/libvirt
+ target_dir=/run/libvirt
+ mount_flags=rw
+ mount_o=
+ '[' -d /run/host/run/libvirt ']'
+ '[' -f /run/host/run/libvirt ']'
+ return 0
+ for mount in ${HOST_MOUNTS}
+ mount_bind /run/host/var/mnt /var/mnt rw
+ source_dir=/run/host/var/mnt
+ target_dir=/var/mnt
+ mount_flags=rw
+ mount_o=
+ '[' -d /run/host/var/mnt ']'
+ '[' -f /run/host/var/mnt ']'
+ return 0
+ for mount in ${HOST_MOUNTS}
+ mount_bind /run/host/var/lib/libvirt /var/lib/libvirt rw
+ source_dir=/run/host/var/lib/libvirt
+ target_dir=/var/lib/libvirt
+ mount_flags=rw
+ mount_o=
+ '[' -d /run/host/var/lib/libvirt ']'
+ '[' -f /run/host/var/lib/libvirt ']'
+ return 0
+ mkdir -p /home/alex/.themes/
+ ln -s /run/host/usr/share/themes/Breeze /run/host/usr/share/themes/Breeze-Dark /run/host/usr/share/themes/Default /run/host/usr/share/themes/Emacs /run/host/usr/share/themes/KvAdapta /run/host/usr/share/themes/KvAmbiance /run/host/usr/share/themes/KvAmbience /run/host/usr/share/themes/KvArc /run/host/usr/share/themes/KvArcDark /run/host/usr/share/themes/KvBeige /run/host/usr/share/themes/KvBrown /run/host/usr/share/themes/KvCurvesLight /run/host/usr/share/themes/KvCyan /run/host/usr/share/themes/KvDarkRed /run/host/usr/share/themes/KvFlatLight /run/host/usr/share/themes/KvGnome /run/host/usr/share/themes/KvGnomeAlt /run/host/usr/share/themes/KvGnomeDark /run/host/usr/share/themes/KvGnomish /run/host/usr/share/themes/KvGray /run/host/usr/share/themes/KvOxygen /run/host/usr/share/themes/KvRoughGlass /run/host/usr/share/themes/KvSimplicity /run/host/usr/share/themes/KvSimplicityDark /run/host/usr/share/themes/Kvantum /run/host/usr/share/themes/Raleigh /home/alex/.themes/
ln: failed to create symbolic link '/home/alex/.themes/Breeze': Permission denied
ln: failed to create symbolic link '/home/alex/.themes/Breeze-Dark': Permission denied
ln: failed to create symbolic link '/home/alex/.themes/Default': Permission denied
ln: failed to create symbolic link '/home/alex/.themes/Emacs': Permission denied
ln: failed to create symbolic link '/home/alex/.themes/KvAdapta': Permission denied
ln: failed to create symbolic link '/home/alex/.themes/KvAmbiance': Permission denied
ln: failed to create symbolic link '/home/alex/.themes/KvAmbience': Permission denied
ln: failed to create symbolic link '/home/alex/.themes/KvArc': Permission denied
ln: failed to create symbolic link '/home/alex/.themes/KvArcDark': Permission denied
ln: failed to create symbolic link '/home/alex/.themes/KvBeige': Permission denied
ln: failed to create symbolic link '/home/alex/.themes/KvBrown': Permission denied
ln: failed to create symbolic link '/home/alex/.themes/KvCurvesLight': Permission denied
ln: failed to create symbolic link '/home/alex/.themes/KvCyan': Permission denied
ln: failed to create symbolic link '/home/alex/.themes/KvDarkRed': Permission denied
ln: failed to create symbolic link '/home/alex/.themes/KvFlatLight': Permission denied
ln: failed to create symbolic link '/home/alex/.themes/KvGnome': Permission denied
ln: failed to create symbolic link '/home/alex/.themes/KvGnomeAlt': Permission denied
ln: failed to create symbolic link '/home/alex/.themes/KvGnomeDark': Permission denied
ln: failed to create symbolic link '/home/alex/.themes/KvGnomish': Permission denied
ln: failed to create symbolic link '/home/alex/.themes/KvGray'
ln: failed to create symbolic link '/home/alex/.themes/KvOxygen': Permission denied
ln: failed to create symbolic link '/home/alex/.themes/KvRoughGlass': Permission denied
ln: failed to create symbolic link '/home/alex/.themes/KvSimplicity': Permission denied
ln: failed to create symbolic link '/home/alex/.themes/KvSimplicityDark': Permission denied
ln: failed to create symbolic link '/home/alex/.themes/Kvantum': Permission denied
ln: failed to create symbolic link '/home/alex/.themes/Raleigh': Permission denied
Error: cannot link container's themes to host home.
+ echo 'Error: cannot link container'\''s themes to host home.'
+ mkdir -p /home/alex/.icons/
+ ln -s /run/host/usr/share/icons/Adwaita /run/host/usr/share/icons/Breeze_Snow /run/host/usr/share/icons/breeze /run/host/usr/share/icons/breeze-dark /run/host/usr/share/icons/breeze_cursors /run/host/usr/share/icons/default /run/host/usr/share/icons/gnome /run/host/usr/share/icons/hicolor /run/host/usr/share/icons/locolor /run/host/usr/share/icons/mindforger /run/host/usr/share/icons/scalable /home/alex/.icons/
+ echo 'Defaults !fqdn'
+ echo 'alex ALL = (root) NOPASSWD:ALL'
++ list_sudo_groups
++ group=
++ grep -q sudo: /etc/group
++ grep -q wheel: /etc/group
++ group=wheel
++ echo wheel
++ return 0
+ useradd --home-dir /home/alex --no-create-home --shell /bin/bash --uid 1000 --gid 1000 --groups wheel alex
useradd: group '1000' does not exist
++ list_sudo_groups
++ group=
++ grep -q sudo: /etc/group
++ grep -q wheel: /etc/group
++ group=wheel
++ echo wheel
++ return 0
+ usermod -aG wheel alex
usermod: user 'alex' does not exist
+ '[' 6 -ne 0 ']'
+ echo An error occurred
An error occurred
@89luca89
Copy link
Owner

89luca89 commented Dec 5, 2021

Hey @alxlg thanks for the report!

Yes the idea is to link the hosts's themes (from /run/host) to the container so to try and have a bit of consistency for the graphical apps
It is linking the ones in /run/host/usr because the ones in home are already accessible (so in case you have custom themes you're covered both if you install from repos and manually in home)

Seeing that seems a permission problem, is the themes folder in your home belonging to another user or has some restrictions?

@89luca89
Copy link
Owner

89luca89 commented Dec 5, 2021

But that is not the reason it is failing to create the container

seems like there is a problem in the usermod section, it failed to create the alex user and the usermod failed afterwards

what image are you using?

@89luca89 89luca89 added the bug Something isn't working label Dec 5, 2021
@89luca89
Copy link
Owner

89luca89 commented Dec 5, 2021

I've pushed version 1.0.3, it should fix this issue putting a groupadd --force before the useradd can you check if it fixes your issue?

Also I've for now removed the themes/icon integration as it's not a solid solution and for now I prefer to be more reliable than featurefull 😅

@alxlg
Copy link
Author

alxlg commented Dec 5, 2021

Wow, just wow! It does indeed works now, I entered the Fedora 35 container, installed Nautilus and launched it: I am on KDE Neon and it works perfectly. I love how you carefully designed the UX for novices. With few intuitive commands now I able to run GTK apps without messing up my system. I can't wait to try this with the nightly images that KDE Neon provides. This should definetely be advertised also in KDE land, since now the best way to develop for KDE is using Neon's script that is a very simple version of yours but just for running Neon's images.

About the themes/icons thing, it would be nice to have it as an option in future.

Also I can definetely see the GTK/GNOME/Fedora folks take the opportunity to build a GUI tool on top of yours, to make it even easier to use.

@89luca89
Copy link
Owner

89luca89 commented Dec 6, 2021

Wow, just wow! It does indeed works now, I entered the Fedora 35 container, installed Nautilus and launched it: I am on KDE Neon and it works perfectly. I love how you carefully designed the UX for novices. With few intuitive commands now I able to run GTK apps without messing up my system. I can't wait to try this with the nightly images that KDE Neon provides. This should definetely be advertised also in KDE land, since now the best way to develop for KDE is using Neon's script that is a very simple version of yours but just for running Neon's images.

Cool glad it fixed it! 😄

About the themes/icons thing, it would be nice to have it as an option in future.

Yep I've opened an issue #15 to adress this in the future

Also I can definetely see the GTK/GNOME/Fedora folks take the opportunity to build a GUI tool on top of yours, to make it even easier to use.

Hehe yea I would really like to give it a shot myself with GTK4 but that's something definitely for the future 😄


As the issue is solved, I'll close the bug report
thanks again for reporting!

@89luca89 89luca89 closed this as completed Dec 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants