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 Fri 19 Dec 2014, 22:33
All times are UTC - 4
 Forum index » Advanced Topics » Puppy Derivatives
Light-Debian-Core-Live-CD-Wheezy + Porteus-Wheezy
Moderators: Flash, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 140 of 271 [4055 Posts]   Goto page: Previous 1, 2, 3, ..., 138, 139, 140, 141, 142, ..., 269, 270, 271 Next
Author Message
sunburnt


Joined: 08 Jun 2005
Posts: 5043
Location: Arizona, U.S.A.

PostPosted: Sun 30 Mar 2014, 23:26    Post subject:  

# Trying to detect USB device type, H.D., CD-DVD, Flash, SD, etc.
It seems impossible to do this. It`s even very hard to detect if sdxx is removable or not.
dmesg and /var/log/messages is only way to detect a USB event. Difficult to parse them.
What a horrible mess Linux/Unix is... Getting info is a scattered and sketchy affair.
# Trying to write a USB installer for DebDog. Looks like it`s going to be ultra simple.


# Toni; Fixed I believe. Odd that only the e3 menu file caused it.
debmenu2desktop.convert.zip
Description 
zip

 Download 
Filename  debmenu2desktop.convert.zip 
Filesize  11.36 KB 
Downloaded  58 Time(s) 
Back to top
View user's profile Send private message 
sunburnt


Joined: 08 Jun 2005
Posts: 5043
Location: Arizona, U.S.A.

PostPosted: Sun 30 Mar 2014, 23:59    Post subject:  

# Toni & Fred; Do we have a way to use a dir. for the live-rw.? How about a partition.?
I read that Fred had a live-rw dir. working in PorteusDog.

# If partition is just Deb/PorteusDog + live-rw dir., then the partition can be 1-2 GB in size.
And so a fsck of the partition is quick, and at the same time the O.S. files get checked too.

# Thinking of a USB setup like this:

| Windows FAT partition | Boot partition 1-2GB | Extra O.S. partitions 1-2GB | Swap |

Most USBs would only have 2 partitions, "Windows FAT", and "Boot + Deb-Live".
FAT for the main storage area is okay, it can hold anything except Linux files. Better than NTFS.
And FAT dosen`t care if it`s mounted while doing a fsck, making it easy to maintain.
Most USBs won`t have other O.S.s, and a swap file/partition on a Flash device is a bad idea.
If the PC is low on ram, then using a second "expendable" 1-2GB Flash drive is a good solution.
I`m guessing a "swap" Flash drive will last about 6 months of normal daily use. So a cheap one...
Sadly buying more ram for old PCs is just a bad idea, DDR-3 costs less than older ram does.
.
Back to top
View user's profile Send private message 
saintless


Joined: 11 Jun 2011
Posts: 2724
Location: Bulgaria

PostPosted: Mon 31 Mar 2014, 00:58    Post subject:  

mcewanw wrote:
Further info in Section 9.4.12 onwards of:

http://qref.sourceforge.net/Debian/reference/ch-tune.en.html

THE ABOVE LINK LOOKS PARTICULARLY USEFUL. Provides an alternative trick to run sudo gui commands from normal user login:

Thank you, William!
I will test this today.

Quote:
I don't understand, Toni, how you were able to use su as a normal user and then run synaptics without this trick.

I see nothing strange since Debian Live Standard CD also doesn't need to use tricks like that. It has active user account and after installing X you get straight to X from login prompt. After sudo apt-get install synaptic all it needs is to type sudo synaptic and it starts. Nothing from your post above is needed.

The strange thing for me is XDM is the only Display manager that needs this operations to make Synaptic work.
LightDM and Slim does not need this to make Synaptic work for user.

Quote:
EDIT: works using sudo from user's xterm anyway, but I seem to have missed something cos didn't work from JWM menu and I'm going out so can't test further just now.

The script which starts Synaptic from menu is /opt/bin/synaptic-start:
Code:
#!/bin/bash

if [ "`whoami`" != "root" ]; then
xterm -e sudo synaptic
exit 0
fi

synaptic

It works for user when autologin is active and with LightDM and Slim without changing anything.
I guess the changes you posted make the user account to run direct the synaptic line in the script without sudo? Need to test this first to confirm.

Toni

_________________
Farewell, Nooby, you will be missed...
Back to top
View user's profile Send private message MSN Messenger 
saintless


Joined: 11 Jun 2011
Posts: 2724
Location: Bulgaria

PostPosted: Mon 31 Mar 2014, 01:11    Post subject:  

Quote:
# Trying to write a USB installer for DebDog. Looks like it`s going to be ultra simple.


# Toni; Fixed I believe. Odd that only the e3 menu file caused it.

Thank you, Terry!

sunburnt wrote:
# Toni & Fred; Do we have a way to use a dir. for the live-rw.? How about a partition.?

We can use folder only if DebianDog boots with porteus-boot-initrd. It will be available boot option in the beta iso version.
With debian live-boot which we use now and is default for DebianDog we can not use folder but we can use save partition. Haven't tested this myself but I think all we need is to make ext partition and label it live-rw.

Quote:
# Thinking of a USB setup like this:

| Windows FAT partition | Boot partition 1-2GB | Extra O.S. partitions 1-2GB | Swap |

I also think SWAP partition on flash drive is not needed.
Terry, the structure of DebianDog beta iso will be this one:
http://smokey01.com/saintless/Light-Wheezy/DebianDog-PorteusDog-test.iso
It has two initrd files and more files and folders in /live
It is needed to make it boot both ways - debian and porteus.
What about if the flash drive is only 1Gb or less? Will it be possible to install DebianDog on smaller flash drive?
DebianDog beta iso will be around 110 Mb with porteus-initrd and debian-initrd included.

Toni

_________________
Farewell, Nooby, you will be missed...
Back to top
View user's profile Send private message MSN Messenger 
sunburnt


Joined: 08 Jun 2005
Posts: 5043
Location: Arizona, U.S.A.

PostPosted: Mon 31 Mar 2014, 01:42    Post subject:  

So I assume it`s a bit of code in Porteus initrd that does the alternate live-rw setup.

# Q... Will DebDog boot with Porteus initrd with Wheezy kernel.? Is there a Porteus kernel.?

I don`t know differences, but if Fred put up lots of effort, then the initrd has some advantages.
# Could make 2 partitions, 1 for DebDog and 1 for live-rw. But both in 1 has advantages.

Toni; Didn`t mention, if USB < 8GB, then 1 Linux partition. Why make small even smaller.?


# Here`s "drive-info", it`s for the USB installer.
You can see the USB removable "rem" drive:
Code:
Part Type F/R Boot        Sizes            Drv.Label
=====================================================
sda1 ext3 fix boot 6.320-GiB 6786383872
sda2 swap fix      1.953-GiB 2097152000
sda3 ext3 fix      103.5-GiB 111148007424
sdb1 vfat rem boot 7.216-GiB 7747895808 Red-8gb

# What a pain it was getting just this info., 5 different sources were needed.!
/proc/partitions, dmesg, disktype, fdisk, and blkid
The best part is that all this info can be gotten with the partition un-mounted.

# The parted tools can do all of this and make and manipulate partitions.

# Makes me think of having env variables to hold each line of this info.
$PART_SDA1, $PART_SDA3, $PART_SDB1, etc.
Then no files to read and very little parsing to get the needed info.
At the very least, we should have a system info. file to "source" to get info.

# I`ll post the whole installer when it`s ready.
# Please give a test try with USBs in & out and let me know...

### UPDATE: Now has "Boot" column added ( See output above )..
drive-info.zip
Description  Path: /opt/bin
zip

 Download 
Filename  drive-info.zip 
Filesize  770 Bytes 
Downloaded  58 Time(s) 

Last edited by sunburnt on Mon 31 Mar 2014, 02:46; edited 6 times in total
Back to top
View user's profile Send private message 
mcewanw

Joined: 16 Aug 2007
Posts: 2350
Location: New Zealand

PostPosted: Mon 31 Mar 2014, 01:49    Post subject:  

saintless wrote:

The script which starts Synaptic from menu is /opt/bin/synaptic-start:
Code:
#!/bin/bash

if [ "`whoami`" != "root" ]; then
xterm -e sudo synaptic
exit 0
fi

synaptic

It works for user when autologin is active and with LightDM and Slim without changing anything.
I guess the changes you posted make the user account to run direct the synaptic line in the script without sudo? Need to test this first to confirm.

Toni


Yes, I knew that was the script. I'm a bit confused about what the problem really is, but it works, if I also change the /opt/bin/synaptic-start script to:

Code:
#!/bin/bash
if [ "`whoami`" != "root" ]; then
if [ -z "$XAUTHORITY" ]; then
XAUTHORITY=$HOME/.Xauthority
export XAUTHORITY
fi
xterm -e sudo synaptic
exit 0
fi

synaptic


So it seems the XAUTHORITY env variable wasn't being exported to that shell for some reason......

_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.
Back to top
View user's profile Send private message Visit poster's website 
mcewanw

Joined: 16 Aug 2007
Posts: 2350
Location: New Zealand

PostPosted: Mon 31 Mar 2014, 01:57    Post subject:  

saintless wrote:

sunburnt wrote:
# Toni & Fred; Do we have a way to use a dir. for the live-rw.?...

We can use folder only if DebianDog boots with porteus-boot-initrd


I'm actually using DebianDog with Porteus-boot-initrd (after Toni explained to me how to set up that method) so that I can use dir for persistence. I really really like that method because I can manually edit the persistence directory anytime and the changes reflect that editing thereafter. So I can quickly modify and whiteout files and so on and then simply delete the changes and get back to where I was. It's great!

_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.
Back to top
View user's profile Send private message Visit poster's website 
mcewanw

Joined: 16 Aug 2007
Posts: 2350
Location: New Zealand

PostPosted: Mon 31 Mar 2014, 02:05    Post subject:  

saintless wrote:

The strange thing for me is XDM is the only Display manager that needs this operations to make Synaptic work.
LightDM and Slim does not need this to make Synaptic work for user.


Yet that link I gave earlier includes the quote:

http://qref.sourceforge.net/Debian/reference/ch-tune.en.html

Quote:

9.4.12 Getting root in X

If a GUI program needs to be run with root privilege, use the following procedures to display program output on a user's X server


And root can't access user's X server without Xauthority. Do these other display managers you mention not use Xauthority method perhaps? I imagine kdm and gdm would?

_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.
Back to top
View user's profile Send private message Visit poster's website 
saintless


Joined: 11 Jun 2011
Posts: 2724
Location: Bulgaria

PostPosted: Mon 31 Mar 2014, 02:20    Post subject:  

sunburnt wrote:
So I assume it`s a bit of code in Porteus initrd that does the alternate live-rw setup.

# Q... Will DebDog boot with Porteus initrd with Wheezy kernel.? Is there a Porteus kernel.?

I don`t know differences, but if Fred put up lots of effort, then the initrd has some advantages.
# Could make 2 partitions, 1 for DebDog and 1 for live-rw. But both in 1 has advantages.

Hi, Terry.
The reason to keep debian-boot way is to keep DebianDog 100% Debian Wheezy compatible.
The kernel is the same for porteus and debian boot.
For porteus boot we use different initrd file + small second module with porteus changes less than 1 Mb. The second module is active only if porteus-boot is choosen.
Using save folder is not the only difference between porteus and debian boot way. Porteus has many other save options that debian does not have.


Quote:
# Here`s "drive-info", it`s for the USB installer.
# Please give a test try with USBs in & out and let me know...

Thank you, Terry!
I get missing disktype command message:
Code:
root@debian:~# drive-info

Part Type F/R        Sizes             Drv.Label
=================================================
/opt/bin/drive-info: line 18: disktype: command not found
sda1  fix   
/opt/bin/drive-info: line 18: disktype: command not found
sdb1  rem   INTENSO

root@debian:~#

Toni
Back to top
View user's profile Send private message MSN Messenger 
mcewanw

Joined: 16 Aug 2007
Posts: 2350
Location: New Zealand

PostPosted: Mon 31 Mar 2014, 02:27    Post subject:  

Toni, SLiM and so on do use xauth but must export XAUTHORITY info whereas have to do that manually for xdm. That's what I think must happen anyway. The following link seems to suggest how that is done and also for LightDM, gdm and kdm:

http://blog.fox.geek.nz/

EDIT: I've since discovered in DebianDog that the MIT-MAGIC-COOKIE-1 key for xdm seems to be stored /var/lib/xdm/authdir/authfiles/A${DISPLAY}-* (which is similar to kdm location pointed out in the above blog). Using that it would be also possible to make a script per the method in that blog and store it in /root/.bash_profile. However, I think the methods I described above would do for now at least anyway.

I still don't understand how you were able to use su (rather than sudo) under xdm login with programs like synaptic. Didn't seem to work out of the box for me and also because needed the Xauthority exported.

_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.

Last edited by mcewanw on Mon 31 Mar 2014, 03:03; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website 
saintless


Joined: 11 Jun 2011
Posts: 2724
Location: Bulgaria

PostPosted: Mon 31 Mar 2014, 02:33    Post subject:  

Hi, William.
mcewanw wrote:
Code:
#!/bin/bash
if [ "`whoami`" != "root" ]; then
if [ -z "$XAUTHORITY" ]; then
XAUTHORITY=$HOME/.Xauthority
export XAUTHORITY
fi
xterm -e sudo synaptic
exit 0
fi

synaptic


So it seems the XAUTHORITY env variable wasn't being exported to that shell for some reason......

We can use this code for synaptic till we find something better then.

Quote:

Quote:
9.4.12 Getting root in X If a GUI program needs to be run with root privilege, use the following procedures to display program output on a user's X server


And root can't access user's X server without Xauthority. Do these other display managers you mention not use Xauthority method perhaps? I imagine kdm and gdm would?

Maybe, but I doubt someone will ever install KDM or GDM on DebinaDog. It is better to use official debian since the small size is not possible with kdm and gdm.

The fact XDM is the first package that makes this problem for us means debian docs are not correct if not all login managers need to export xauthority.

Toni
Back to top
View user's profile Send private message MSN Messenger 
saintless


Joined: 11 Jun 2011
Posts: 2724
Location: Bulgaria

PostPosted: Mon 31 Mar 2014, 02:45    Post subject:  

mcewanw wrote:
Toni, SLiM and so on do use xauth but must export XAUTHORITY info whereas have to do that manually for xdm. That's what I think must happen anyway. The following link seems to suggest how that is done and also for LightDM, gdm and kdm:

http://blog.fox.geek.nz/

I still don't understand how you were able to use su (rather than sudo) under xdm login with programs like synaptic. Didn't seem to work out of the box for me and also because needed the Xauthority exported.

William,
Synaptic, Gpatrted and other programs work for user without using XDM or SLIM and with Slim installed without the changes in .bachrc and startup files. It should be mirracle since it works for me only.
I never had the changes you posted in /root/.bashrc and startup files in $HOME/

SLIM and LightDM do not need to exportapaths different way. They just use /etc/profile for this like there is no login manager installed at all.

Toni
Back to top
View user's profile Send private message MSN Messenger 
sunburnt


Joined: 08 Jun 2005
Posts: 5043
Location: Arizona, U.S.A.

PostPosted: Mon 31 Mar 2014, 02:55    Post subject:  

Toni; Thanks, I kinda thought we did not have disktype.

What`s the installed Squash size of "parted".? I counted to over 1 MB and quit.
disktype is 40 KB in size. Needed for file system type and both sizes.
Back to top
View user's profile Send private message 
mcewanw

Joined: 16 Aug 2007
Posts: 2350
Location: New Zealand

PostPosted: Mon 31 Mar 2014, 03:08    Post subject:  

saintless wrote:

William,
Synaptic, Gpatrted and other programs work for user without using XDM or SLIM and with Slim installed without the changes in .bachrc and startup files. It should be mirracle since it works for me only.
I never had the changes you posted in /root/.bashrc and startup files in $HOME/

SLIM and LightDM do not need to exportapaths different way. They just use /etc/profile for this like there is no login manager installed at all.

Toni


Sorry, I misunderstood a remark you made sometime earlier. I thought you were able to login via xdm to user puppy and then use su followed by calling up synaptic. That shouldn't work without Xauthority I think, but it seems you were talking about when you were not using xdm, which I understand. Note that the last link I provided above (from a blog) basically explains the difference with SLiM and LightDM and so on, compared to xdm - SLiM and LightDM seem to have an inbuilt auth mechanism which manages the provision of xauth to root on using sudo (that's what I infer anyway).

Like you suggest, we can just modify /opt/bin/synaptic-start for now and can always come back to this later if a better solution is found.

_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.
Back to top
View user's profile Send private message Visit poster's website 
saintless


Joined: 11 Jun 2011
Posts: 2724
Location: Bulgaria

PostPosted: Mon 31 Mar 2014, 03:24    Post subject:  

mcewanw wrote:
Sorry, I misunderstood a remark you made sometime earlier. I thought you were able to login via xdm to user puppy and then use su followed by calling up synaptic. That shouldn't work without Xauthority I think.

Sorry if I didn't make it clear enough, William.
I mean exactly that:
I login via XDM to puppy user account, but I do not start synaptic with su -c. I use su-to-root:
Code:
puppy@debian:~$ su-to-root -c synaptic
About to execute synaptic.
This command needs root privileges to be executed.
Using su...
Enter root password at prompt.
Password:

And Synaptic works.

Toni
Back to top
View user's profile Send private message MSN Messenger 
Display posts from previous:   Sort by:   
Page 140 of 271 [4055 Posts]   Goto page: Previous 1, 2, 3, ..., 138, 139, 140, 141, 142, ..., 269, 270, 271 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Puppy Derivatives
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


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