Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 26 Nov 2014, 19:19
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
Puppy In-House Development
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 13 of 25 Posts_count   Goto page: Previous 1, 2, 3, ..., 11, 12, 13, 14, 15, ..., 23, 24, 25 Next
Author Message
technosaurus


Joined: 18 May 2008
Posts: 4379

PostPosted: Mon 09 Dec 2013, 21:17    Post_subject:  

@laurentius77 - Your X is working, "ratpoison" (like many other window managers) does not provide any desktop environment ... it just manages windows ... my microsaurus experiment used only jwm to provide the full desktop since it does have many extras (the whole !distro was still less than 1Mb)

Hows bout I try to simplify init and xinit into a single shorty (ported from my c implementation to shell)
Code:
#!/bin/sh
#Normally these variables would be in a sourced config file - here for brevity
#X="Xorg"
X="Xvesa -screen 1280x800x24 -nolisten tcp"
wm="jwm"
PATH=/bin #... etc (all my binary dirs symlink to /bin :) )
HOME=/root
TERM=rxvt
PS1="  > "
SHELL=/bin/sh
export X wm PATH HOME TERM PS1 SHELL

waitforX(){
    while [ ! -S /tmp/.X11-unix/X0]; do sleep .1;done
    [ "$DISPLAY" ] || export DISPLAY=":0"
}

mount -t proc none /proc
mount -t sysfs none /sys
mount -t devtmpfs none /dev #or config kernel to do this
$X & waitforX && $wm


**that should boot you to X really fast (but IIRC some X servers will require a login as root as well), but you'll need to set up other env vars for things like ROX and you'll want to mount /dev/pts for rxvt to work, but that can be done in X with an autostart script such as jwm's StartupCommand or as part of the freedesktop autostart API ... something like:
for x in $HOME/.autostart/*;do $x;done

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send_private_message 
01micko


Joined: 11 Oct 2008
Posts: 7841
Location: qld

PostPosted: Mon 09 Dec 2013, 21:43    Post_subject:  

Now part of woof-CE technosaurus..

https://github.com/puppylinux-woof-CE/woof-CE/blob/02a4d803988f12c0b740c925557ed989a5c79ec8/woof-code/rootfs-skeleton/etc/xdg/templates/_root_.jwmrc

Code:
<StartupCommand>
for i in $HOME/.config/autostart/*.desktop;do if [ -f $i ];then xdg-open $i;fi;done
</StartupCommand>

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send_private_message Visit_website 
technosaurus


Joined: 18 May 2008
Posts: 4379

PostPosted: Mon 09 Dec 2013, 23:16    Post_subject:  

01micko wrote:
Code:
<StartupCommand>
for i in $HOME/.config/autostart/*.desktop;do if [ -f $i ];then xdg-open $i;fi;done
</StartupCommand>
Thanks for fixing my mis-remembering of the autostart directory. (Note: for multiuser there are additional directories to consider if anyone is going that direction ...$XDG_CONFIG_DIRS)
_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send_private_message 
laurentius77

Joined: 30 Mar 2011
Posts: 61

PostPosted: Tue 10 Dec 2013, 07:22    Post_subject:  

01micko wrote:
@laurentius77

X is started Wink

Read some info about the window manager named "rat-poison".. named so because there is no mouse usage at all. Works ok for me.

BTW.. just for anyone interested, this is how I boot lazyux on a stick.

# isohybrid lazyux.iso
# dd if=lazyux.iso of=/dev/sdX #where X is your usb stick, eg: sdc NOT sdc1, which is a partition on the usb stick. Be careful! You can wipe your HDD if you get it wrong.

Put stick in target machine >> ensure boot from usb stick is the default (or choose from menu, many BIOS have this these days) - power on >> watch it boot >> at login prompt type root (you may not see the entry, don't worry) >> at password prompt type root >> after successful login type xinit ... rtfm about rat-poison!


I expected that Ratpoison to be not different from Puppy X manager but I was on a wrong way...I read the documentation and exercised some commands. It's very different and very interesting.
Regarding installing Lazyux on usb I have already installed it using Universal USB Installer from Windows, worked for any ISO livecd that I tried until now.

I intend to compile Openvpn and Asterisk for Lazyux and I am asking myself if this will be possible to accomplish... ?
Back to top
View user's profile Send_private_message 
Iguleder


Joined: 11 Aug 2009
Posts: 1924
Location: Israel, somewhere in the beautiful desert

PostPosted: Tue 10 Dec 2013, 07:25    Post_subject:  

It lacks networking support - it's too early for that.
_________________
My homepage
Back to top
View user's profile Send_private_message Visit_website MSNM 
ICQ 
laurentius77

Joined: 30 Mar 2011
Posts: 61

PostPosted: Tue 10 Dec 2013, 07:45    Post_subject:  

Iguleder wrote:
It lacks networking support - it's too early for that.


Yes, I know it lacks networking support. Should I understand that when the network support will be there it will be possible? It would be great to have a small, secure distro working as an asterisk or openvpn server.

I was thinking also if it will be possible to compile Linux libre kernel with grsecurity http://grsecurity.net/ for the Linux Libre kernel, somebody did it already http://forums.grsecurity.net/viewtopic.php?f=3&t=3569. Also here are some ideeas on improving Linux security http://wiki.securix.org/doku.php.
Thank you for your work, the distro works great on my hardware, when boot it from USB.

I couldn't make it start in Virtual Box...there is a Kernel panic error. Tried in VMWare player with no success, it freeze wit Starting dropbear...

I will inform you on every problem that I met on the distro, excuse me for being sometimes wrong.
Thank you for your great work.
Back to top
View user's profile Send_private_message 
Iguleder


Joined: 11 Aug 2009
Posts: 1924
Location: Israel, somewhere in the beautiful desert

PostPosted: Fri 13 Dec 2013, 06:38    Post_subject:  

A "storm" (as they call it in newspapers) destroyed my router - I installed OpenWRT and made it a WiFi bridge - now, my domain (including the ISO repository) is back to life.

EDIT: I added a fork of xinit 1.1.1 to tinyxserver - I think I can also add the fixed fonts and the cursor font, so the entire X server ships as a single, easy to build package.

_________________
My homepage
Back to top
View user's profile Send_private_message Visit_website MSNM 
ICQ 
amigo

Joined: 02 Apr 2007
Posts: 2278

PostPosted: Fri 13 Dec 2013, 11:44    Post_subject:  

"ships as a single, easy to build package" I recently had started doing some work in tinyX sources to eliminate all references to installed versions of libs and especially headers. tinyX won't build out-of-the-box on systems where very modern X is installed as the inlcudes in the sources reference installed locations whose code is now incompatible.

I didn't have to time to get very far with the work -it would be nice if one of you did this as you are digging around in there...

What sort of changes did you make to xinit?
Back to top
View user's profile Send_private_message 
Iguleder


Joined: 11 Aug 2009
Posts: 1924
Location: Israel, somewhere in the beautiful desert

PostPosted: Fri 13 Dec 2013, 12:02    Post_subject:  

Just kicked BINDIR and replaced SIGVAL with int. Cool

EDIT: I added font-cursor-misc, font-misc-misc and font-alias. Now, building tinyxserver is pretty simple - build tinyxlib, then tinyxserver - that's it! Smile

_________________
My homepage
Back to top
View user's profile Send_private_message Visit_website MSNM 
ICQ 
amigo

Joined: 02 Apr 2007
Posts: 2278

PostPosted: Fri 13 Dec 2013, 16:23    Post_subject:  

Are the sources up on your github?
Back to top
View user's profile Send_private_message 
Iguleder


Joined: 11 Aug 2009
Posts: 1924
Location: Israel, somewhere in the beautiful desert

PostPosted: Fri 13 Dec 2013, 17:46    Post_subject:  

Yes - I pushed everything.

I also made PS/2 support built-in, so touchpads should work well now. Currently, I'm trying to build the entire package set on pemasu's Wheezy, since it fails to build on Slacko. I want to do a woof-CE experiment - produce a barebones Puppy with these packages, plus the packages in the "common" repo - totally independent of other distros and T2 (well, that's the goal of this project, after all). Very Happy

EDIT: built just fine - time to get some sleep, tomorrow I'll create a PET repository from these packages Smile

EDIT 2: uploaded everything - here. woof-CE is running Wink

_________________
My homepage
Back to top
View user's profile Send_private_message Visit_website MSNM 
ICQ 
Karl Godt


Joined: 20 Jun 2010
Posts: 3972
Location: Kiel,Germany

PostPosted: Fri 13 Dec 2013, 18:54    Post_subject:  

Iguleder wrote:
A "storm" (as they call it in newspapers) destroyed my router - I installed OpenWRT and made it a WiFi bridge - now, my domain (including the ISO repository) is back to life.


Unbelievable :
http://www.telegraph.co.uk/news/worldnews/middleeast/israel/10516498/Historic-snow-storms-spread-havoc-and-misery-across-the-Middle-East.html wrote:

Several inches of snow fell in the Sinai Peninsual, usually an arid desert region, while authorities were forced to close the port in the coastal city of Alexandria – which saw relatively light snowfall – after a third consecutive day of bad weather and high winds.
..
Up to 15 inches of snow blocked many streets in Jerusalem
..
The wintery outbreak seemed all the more for severe after several weeks of record-breaking high temperatures in November and early December.


Do you have the router on top of the roof, or did you forgot to close the window ?
Back to top
View user's profile Send_private_message Visit_website 
Iguleder


Joined: 11 Aug 2009
Posts: 1924
Location: Israel, somewhere in the beautiful desert

PostPosted: Sat 14 Dec 2013, 07:02    Post_subject:  

lol Laughing

Now, some power surge or something caused it hang - it's up and running, but it doesn't route Laughing

The stock firmware is horrible (this happens pretty much once in two weeks) and the storm made this problem persistent somehow, so I replaced it with something more reliable.

EDIT: failure - it seems more static PETs are needed.

_________________
My homepage
Back to top
View user's profile Send_private_message Visit_website MSNM 
ICQ 
technosaurus


Joined: 18 May 2008
Posts: 4379

PostPosted: Wed 01 Jan 2014, 06:07    Post_subject:  

Can someone with x86_64 check if this (non-posix, but simpler) mount I wrote works
gcc -nostdlib -Os -ffreestanding -fomit-frame-pointer -o mount mount.c -s
Code:
asm(
".text\n"
".global _start\n"
"_start:\n"
"   popl   %ecx\n"
"   movl   %esp,%esi\n"
"   pushl   %esi\n"
"   pushl   %ecx\n"
"   call   main\n"
"   movl   %eax,%ebx\n"
"   movl   $1, %eax\n"
"   int   $0x80\n"
"   hlt\n"
".Lstart:\n"
"   .size    _start,.Lstart-_start\n"
);

#define MS_MGC_VAL 0xC0ED0000

int main(int argc, char **argv){
   if (argc!=6) return argc; //todo usage
   long ret,flags=MS_MGC_VAL;
   while (*argv[4] && ((unsigned)(*argv[4])-'@'<32))
      flags|=1<<((unsigned)(*argv[4]++)-'@');
   asm(
      "int $128"
      :   "=a"(ret)
      :   "a"(21),
         "b"((long)argv[1]),
         "c"((long)argv[2]),
         "d"((long)argv[3]),
         "S"((long)flags),
         "D"((long)0)
      : "memory"
   );
   return ret;
}


Code:
usage: mount source target filesystemtype mountflags data
source - device or image to mount
target - directory to mount it on
filesystemtype - the filesystem type of the source
mountflags - string of mount flags. "BJ" == MS_NODEV|MS_NOATIME
   @  MS_RDONLY
   A  MS_NOSUID
   B  MS_NODEV
   C  MS_NOEXEC
   D  MS_SYNCHRONOUS
   E  MS_REMOUNT
   F  MS_MANDLOCK
   G  MS_DIRSYNC
   J  MS_NOATIME
   K  MS_NODIRATIME
   L  MS_BIND
   M  MS_MOVE
   N  MS_REC
   O  MS_VERBOSE||MS_SILENT
   P  MS_POSIXACL
   Q  MS_UNBINDABLE
   R  MS_PRIVATE
   S  MS_SLAVE
   T  MS_SHARED
   U  MS_RELATIME
   V  MS_KERNMOUNT
   W  MS_I_VERSION
   X  MS_STRICTATIME
   ^  MS_ACTIVE
   _  MS_NOUSER
data - see filesystem specific man page.

I am trying to get key components below 384 bytes after:
# strip --strip-all -R .note -R .comment mount
# sstrip mount

according to: this article it can mean 20X+ speedup.

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send_private_message 
L18L

Joined: 19 Jun 2010
Posts: 2579
Location: www.eussenheim.de/

PostPosted: Wed 01 Jan 2014, 06:52    Post_subject:  

technosaurus wrote:
Can someone with x86_64 check if this (non-posix, but simpler) mount I wrote works
gcc -nostdlib -Os -ffreestanding -fomit-frame-pointer -o mount mount.c -s

Code:
# gcc -nostdlib -Os -ffreestanding -fomit-frame-pointer -o mount mount.c -s
/tmp/ccFmBe4O.s: Assembler messages:
/tmp/ccFmBe4O.s:6: Error: invalid instruction suffix for `pop'
/tmp/ccFmBe4O.s:8: Error: invalid instruction suffix for `push'
/tmp/ccFmBe4O.s:9: Error: invalid instruction suffix for `push'
#
Crying or Very sad
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 13 of 25 Posts_count   Goto page: Previous 1, 2, 3, ..., 11, 12, 13, 14, 15, ..., 23, 24, 25 Next
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Cutting edge
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1071s ][ Queries: 12 (0.0081s) ][ GZIP on ]