Author Topic: Custom ISO with a custom shell  (Read 930 times)

0 Members and 1 Guest are viewing this topic.

Offline malch

  • Neuling
  • *
  • Posts: 4
  • I'm new. Be nice!
  • Skill: Novice
Custom ISO with a custom shell
« on: 29. April 2016, 19:37:17 »
I've just made my first custom ISO with manjaro-tools. Very nice indeed!

However, I would really like to replace bash with a different shell and cannot figure out how to tweak the build to achieve that.

I'd be very grateful for any pointers.

Offline crazyg4merz

  • Held Mitglied
  • *****
  • Posts: 879
  • Experience it, that's the way of learning!!
  • Branch: stable
  • Desktop: Gnome
  • GPU Card: Nvidia GTX 970
  • GPU driver: non-free
  • Kernel: Linux420-x64
  • Skill: Intermediate
Re: Custom ISO with a custom shell
« Reply #1 on: 29. April 2016, 21:03:26 »
Hi there. I managed to make zsh as my default shell on my custom build of Manjaro back then. If I remember correctly, just include the shell you want to the packages to install list, then add your custom /etc/passwd to use the custom shell by default. Of course you need to add the shell configuration file into your /etc/skel also so your shell isn't ugly af  ;D
But if it fail, all you need to do is do chsh -u blablabla after installation though. Good luck :)

Offline Chrysostomus

  • Maintainer
  • ***
  • Posts: 1634
  • Neckbeards are cool
    • Git
  • Branch: unstable
  • Desktop: Gnome, bspwm
  • GPU Card: Intel HD4000
  • GPU driver: free
  • Kernel: linux44-x64
  • Skill: Intermediate
Re: Custom ISO with a custom shell
« Reply #2 on: 29. April 2016, 22:32:13 »
Note that this will only work with cli-installer. Thus (and maybe calamares) makes bash your shell on installed system regardles of your iso profile.

Offline malch

  • Neuling
  • *
  • Posts: 4
  • I'm new. Be nice!
  • Skill: Novice
Re: Custom ISO with a custom shell
« Reply #3 on: 29. April 2016, 23:16:24 »
Thank you both for the comments.

I'm not too concerned about what shell is used following an install. This custom ISO is primarily a system maintenance tool rather than an installer. If I'm performing a fresh install it's no big deal to do the chsh.

Unfortunately, placing a hacked /etc/passwd in the overlay didn't work. The build failed telling me that user 'manjaro' already exists.

Oh well. Is there a way to manually tweak the file system after the build but before it gets squashed into the ISO? That would solve another problem I'm having with ~/.mozilla/firefox/manjaro.default/chrome/. I can't nuke the symlink that is created by default to the Manjaro theme.

Offline crazyg4merz

  • Held Mitglied
  • *****
  • Posts: 879
  • Experience it, that's the way of learning!!
  • Branch: stable
  • Desktop: Gnome
  • GPU Card: Nvidia GTX 970
  • GPU driver: non-free
  • Kernel: Linux420-x64
  • Skill: Intermediate
Re: Custom ISO with a custom shell
« Reply #4 on: 30. April 2016, 02:17:18 »
Thank you both for the comments.

I'm not too concerned about what shell is used following an install. This custom ISO is primarily a system maintenance tool rather than an installer. If I'm performing a fresh install it's no big deal to do the chsh.

Unfortunately, placing a hacked /etc/passwd in the overlay didn't work. The build failed telling me that user 'manjaro' already exists.

Oh well. Is there a way to manually tweak the file system after the build but before it gets squashed into the ISO? That would solve another problem I'm having with ~/.mozilla/firefox/manjaro.default/chrome/. I can't nuke the symlink that is created by default to the Manjaro theme.
Maybe you can make a custom script to run chsh when installing the iso? I swear I managed to do that, but I forgot how I did it.
Yeah you can, everything inside /etc/skel/.config will go into your home folder. But you have to do a clean install though, because if you mount your home folder without formatting it it won't copy anything. So if you already have a lot of files inside your home partition and you don't want to format it, it's better to just copy it manually after installation. Or maybe you can install as a different username.

Offline malch

  • Neuling
  • *
  • Posts: 4
  • I'm new. Be nice!
  • Skill: Novice
Re: Custom ISO with a custom shell
« Reply #5 on: 30. April 2016, 03:45:00 »
Well I found a way to do the build in two parts:

Code: [Select]
buildiso -x -p xfce
Make tweaks in /var/lib/manjaro-tools/buildiso/xfce/x86_64/
buildiso -p xfce -zc

That enabled me to solve some other problems but if I hack /etc/passwd the ISO when booted up requires a password for user manjaro. Entering "manjaro" didn't work  :-[

So I guess I'll live with a manual chsh for the moment.

In the process of doing all this, I've also managed to integrate several AUR packages successfully so I'm a pretty happy camper overall!

Thanks for all your help guys and have a great weekend!

Offline Chrysostomus

  • Maintainer
  • ***
  • Posts: 1634
  • Neckbeards are cool
    • Git
  • Branch: unstable
  • Desktop: Gnome, bspwm
  • GPU Card: Intel HD4000
  • GPU driver: free
  • Kernel: linux44-x64
  • Skill: Intermediate
Re: Custom ISO with a custom shell
« Reply #6 on: 30. April 2016, 06:50:55 »

Offline Chrysostomus

  • Maintainer
  • ***
  • Posts: 1634
  • Neckbeards are cool
    • Git
  • Branch: unstable
  • Desktop: Gnome, bspwm
  • GPU Card: Intel HD4000
  • GPU driver: free
  • Kernel: linux44-x64
  • Skill: Intermediate
Re: Custom ISO with a custom shell
« Reply #7 on: 30. April 2016, 07:57:47 »
Bspwm edition has zsh as custom shell, so I know this to work.

Other workarounds include making bash start your custom shell at login, making a custom launcher for your terminal that launches it or making a bash script that lets you easily swutch your default shell.

Offline crazyg4merz

  • Held Mitglied
  • *****
  • Posts: 879
  • Experience it, that's the way of learning!!
  • Branch: stable
  • Desktop: Gnome
  • GPU Card: Nvidia GTX 970
  • GPU driver: non-free
  • Kernel: Linux420-x64
  • Skill: Intermediate
Re: Custom ISO with a custom shell
« Reply #8 on: 30. April 2016, 08:24:06 »
The file you need to edit is /etc/default/useradd. See here:
https://github.com/manjaro/manjaro-tools-iso-profiles/blob/master/community/bspwm/bspwm-overlay/etc/default/useradd
Now I remember how I got it working. Thanks mate :)
Also, if you install the iso with the same username your last home partition is, then this won't work unless you make another user either after installation or during installation, so I think the better way to get everyone to enjoy your custom iso the making bash to open up custom shell is a better approach (because I always preserve my home partition when installing distro and I think most of use do).
I think this topic is solved now?  :)