Useful settings in nemesis

Arch based Porteus community project

Moderator: M. Eerie

User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Useful settings in nemesis

Post#1 by francois » 15 Oct 2015, 02:32

As I am working with nemesis, I will provide for others and at the same time for myself some useful settings in nemesis.

1.0 gpm; adding mouse control to tty (getty) or text terminal outside of xorg as an aid to use mc.
gpm is provided on nemesis in addition to mc (midnight commander) base module. You have to set your mouse though.

Code: Select all

guest ~ $ sudo pacman -S hwinfo
guest ~ $ hwinfo --mouse 
...
Driver Info #0:
    XFree86 Protocol: explorerps/2
    GPM Protocol: [b]exps2[/b]

guest ~ $ GPM_ARGS="-m /dev/input/mice -t exps2"
guest ~ $ sudo systemctl enable gpm
guest ~ $ sudo reboot
Which will set the mouse in tty mode.
********************************************************************************************
2.0 Working with nemesis wifi:
I have installed networkmanager and network-manager-applet as I need the wifi on my installation to work on nemesis.
After:
https://wiki.archlinux.org/index.php/Ne ... ager#nmcli

Code: Select all

root ~ # pman -S networkmanager network-manager-applet

root /home/guest # systemctl start NetworkManager
root /home/guest # systemctl enable NetworkManager
root /home/guest # nmcli dev wifi connect p4rc password "I love nemesis so much"
I am able to use nemesis wifi mode.

However nm-applet will not start:

Code: Select all

root /home/guest # nm-applet
nm-applet: symbol lookup error: /usr/lib/libgtk-3.so.0: undefined symbol: g_param_spec_get_name_quark
root /home/guest # 
****************************************************************************************************
3.0 Autologin user (root or normal) without a login manager:
Here is how to autologin in root mode without a login manager for the xfce environment. I imagine that this could be adapted for other environment or window managers as well. See:
http://unix.stackexchange.com/questions ... th-systemd (outdated but helped to some insight)
You could do the same but with the use of a login manager appropriate to your window manager or your desktop environment. Less programs, less time to boot!

3.1 There is a way with systemd to do an override.conf, thus preserving the intactness of /etc/systemd/system/getty@tty1.service. You can create this file:
https://wiki.archlinux.org/index.php/Au ... al_console
/etc/systemd/system/getty@tty1.service.d/override.conf
[Service]
ExecStart=
ExecStart=-/usr/bin/agetty --autologin username --noclear %I 38400 linux

3.2 Invoking startx thru tty1 automatically thru bash_profile (autostart x login).
Modify ~/.bash_profile adding at the end to enable login true display and ask for starting X:
https://wiki.archlinux.org/index.php/Xinitrc
[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx

3.3 Modifying ~/.xinitrc to boot xfce by inserting at the end of the file exec startxfce4 with a text editor like nano (command line) or mousepad (graphical environment):
exec startxfce4
*****************************************************************************************
Chroot procedure for grub2 and manjaro

Code: Select all

mkdir /mnt/manjaro
mount /dev/sda1 /mnt/manjaro #here manjaro is on sda1, change it for your installation.cd
mount -t proc proc /mnt/manjaro/proc &&
mount -t sysfs sys /mnt/manjaro/sys &&
mount -o bind /dev /mnt/manjaro/dev &&
mount -t devpts pts /mnt/manjaro/dev/pts/ &&
chroot /mnt/manjaro
Do whatever changes you want to do (see further in the text)

Code: Select all

exit &&
umount /mnt/manjaro/dev &&
umount /mnt/manjaro/dev/pts &&
umount /mnt/manjaro/proc &&
umount /mnt/manjaro/sys &&
umount /mnt/manjaro
Here you can change your 40_custom settings, here is mine:

Code: Select all

#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.

# path to the partition holding ISO images (using UUID)
probe -u $root --set=rootuuid
set imgdevpath="/dev/disk/by-uuid/$rootuuid"

menuentry "porteus NEMESIS 64bit_v31  XFCE" {
set root=(hd0,6)
linux /64bit_v31_nemesis/boot/syslinux/vmlinuz changes=64bit_v31_nemesis/nemesis login=root
initrd /64bit_v31_nemesis/boot/syslinux/initrd.xz
}
menuentry "porteus NEMESIS SDA6  XFCE" {
set root=(hd0,6)
linux /boot/syslinux/vmlinuz changes=/nemesis login=root
initrd /boot/syslinux/initrd.xz
}
menuentry "porteus NEMESIS 64bit_v31  XFCE" {
set root=(hd0,6)
linux /boot/syslinux/vmlinuz from=/dev/sda6/64bit_v31_nemesis changes=/64bit_v31_nemesis png=nemesis login=root
initrd /boot/syslinux/initrd.xz
}
menuentry "porteus NEMESIS 64bit_v31  XFCE" {
set root=(hd0,6)
linux /64bit_v31_nemesis/boot/syslinux/vmlinuz from=/dev/sda6/64bit_v31_nemesis login=root
initrd /64bit_v31_nemesis/boot/syslinux/initrd.xz
}
menuentry "Porteus NEMESIS BASE PMAN x86-64 ISO" {
insmod part_msdos
insmod ext2
set root=(hd0,1)
set isofile="/ISO/nemesis-v3.1-x86_64.iso"
search --no-floppy --file --set=root $isofile
loopback loop $isofile
linux (loop)/boot/syslinux/vmlinuz from=$isofile login=root changes=/1_nemesis
initrd (loop)/boot/syslinux/initrd.xz
}
menuentry "porteus on sda6 64bit_v31  XFCE" {
set root=(hd0,6)
linux /64bit_v31/boot/syslinux/vmlinuz from=/dev/sda6/64bit_v31 extramod=/mnt/sda6/64bit_v31/xfce changes=EXIT:/64bit_v31/xfce   login=root
initrd /64bit_v31/boot/syslinux/initrd.xz
}
menuentry "Porteus XFCE x86-64 ISO" {
insmod part_msdos
insmod ext2
set root=(hd0,1)
set isofile="/ISO/Porteus-XFCE-v3.1-x86_64.iso"
search --no-floppy --file --set=root $isofile
loopback loop $isofile
linux (loop)/boot/syslinux/vmlinuz from=$isofile changes=1_porteus login=root
initrd (loop)/boot/syslinux/initrd.xz
}
menuentry '[loopback]archlinux-2015.09.01-dual.iso' {
	set isofile='/ISO/archlinux-2015.09.01-dual.iso'
	loopback loop $isofile
	linux (loop)/arch/boot/x86_64/vmlinuz archisodevice=/dev/loop0 img_dev=$imgdevpath img_loop=$isofile
	initrd (loop)/arch/boot/x86_64/archiso.img
}
menuentry "Arch Linux Install  ISO" {
  set isoname='archlinux-2015.09.01-dual.iso'
  set isofile=/ISO/$isoname
  echo 'Using ${isoname}...'
  loopback loop $isofile
  linux (loop)/arch/boot/x86_64/vmlinuz img_dev=$imgdevpath img_loop=$isofile archisobasedir=arch archisolabel=ARCH_201509
  initrd (loop)/arch/boot/x86_64/archiso.img
}
menuentry "Porteus XFCE x86-64 ISO" COPY TO RAM{
insmod part_msdos
insmod ext2
set root=(hd0,1)
set isofile="/ISO/Porteus-XFCE-v3.1-x86_64.iso"
search --no-floppy --file --set=root $isofile
loopback loop $isofile
linux (loop)/boot/syslinux/vmlinuz from=$isofile changes=1_porteus login=root copy2ram
initrd (loop)/boot/syslinux/initrd.xz
}

Code: Select all

update-grub

Code: Select all

exit &&
umount /mnt/manjaro/proc &&
umount /mnt/manjaro/sys &&
umount /mnt/manjaro/dev &&
umount /mnt/manjaro/dev/pts/ &&
umount /mnt/manjaro
***************************************************
systemd non-graphical mode command line when in the graphical mode:
https://wiki.archlinux.org/index.php/Systemd#Targets

Code: Select all

systemctl isolate multi-user.target
Prendre son temps, profiter de celui qui passe.

User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Re: Useful settings in nemesis

Post#2 by francois » 17 Oct 2015, 17:22

Added packages network manager to get wifi with nemesis. However nm-applet will not work.
Prendre son temps, profiter de celui qui passe.

User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Re: Useful settings in nemesis

Post#3 by francois » 20 Oct 2015, 03:20

Tried to start chromium in root mode, the only way is to use --no-sandbox --user-data-dir:

Code: Select all

chromium  --no-sandbox --user-data-dir
which is not secure.

Giving root permissions to /usr/lib/chromium/chrome-sandbox as proposed by aus9 does not work. See:
http://forum.porteus.org/viewtopic.php? ... 854#p37854
Prendre son temps, profiter de celui qui passe.

Post Reply