EasyOS version 2.3.2, June 22, 2020
qfix=nox works fine for me on a HDD frugal install
grub4dos menu.lst entry of ...
title Easy 1.0 (frugal install in sda1)
uuid 7e85c56f-88fa-4660-988e-ebccbd2f5d91
kernel /easy/1.0/vmlinuz video=640x480 qfix=nox
initrd /easy/1.0/initrd
grub4dos menu.lst entry of ...
title Easy 1.0 (frugal install in sda1)
uuid 7e85c56f-88fa-4660-988e-ebccbd2f5d91
kernel /easy/1.0/vmlinuz video=640x480 qfix=nox
initrd /easy/1.0/initrd
[size=75]( ͡° ͜ʖ ͡°) :wq[/size]
[url=http://murga-linux.com/puppy/viewtopic.php?p=1028256#1028256][size=75]Fatdog multi-session usb[/url][/size]
[size=75][url=https://hashbang.sh]echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh[/url][/size]
[url=http://murga-linux.com/puppy/viewtopic.php?p=1028256#1028256][size=75]Fatdog multi-session usb[/url][/size]
[size=75][url=https://hashbang.sh]echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh[/url][/size]
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
Re: Russian build
And did I see a notice on one of the american pi sites around christmas about a pi notebook planned to come out this year. Don't know which pi chip or if crowd funded as I don't pi at present.BarryK wrote:Thanks for responding to my pm.rodin.s wrote:Barry.
Just got your messages. May be too late as you have already made a release. I guess I will look at it as soon as I get to a computer capabale of running it. I am posting this from Raspberry Pi.
There is an earlier Easy release for the Pi3. You are giving me some incentive to do a 1.0 build for the Pi!
On the other hand there are some refurbished m7's out there if you look, with ssd's and simslots for mobile computing, and they don't go too slow with easy..
seamonkey (and/or firefox) menu appearance too small?
about:config ... and adjust
layout.css.devPixelsPerPx
I changed mine from the default -1.0 to 1.2
For firefox quantum portable, copying in the seamonkey userChrome.css from somewhere like /root/.mozilla/seamonkey/3o1ptd5r.default/chrome/userChrome.css
to /root/Downloads/firefox64/profile/chrome/userChrome.css
i.e. wherever you've extracted portable firefox (you need to create the chrome folder) caters for adjusting both the menu font size and appearance
about:config ... and adjust
layout.css.devPixelsPerPx
I changed mine from the default -1.0 to 1.2
For firefox quantum portable, copying in the seamonkey userChrome.css from somewhere like /root/.mozilla/seamonkey/3o1ptd5r.default/chrome/userChrome.css
to /root/Downloads/firefox64/profile/chrome/userChrome.css
i.e. wherever you've extracted portable firefox (you need to create the chrome folder) caters for adjusting both the menu font size and appearance
Last edited by rufwoof on Wed 30 Jan 2019, 20:35, edited 1 time in total.
[size=75]( ͡° ͜ʖ ͡°) :wq[/size]
[url=http://murga-linux.com/puppy/viewtopic.php?p=1028256#1028256][size=75]Fatdog multi-session usb[/url][/size]
[size=75][url=https://hashbang.sh]echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh[/url][/size]
[url=http://murga-linux.com/puppy/viewtopic.php?p=1028256#1028256][size=75]Fatdog multi-session usb[/url][/size]
[size=75][url=https://hashbang.sh]echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh[/url][/size]
Confirming earlier qfix=nox from liveCD gives D/T on wider range of machines including an 8yr old laptop, single and multi-core desktops. Only commonality is that all run from BIOS; uefi switched off where appropriate/available.
Font sizes in all apps are entirely acceptable with or without spectacles, latter with reading or distances lenses!
Oh yes, an RPi version would be highly acceptable.
Font sizes in all apps are entirely acceptable with or without spectacles, latter with reading or distances lenses!
Oh yes, an RPi version would be highly acceptable.
-
- Posts: 247
- Joined: Fri 31 Jan 2014, 14:12
Erratic launching of containerized Firefox
To Barry,
just to let you know, in usb v1.0 standard desktop,
I am experiencing erratic launching of containerized Firefox
browser when clicked.
This is most noticeable after using any ordinary program,
say audacious to listen to some music.
Close that down then try to launch Firefox and nothing happens.
I have to re-boot the pc and try again - it then works but still frustrating.
Something needs tweaking, could you have a look please, thanks.
Regards.
just to let you know, in usb v1.0 standard desktop,
I am experiencing erratic launching of containerized Firefox
browser when clicked.
This is most noticeable after using any ordinary program,
say audacious to listen to some music.
Close that down then try to launch Firefox and nothing happens.
I have to re-boot the pc and try again - it then works but still frustrating.
Something needs tweaking, could you have a look please, thanks.
Regards.
Some shots of Easy 1.0 with tmux/mc/firefox portable
I've installed Freds Firefox Quantum portable http://murga-linux.com/puppy/viewtopic.php?t=112376 (that auto updates) inside the Easy container - and that seems to work well for me with no apparent ill effects.
Easy container is a lot more secure than running seamonkey/firefox in their own containers, as the Easy container uses Xephyr that better isolates it from the main X server/client.
I've also installed tmux, installed from http://murga-linux.com/puppy//viewtopic ... 38#1002738
with a configuration of
/root/.tmux.conf ...
mc, also installed using petget
So multiple terminal windows when I ctrl-alt-F3 and login as root (and run tmux) with a reasonable file manager (mc) and its text editor (mc -e). Not running any real root X windows whilst a container is running is good security practice (as is regularly clearing out your browsers cache/history). Running real root from cli whilst a easy container is running is fine (better isolation). If you run real root X programs/windows, then do so only when the Easy container isn't loaded/running. I only use the main X real root desktop for admin things that require X, and never have any windows open when the Easy container is running (security).
I have a tput based menu script (currently the same as copied across from my OpenBSD install), that is helpful for running common commands quickly (I've yet to edit it to be EasyOS specific).
I set the cli resolution to be 640x480 as I prefer the larger font/look i.e. in grub4dos menu.lst ...
Mostly I just flip between ctrl-alt-F3 (cli/tmux/mc) and ctrl-alt-F4 (into X running the Easy container, within which I run firefox, libreoffice ....etc.).
Typically in X (easy container) I'll have audacious running in one X desktop, firefox in another, libre in the third and just flip between those desktops as desired.
First couple of attached screenshots were taken using my phone (actual console), so somewhat blurred. First is the console tmux window that shows my tput based menu, the next is another tmux window running the mc file manager
The other screenshots are (respectively) the main (real root) desktop, and a couple of the Easy container desktop shots (one with audacious running, the other with firefox portable running and showing the puppy forum web site).
Easy container is a lot more secure than running seamonkey/firefox in their own containers, as the Easy container uses Xephyr that better isolates it from the main X server/client.
I've also installed tmux, installed from http://murga-linux.com/puppy//viewtopic ... 38#1002738
with a configuration of
/root/.tmux.conf ...
Code: Select all
# set control key to backtick but also send it i.e. if hit twice then prints the backtick
unbind C-b
set-option -g prefix `
bind ` send-prefix
bind -T copy-mode-vi PageDown send-keys -X page-down
bind -T copy-mode-vi PageUp send-keys -X page-up
# mc uses F1 to F10, so moved up to F11 and F12
bind-key -n F12 next-window
bind-key -n F11 new-window
#bind-key -n F3 kill-window
# Console tmux and this has - and | instead of ? for borders
# UTF-8 must be off
set-option -g terminal-overrides ',*vt*:enacs@:smacs@:rmacs@:acsc@'
# split panes using | and -
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
## switch panes using Alt-arrow without prefix
#bind -n M-Left select-pane -L
#bind -n M-Right select-pane -R
#bind -n M-Up select-pane -U
#bind -n M-Down select-pane -D
######################
### DESIGN CHANGES ###
######################
## loud or quiet?
#set-option -g visual-activity off
#set-option -g visual-bell off
#set-option -g visual-silence off
#set-window-option -g monitor-activity off
#set-option -g bell-action none
# modes
#setw -g clock-mode-colour colour2
setw -g clock-mode-colour yellow
setw -g mode-attr bold
setw -g mode-fg colour1
setw -g mode-bg colour18
# panes
set -g pane-border-bg colour0
set -g pane-border-fg colour19
set -g pane-active-border-bg colour0
set -g pane-active-border-fg colour9
# statusbar
set -g status-position top
set -g status-justify left
set -g status-bg colour4
#set -g status-fg colour137
set -g status-fg colour255
#set -g status-attr dim
set -g status-right ' #[bg=colour0] `#[bg=colour4,bold]Prefix #[bg=colour0] 11#[bg=colour4,bold]New #[bg=colour0] 12#[bg=colour4,bold]Next '
set -g status-left '#[fg=colour255,bg=colour4,bold] %H:%M#[fg=colour255,bg=colour4,bold] %a %d %b '
set -g status-left-length 50
set -g status-right-length 30
setw -g window-status-current-fg colour1
setw -g window-status-current-bg colour19
setw -g window-status-current-attr bold
setw -g window-status-current-format ' #I#[fg=colour249]:#[fg=colour255]#W#[fg=colour249]#F '
setw -g window-status-fg colour9
setw -g window-status-bg colour18
setw -g window-status-attr none
setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '
setw -g window-status-bell-attr bold
setw -g window-status-bell-fg colour255
setw -g window-status-bell-bg colour1
# messages
set -g message-attr bold
set -g message-fg colour232
set -g message-bg colour16
#hilite current window
set-window-option -g window-status-current-bg red
set-window-option -g window-status-current-fg yellow
So multiple terminal windows when I ctrl-alt-F3 and login as root (and run tmux) with a reasonable file manager (mc) and its text editor (mc -e). Not running any real root X windows whilst a container is running is good security practice (as is regularly clearing out your browsers cache/history). Running real root from cli whilst a easy container is running is fine (better isolation). If you run real root X programs/windows, then do so only when the Easy container isn't loaded/running. I only use the main X real root desktop for admin things that require X, and never have any windows open when the Easy container is running (security).
I have a tput based menu script (currently the same as copied across from my OpenBSD install), that is helpful for running common commands quickly (I've yet to edit it to be EasyOS specific).
I set the cli resolution to be 640x480 as I prefer the larger font/look i.e. in grub4dos menu.lst ...
Code: Select all
title Easy 1.0 (frugal install in sda1)
uuid 7e85c56f-88fa-4660-988e-ebccbd2f5d91
kernel /easy/1.0/vmlinuz video=640x480
initrd /easy/1.0/initrd
Typically in X (easy container) I'll have audacious running in one X desktop, firefox in another, libre in the third and just flip between those desktops as desired.
First couple of attached screenshots were taken using my phone (actual console), so somewhat blurred. First is the console tmux window that shows my tput based menu, the next is another tmux window running the mc file manager
The other screenshots are (respectively) the main (real root) desktop, and a couple of the Easy container desktop shots (one with audacious running, the other with firefox portable running and showing the puppy forum web site).
- Attachments
-
- console1-800.jpg
- (53.72 KiB) Downloaded 427 times
-
- console2-800.jpg
- (75.92 KiB) Downloaded 426 times
-
- maindt-800.jpg
- (26.37 KiB) Downloaded 426 times
-
- easydt1-800.jpg
- (68.53 KiB) Downloaded 428 times
-
- easydt2-800.jpg
- (79.39 KiB) Downloaded 428 times
[size=75]( ͡° ͜ʖ ͡°) :wq[/size]
[url=http://murga-linux.com/puppy/viewtopic.php?p=1028256#1028256][size=75]Fatdog multi-session usb[/url][/size]
[size=75][url=https://hashbang.sh]echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh[/url][/size]
[url=http://murga-linux.com/puppy/viewtopic.php?p=1028256#1028256][size=75]Fatdog multi-session usb[/url][/size]
[size=75][url=https://hashbang.sh]echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh[/url][/size]
- BarryK
- Puppy Master
- Posts: 9392
- Joined: Mon 09 May 2005, 09:23
- Location: Perth, Western Australia
- Contact:
@rufwoof,
The tmux thing inside container is interesting.
Regarding the standalone apps in containers, using xorg, that is an awkward one to make more secure. Probably could run xephyr, but window sizing is an issue.
@everyone,
Have built Easy 1.0.1 for the Pi3, running on my Model B (2015).
Libreoffice crashed at startup, reports "missing vcl resource." Something to do with localization. That is version 5.0.x compiled in OE.
I decided to compile Libreoffice 6.0.x, on my Rock64 board, which is running Quirky Pyro64 0.9.8. It has been compiling for several hours...
Anyway, expect a Pi3 release, 1.0.x, very soon.
I am not up with the latest Pi3 boards, there is a B+ I think? Don't know if my build has the right firmware for that.
The tmux thing inside container is interesting.
Regarding the standalone apps in containers, using xorg, that is an awkward one to make more secure. Probably could run xephyr, but window sizing is an issue.
@everyone,
Have built Easy 1.0.1 for the Pi3, running on my Model B (2015).
Libreoffice crashed at startup, reports "missing vcl resource." Something to do with localization. That is version 5.0.x compiled in OE.
I decided to compile Libreoffice 6.0.x, on my Rock64 board, which is running Quirky Pyro64 0.9.8. It has been compiling for several hours...
Anyway, expect a Pi3 release, 1.0.x, very soon.
I am not up with the latest Pi3 boards, there is a B+ I think? Don't know if my build has the right firmware for that.
[url]https://bkhome.org/news/[/url]
Didn't make it very clear Barry. I install tmux (and mc) outside of a container, in the main system (real/full root). Then use that for admin type activities, so no X (that otherwise a restricted userid X window could stuff commands/actions into). In effect I'm considering X and browser to be insecure, so running Xephyr (Easy container) and everything in that is in effect isolated. I only use the main/real root X session to do the admin tasks that cannot be run from cli (tmux), only doing so when the Easy container isn't running. cli versions of those admin tasks could be relatively easily added to the tput based cli menu that I create/maintain (such as container version controls etc.), but I haven't got around to doing that yet (current tput menu is more or less a duplicate of my OpenBSD tput menu as-is, but with reboot, shutdown ...etc. adjusted for EasyOS).BarryK wrote:@rufwoof,
The tmux thing inside container is interesting.
I do the same in OpenBSD. X (xenodm, that runs under a restricted userid), used to run a browser (and other X programs). Admin all done from/using cli/tmux/mc. I also turn off all setuid scripts (unavailable to 'others') which also helps close down potential security risks.
Xephyr seems quite good at isolating a user X window from a root X window. Standard (non Xephyr) containers much less so. I've provided simple xdotool based examples in the past of how a user X window can stuff commands into a root X window i.e. its relatively trivial. Such that a simple browser flaw that opened up a command level access, even though that might be running as a restricted userid (such as spot), can access other windows (such as a xterm window that's running as root, or a root owned rox filer window ...etc.).
Such browser flaws (that enable command actions as the userid running the browser) are quite common (and often openly published). And more often browser updates open up new choices/flaws.
tmux can even be used to open windows. For example at cli
Code: Select all
su spot
DISPLAY=:0 galculator
Another benefit of tmux is the ability to use ssh into other boxes and have multiple cli windows for that (and other activities). With tmux you can detatch and reattach, and even have multiple attaches i.e. two or more of you can log into the same box using the same userid and attach to the same tmux session, so whatever either does is seen by the other (collaboration). Or you can login/attach, start a activity such as a long compile, detatch, and then later log in again from another box/device and reattach again to see how far things had got.
I like to set F11 to add a new tmux window, F12 to step between windows ... as that sits well with mc using F1 to F10. For the command action that usually is ctrl-b such as ctrl-b c to create a new tmux window, I set that to be backtick as that's quicker/easier (for example backtick c to add a new tmux window). I also set it so if you press backtick twice it actually prints/shows a backtick ... such as if entering a execute command in a script (encased in backticks).
Generally I tend to maximise all windows and alt-tab between them in X, or F12 between them in tmux. Others like to use panes and have multiple panes in a single window and zoom/unzoom those. As in X, I tend to only have multiple windows on the same desktop (or multiple panes in the same tmux window) if I'm visually comparing things side by side.
tmux is a good tool, relatively small and worthy of being a default program in t2/EasyOS IMO.
[size=75]( ͡° ͜ʖ ͡°) :wq[/size]
[url=http://murga-linux.com/puppy/viewtopic.php?p=1028256#1028256][size=75]Fatdog multi-session usb[/url][/size]
[size=75][url=https://hashbang.sh]echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh[/url][/size]
[url=http://murga-linux.com/puppy/viewtopic.php?p=1028256#1028256][size=75]Fatdog multi-session usb[/url][/size]
[size=75][url=https://hashbang.sh]echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh[/url][/size]
Just changed my kernel boot parameter video=640x480 setting to 800x600 ... as that looks nicer on my 1440x900 monitor (cli). More visible in cli, without the font being too small.
[size=75]( ͡° ͜ʖ ͡°) :wq[/size]
[url=http://murga-linux.com/puppy/viewtopic.php?p=1028256#1028256][size=75]Fatdog multi-session usb[/url][/size]
[size=75][url=https://hashbang.sh]echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh[/url][/size]
[url=http://murga-linux.com/puppy/viewtopic.php?p=1028256#1028256][size=75]Fatdog multi-session usb[/url][/size]
[size=75][url=https://hashbang.sh]echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh[/url][/size]
Russian version testing
I have managed to boot Russian version from USB flash drive. Translation of console boot part is pretty good even if it is done by the machine. It needs some fixes though.
I needed special script to control laptop backlight brightness. I don't know if Easy has something build in for that. It is too bright for me by default. It also took me some time to figure out how to setup sound. Needed to select correct sound card.
I wanted to make fugal install to hard drive. Copied three files: sfs, vmlinuz, initrd to 'easy' directory on a partition and configured Grub2 to boot it. Then it asked me if I want partition to be encrypted and I accidentally said yes and then it said that sfs file was not found. Now that partition is encrypted and not bootable at all. I can open it from Ubuntu and see files. I wonder if it is possible to decrypt it somehow?
I needed special script to control laptop backlight brightness. I don't know if Easy has something build in for that. It is too bright for me by default. It also took me some time to figure out how to setup sound. Needed to select correct sound card.
I wanted to make fugal install to hard drive. Copied three files: sfs, vmlinuz, initrd to 'easy' directory on a partition and configured Grub2 to boot it. Then it asked me if I want partition to be encrypted and I accidentally said yes and then it said that sfs file was not found. Now that partition is encrypted and not bootable at all. I can open it from Ubuntu and see files. I wonder if it is possible to decrypt it somehow?
Last edited by rodin.s on Sun 27 Jan 2019, 03:11, edited 1 time in total.
easyinitrd.po Russian translation
Ok. I have translated easyinitrd.po. Fake gz.
- Attachments
-
- easyinitrd.po.gz
- (13.24 KiB) Downloaded 129 times
- BarryK
- Puppy Master
- Posts: 9392
- Joined: Mon 09 May 2005, 09:23
- Location: Perth, Western Australia
- Contact:
@rufwoof, @rodin.s,
Thanks for the responses. I am running on a different machine right now (Windows 10!). My main work-PC is busy doing a backup.
So, will re-read these posts when back on that PC. Also have to re-read the pm's as esmourguit has posted updates for fr translation, plus some fixes for scripts.
The news for now is there is a release for the Raspberry Pi:
http://bkhome.org/news/201901/easyos-10 ... ry-pi.html
I might divert awhile longer, build Easy 1.0.2 for the Rock64 board. After that will get back to catching up with updates and fixes that you guys have posted.
Thanks for the responses. I am running on a different machine right now (Windows 10!). My main work-PC is busy doing a backup.
So, will re-read these posts when back on that PC. Also have to re-read the pm's as esmourguit has posted updates for fr translation, plus some fixes for scripts.
The news for now is there is a release for the Raspberry Pi:
http://bkhome.org/news/201901/easyos-10 ... ry-pi.html
I might divert awhile longer, build Easy 1.0.2 for the Rock64 board. After that will get back to catching up with updates and fixes that you guys have posted.
[url]https://bkhome.org/news/[/url]
For fun/testing ... I booted easy 1.0 with video=800x600 qfix=nox kernel boot parameters, so just boots to cli.
I've tmux installed, so I started that, but that's optional (nicety).
At cli start a root owned X (in the background)
You now have root cli running on ctrl-alt F1 and X running on ctrl-alt F4 (black/empty screen)
From root cli (ctrl-alt F1) run
to start Xephyr/easy container
Now ctrl-alt F4 has a easy X desktop (jwm/icons/tray ...etc.)
I've installed portable firefox into that easy container, so it updates to the latest version as/when they're released, so I have firefox available alongside all the other usual programs (LibreOffice writer/calc, mtpaint, audacious ...etc.) within that container.
There's no active real root X desktop under this setup (there is, but its just a empty (black screen) X), so the Xephyr desktop is really isolated (restricted root), as is firefox or whatever is run within that. Equally however you don't have access to the usual real root X desktop programs (as its just a black screen X), so administering snapshots etc. all has to be done manually using the root cli interface. In OpenBSD I have a tput based menu that I run in one tmux window to do those sorts of admin functions.
cli (tmux/tput/mc ...etc) for real (all powerful) root along with X running under a restricted setup (easy container), so anything else run within that (firefox/whatever) is also restricted, is a good combination IMO. Very similar to how I run OpenBSD. But with the added benefits that the X (Xephyr/easy container) can easily be snapshot'd, rolled back/forward etc. My next step after this test and posting is to automate the startup of tmux and have tmux set to start up the Xephyr/easy container within one of its windows, so its all ready to go after each reboot. And then code a tput menu to do common admin/real root actions/functions. The likes of sc0ttman's cli package manager looks interesting in that respect.
There is always the option to run a real root X window in the Xephyr window using something like (from real root cli)
DISPLAY=:1 xterm &
... or any other real root X window program (petget ... whatever)
However that does introduce security risks (potential for restricted/contained root stuffing commands into that real root window).
If you do start a X window program that way from the real root cli command line, then running chvt 4 afterwards to do the same as pressing ctrl-alt F4 (switch to the Xephyr X desktop) is nice IMO.
I've tmux installed, so I started that, but that's optional (nicety).
At cli start a root owned X (in the background)
Code: Select all
X &
From root cli (ctrl-alt F1) run
Code: Select all
DISPLAY=:0 empty -f ec-chroot easy &
Now ctrl-alt F4 has a easy X desktop (jwm/icons/tray ...etc.)
I've installed portable firefox into that easy container, so it updates to the latest version as/when they're released, so I have firefox available alongside all the other usual programs (LibreOffice writer/calc, mtpaint, audacious ...etc.) within that container.
There's no active real root X desktop under this setup (there is, but its just a empty (black screen) X), so the Xephyr desktop is really isolated (restricted root), as is firefox or whatever is run within that. Equally however you don't have access to the usual real root X desktop programs (as its just a black screen X), so administering snapshots etc. all has to be done manually using the root cli interface. In OpenBSD I have a tput based menu that I run in one tmux window to do those sorts of admin functions.
cli (tmux/tput/mc ...etc) for real (all powerful) root along with X running under a restricted setup (easy container), so anything else run within that (firefox/whatever) is also restricted, is a good combination IMO. Very similar to how I run OpenBSD. But with the added benefits that the X (Xephyr/easy container) can easily be snapshot'd, rolled back/forward etc. My next step after this test and posting is to automate the startup of tmux and have tmux set to start up the Xephyr/easy container within one of its windows, so its all ready to go after each reboot. And then code a tput menu to do common admin/real root actions/functions. The likes of sc0ttman's cli package manager looks interesting in that respect.
There is always the option to run a real root X window in the Xephyr window using something like (from real root cli)
DISPLAY=:1 xterm &
... or any other real root X window program (petget ... whatever)
However that does introduce security risks (potential for restricted/contained root stuffing commands into that real root window).
If you do start a X window program that way from the real root cli command line, then running chvt 4 afterwards to do the same as pressing ctrl-alt F4 (switch to the Xephyr X desktop) is nice IMO.
[size=75]( ͡° ͜ʖ ͡°) :wq[/size]
[url=http://murga-linux.com/puppy/viewtopic.php?p=1028256#1028256][size=75]Fatdog multi-session usb[/url][/size]
[size=75][url=https://hashbang.sh]echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh[/url][/size]
[url=http://murga-linux.com/puppy/viewtopic.php?p=1028256#1028256][size=75]Fatdog multi-session usb[/url][/size]
[size=75][url=https://hashbang.sh]echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh[/url][/size]
This is the script I'm using to start tmux with two windows, the first showing my tput menu (called /root/admin) and the second that starts X and the easy container. I've called in /root/twin, so after I boot and see the root cli prompt I just run ./twin ... which results in a switch to the Xephyr/X/easy container window and where ctrl-alt F1 takes me back to that tmux/cli session
and where that admin tmux window looks something like the one I posted earlier (as below) - but where the tmux window names seen are 'admin' and 'xephyr'. That tput menu is a direct copy from my OpenBSD, which has still yet to be changed to be EasyOS specific (so far I've only changed the reboot and power down menu options).
Code: Select all
#!/bin/sh
#
# /root/twin ... my tmux initialisation script to initialise tmux windows
#
# start a tmux session, detach
# then send commands to that before reattaching to it
# Note that C-m is carriage return (enter)
# create a tmux session called work, and deattach so we can send keys to it
# send keys to rename the first window to admin (my tput menu)
tmux new -s work -d
tmux rename-window -t work admin
tmux send-keys -t work 'su - root -c "/root/admin"' C-m
# Add another tmux window, rename it to xephyr and load Xephyr
tmux new-window -t work
tmux rename-window -t work xephyr
tmux send-keys -t work 'X &' C-m
tmux send-keys -t work 'DISPLAY=:0 empty -f ec-chroot easy &' C-m
# and finally select which window to show first and attach to the tmux work session
tmux select-window -t work:0
tmux attach -t work
- Attachments
-
- console1-500.jpg
- (25.41 KiB) Downloaded 557 times
[size=75]( ͡° ͜ʖ ͡°) :wq[/size]
[url=http://murga-linux.com/puppy/viewtopic.php?p=1028256#1028256][size=75]Fatdog multi-session usb[/url][/size]
[size=75][url=https://hashbang.sh]echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh[/url][/size]
[url=http://murga-linux.com/puppy/viewtopic.php?p=1028256#1028256][size=75]Fatdog multi-session usb[/url][/size]
[size=75][url=https://hashbang.sh]echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh[/url][/size]
This is my (very messy) current admin (tput menu) script i.e. that produces the look as per my previous posted image
Code: Select all
#!/bin/sh
# reasonable source for tput codes
# http://wiki.bash-hackers.org/scripting/terminalcodes
# \ chars are weird inside echo -n and echo, not required to be delimited in echo, excepting
# hen before a ", but in echo -n they have to be escaped/delimited (at least that is what
# seems to the case to me).
PIDofdatetime=""
_show_date_time () {
while :
do
tput sc
tput bold
tput setaf 3
# tput cup 32 11
tput cup 12 5
echo `date +" %R %a %d %b"`
tput rc
sleep 60
done &
PIDofdatetime=$!
}
_calmonday () {
# Maps a standard Su start of week cal to a Mo start of week
# Yes that is a cal command line option choice for most, but not all i.e. Puppy busybox cal
# Also I was having troubles with current date highlighting and for Sa 1 start months (i.e. 1 Dec 2018
# it wasn't being highlighted so I fixed that my remapping that month to a monday start (cal -m)
# but that meant all months except 1 sat months had Su start whilst 1 Sa months had Mo start.
# Remapping all other months also to Mo start makes things more consistent i.e. this function being called
# in all cases except if a 1 Sa month
IFS=
t1=`mktemp`;t2=`mktemp` # create the two temp files
# Load the files with default Su start of week cal, that we'll wrap Su around to end of the set
cal | sed -r 's/(...)(.*)/\1/' >$t1 # Sunday list
cal | sed -r 's/(...)(.*)/\2/' >$t2 # Rest
exec 7<$t1;exec 8<$t2 # open the two files
read month <&8;read empty <&7;echo " $month"
read weekdays1 <&8;read weekdays2 <&7;echo "$weekdays1" "$weekdays2"
read dates2 <&7
[[ ! -z `echo ${dates2} | tr -d " "` ]] && echo " " "$dates2"
for i in 1 2 3 4 5 6;do
read dates1 <&8;read dates2 <&7
[[ ! -z `echo "$dates1 $dates2" | tr -d " "` ]] && echo "$dates1" "$dates2"
done
exec 7</dev/null ;exec 8</dev/null # close the files
rm $t1;rm $t2 # clean up
}
_show_cal () {
tput bold
tput setaf 6
echo
echo
echo
B=$(tput setaf 5;tput setab 7;tput rev;tput bold)
U=$(tput sgr0;tput setaf 6;tput bold)
DAY=$(date +%e)
D=$(date +%e | tr -d " ")
if [[ $DAY -lt 10 ]]; then
DAY=$(date +%e)
if [[ `date +%a%d` == "Sat01" ]]; then
# use -m caledar as crude fix for sat 1st months not having 1st highlighted
cal -m | sed -E -e "s|($DAY)([^0-9].*)| $B$D$U\2|" | sed 's/^/ /g' # three spaces in, current day highlighted
else
_calmonday | sed -E -e "s|($DAY)([^0-9].*)| $B$D$U\2|" | sed 's/^/ /g' # three spaces in, current day highlighted
fi
else
if [[ `date +%a` == "Mon" ]]; then
_calmonday | sed -E -e "s|($DAY)([^0-9].*)|$B$D$U\2|" | sed 's/^/ /g' # three spaces in, current day highlighted
else
_calmonday | sed -E -e "s|(.*[^0-9])($DAY)([^0-9].*)|\1$B\2$U\3|" | sed 's/^/ /g' # three spaces in, current day highlighted
fi
fi
}
# Set script so reads only a single char (avoids having to press ENTER)
# but that does limit the menu options to single character selections only
# HAVING SOME PROBLEMS WITH THIS, IF DOWN ARROW FOR INSTANCE THEN CONTROL
# CODE ENDING IN B RESULTED IN THE B OPTION BEING RUN
read_char() {
stty -icanon -echo
eval "$1=\$(dd bs=1 count=1 2>/dev/null)"
stty icanon echo
}
# Support upper/lower case mix (more than I use here)
_yesno () {
echo -n "Are you sure? "
echo -n "[y/N] "
read_char response
case "$response" in
[yY][eE][sS]|[yY])
return 0
;;
*)
return 1
;;
esac
}
_shutdown () {
clear
echo "#!/bin/ksh" >/tmp/shutdown
echo "echo STARTING SHUTDOWN IN 5 SECONDS" >>/tmp/shutdown
echo "echo " >>/tmp/shutdown
echo "echo PRESS ENTER TO CANCEL SHUTDOWN " >>/tmp/shutdown
echo "echo -n \"5 \"" >>/tmp/shutdown
echo "sleep 1" >>/tmp/shutdown
echo "echo -n \"... 4 \"" >>/tmp/shutdown
echo "sleep 1" >>/tmp/shutdown
echo "echo -n \"... 3 \"" >>/tmp/shutdown
echo "sleep 1" >>/tmp/shutdown
echo "echo -n \"... 2 \"" >>/tmp/shutdown
echo "sleep 1" >>/tmp/shutdown
echo "echo -n \"... 1 \"" >>/tmp/shutdown
echo "sleep 1" >>/tmp/shutdown
clear
echo "echo Shutting Down" >>/tmp/shutdown
echo "shutdown -p now" >>/tmp/shutdown
chmod +x /tmp/shutdown
/tmp/shutdown &
PID=$!
read
kill -9 $PID
rm /tmp/shutdown
}
_reboot () {
clear
echo "#!/bin/ksh" >/tmp/reboot
echo "echo STARTING REBOOT IN 5 SECONDS" >>/tmp/reboot
echo "echo " >>/tmp/reboot
echo "echo PRESS ENTER TO CANCEL SHUTDOWN " >>/tmp/reboot
echo "echo -n \"5 \"" >>/tmp/reboot
echo "sleep 1" >>/tmp/reboot
echo "echo -n \"... 4 \"" >>/tmp/reboot
echo "sleep 1" >>/tmp/reboot
echo "echo -n \"... 3 \"" >>/tmp/reboot
echo "sleep 1" >>/tmp/reboot
echo "echo -n \"... 2 \"" >>/tmp/reboot
echo "sleep 1" >>/tmp/reboot
echo "echo -n \"... 1 \"" >>/tmp/reboot
echo "sleep 1" >>/tmp/reboot
clear
echo "echo Rebooting" >>/tmp/reboot
echo "shutdown -r now" >>/tmp/reboot
chmod +x /tmp/reboot
/tmp/reboot &
PID=$!
read
kill -9 $PID
rm /tmp/reboot
}
trap 'tput reset;exit 1' 1 2 3 9 15
while :
do
tput sgr0
clear
_show_cal
tput setaf 3
tput bold
tput setaf 7
tput setab 1
tput cup 1 27 ; echo -n " R O O T "
tput setab 0
tput cup 3 27 ; echo -n " x user/X "
tput cup 12 54 ; echo -n " m mc file manager "
# tput cup 4 27 ; echo -n " d diary - calcurse "
tput cup 4 27 ; echo -n " b Google block "
tput cup 4 54 ; echo -n " B Google unblock "
tput cup 5 27 ; echo -n " t top "
tput cup 5 54 ; echo -n " h help/tips "
tput cup 6 27 ; echo -n " p powerdown "
tput cup 6 54 ; echo -n " r reboot "
tput cup 7 27 ; echo -n " s scan setuids "
tput cup 7 54 ; echo -n " S set setuids "
tput cup 8 27 ; echo -n " e test lib checksums "
tput cup 8 54 ; echo -n " E gen lib checksums "
tput cup 9 27 ; echo -n " u mount usb "
tput cup 9 54 ; echo -n " U umount usb "
tput cup 14 27 ; echo -n " a mount phone (wireless)"
tput cup 10 27 ; echo -n " R user cron deny "
tput cup 14 54 ; echo -n " A mount android (usb) "
tput cup 10 54 ; echo -n " z max vol/boost "
tput cup 13 54 ; echo -n " v video record desktop "
tput cup 12 27 ; echo -n " c calcurse "
# tput cup 15 54 ; echo -n " 3 mp3 cmus (music) "
tput cup 3 54 ; echo -n " q quit "
tput cup 11 27 ; echo -n " l mount ext2 sda3 "
tput cup 11 54 ; echo -n " L umount ext2 sda3 "
tput cup 13 27 ; echo -n " f fsck ext2 sda3 "
tput sgr0
_show_date_time # if remove this also remove the kill command a few lines down
tput cup 2 25 # prompt location
tput sc
read_char y
echo $y
kill $PIDofdatetime
case "$y" in
x) chvt 4;;
m) mc /root /root;;
b) clear;echo "copying /etc/hosts-google-fb to /etc/hosts";cp /etc/hosts-google-fb /etc/hosts;sleep 1;;
B) clear;echo "copying /etc/hosts-normal to /etc/hosts";cp /etc/hosts-normal /etc/hosts;sleep 1;;
t) top;;
h) vi /root/tips;;
p) poweroff;; # clear;if _yesno;then clear;shutdown -p now;sleep5;fi;;
r) reboot;; # clear;if _yesno;then clear;shutdown -r now;sleep 5;fi;;
s) /root/scan-setuids;;
S) clear;if _yesno;then clear;/root/set-setuids;fi;;
e) clear;cd /root/mtree;./validate;echo;echo -n "Press Enter ";read;;
E) clear;if _yesno;then clear;cd /root/mtree;./generate;echo;echo -n "Press Enter ";read;fi;;
u) mkdir /root/u;mount /dev/sd5i /root/u;;
U) sync;umount /root/u;;
a) mkdir /android;sshfs -p 2222 192.168.1.12:/data/data/com.arachnoid.sshelper/home/SDCard/ /android;;
R) echo "user" >/var/cron/cron.deny;chown root:crontab /var/cron/cron.deny;chmod 660 /var/cron/cron.deny;;
A) mkdir /android;mtp-connect;simple-mtpfs /android;;
z) clear;mixerctl outputs.hp_boost=on;mixerctl outputs.master=255,255;sleep 1;;
# 3) tmux new-window;tmux send-keys "cmus;exit" C-m;tmux send-keys ":add /mnt/Music" C-m;;
v) clear;rm /root/rec/mkv;ffmpeg -f x11grab -r 30 -s 1440x900 -i :0 -c:v libx264 -preset ultrafast -acodec copy /root/rec.mkv;iclear echo convertingi mkv to mp4;rm /root/rec.mp4;ffmpeg -i /root/rec.mkv /root/rec.mp4;; # needs user in X having run xhost +
q) tput reset;tput sgr0;clear;exit;;
c) tmux new-window;tmux send-keys "calcurse -c /mnt/calcurse;exit" C-m;;
l) mount /dev/sd0k /mnt;;
L) umount /dev/sd0k;;
f) clear;umount /dev/sd0k;e2fsck -f /dev/sd0k;;
# *) clear;if [[ -n "$y" ]];then $y;sleep 1;fi;;
esac
done
[size=75]( ͡° ͜ʖ ͡°) :wq[/size]
[url=http://murga-linux.com/puppy/viewtopic.php?p=1028256#1028256][size=75]Fatdog multi-session usb[/url][/size]
[size=75][url=https://hashbang.sh]echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh[/url][/size]
[url=http://murga-linux.com/puppy/viewtopic.php?p=1028256#1028256][size=75]Fatdog multi-session usb[/url][/size]
[size=75][url=https://hashbang.sh]echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh[/url][/size]
With the twin script to start X and run the easy container that I posted earlier (basically runs X & and then invokes the Easy container (empty -f ec-chroot easy &)), alongside the usual xwin, quite a nice way to run things is to boot to the standard xwin session (usual boot), but don't run the easy container within that, instead exit to command line and run twin. Then to flip back again ctrl-alt F1 to command line and pkill X and then run xwin again. That could be simplified with menu options in each of the Easy container and main xwin desktops to 'flip' to the other desktop. That way you don't have populated real X windows active whilst in the Easy container ... more separation/isolation.
alt F6 to switch between the container and main X isn't operational that way (inadvertently pressing ctrl-shift can disable that action anyway).
Don't run browser or other internet facing things in the main/xwin session ... only use it for admin purposes. Use the twin/Easy container to do the rest/other things.
Fundamentally that's just flipping between the main real root X session with its save area, and the Easy container restricted root X session with its own save area. With only one or the other ever active at any one time. It does mean a clean desktop at each flip, so you can't leave things running in the container whilst you flip to the main session and then flip back again as you can with the existing setup, but does ensure better separation/isolation.
alt F6 to switch between the container and main X isn't operational that way (inadvertently pressing ctrl-shift can disable that action anyway).
Don't run browser or other internet facing things in the main/xwin session ... only use it for admin purposes. Use the twin/Easy container to do the rest/other things.
Fundamentally that's just flipping between the main real root X session with its save area, and the Easy container restricted root X session with its own save area. With only one or the other ever active at any one time. It does mean a clean desktop at each flip, so you can't leave things running in the container whilst you flip to the main session and then flip back again as you can with the existing setup, but does ensure better separation/isolation.
[size=75]( ͡° ͜ʖ ͡°) :wq[/size]
[url=http://murga-linux.com/puppy/viewtopic.php?p=1028256#1028256][size=75]Fatdog multi-session usb[/url][/size]
[size=75][url=https://hashbang.sh]echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh[/url][/size]
[url=http://murga-linux.com/puppy/viewtopic.php?p=1028256#1028256][size=75]Fatdog multi-session usb[/url][/size]
[size=75][url=https://hashbang.sh]echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh[/url][/size]