ArchPup - First Puppy with pacman for installing apps

A home for all kinds of Puppy related projects
Message
Author
User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#196 Post by mavrothal »

Scooby wrote: What was the problem with Thunar anyway, never understood it?
The problem is mostly with pup-volume-monitor, though thunar has its share too (try to see what is in your /proc folder)
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

simargl

#197 Post by simargl »

Here is one good news!
I've managed to patch viewnior :shock: to allow setting wallpaper in ArchPup. Wallpaper is set with
my old script wallpaper.sh: actually using small application imlibsetroot in background.
No need to mention - this will replace gpicview for next version.
Package is bellow, remove false gz and install with pacman -U pkgname. What do you think?
Attachments
viewnior-1.3-1-i686.pkg.tar.xz.gz
(61.17 KiB) Downloaded 262 times

Scooby
Posts: 599
Joined: Sat 03 Mar 2012, 09:04

#198 Post by Scooby »

mavrothal wrote: The problem is mostly with pup-volume-monitor, though thunar has its share too (try to see what is in your /proc folder)
What does pup-volume-monitor do, detect usb when you plugg it?

I dont know what you mean check /proc. Upon check I saw nothing special?


simargl

I tried viewnior. Set a background, it worked. Wanted to set it back. I opened 3601.jpg
in /usr/share/backgrounds folder, tried to set it as backround, failed. furthermore when I checked that folder both 3601.jpg and default.jpg was gone?

Wot happened?

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#199 Post by mavrothal »

Scooby wrote:What does pup-volume-monitor do, detect usb when you plugg it?
Yes. If you install thunar volman instead is much bigger with all the dependencies.
Scooby wrote:I dont know what you mean check /proc. Upon check I saw nothing special?
Do you see anything? Mine shows an empty directory. Apparently a known bug of thunar 1.6
Scooby wrote:Set a background, it worked. Wanted to set it back. I opened 3601.jpg
in /usr/share/backgrounds folder, tried to set it as backround, failed. furthermore when I checked that folder both 3601.jpg and default.jpg was gone?
I can confirm that.
Simargl, did you test it in 12.12.2 or in the upcoming 132?
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

simargl

#200 Post by simargl »

Hi Scooby, script wallpaper.sh allows only 2 files in /usr/share/backgrounds: one is default.jpg that is used as wallpaper and second
$RANDOM.jpg, that is wallpaper used before you set new one.I thought it would be bad to for example, if someone change 20
wallpapers, store them all in /usr/share/backgrounds and use some 10 MB in save file. So as images folder use anything except /usr/share/backgrounds.

Scooby
Posts: 599
Joined: Sat 03 Mar 2012, 09:04

#201 Post by Scooby »

But do you backup the old one? I guess its ment to be the one with random name

Is the snowflake wallpaper located anywhere else?

Hey, after setting there is no files in /usr/share/backgrounds at all
I have now no wallpaper at all

Something went wrong

simargl

#202 Post by simargl »

Maybe this script needs some polishing :roll: . Any ideas what should I do? Move default.jpg to /etc/wallpaper or some other folder
where no one will search it :lol:
Scooby original image cannot really be deleted, remove folder /initrd/pup_rw/usr/share/backgrounds, logout and it will be back

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#203 Post by mavrothal »

simargl wrote:Maybe this script needs some polishing :roll: .
Here is my patch to wallpaper.sh

Code: Select all

--- a/usr/sbin/wallpaper.sh	2013-01-07 23:30:06.000000000 +0200
+++ b/usr/sbin/wallpaper.sh	2013-01-30 19:29:26.000000000 +0200
@@ -2,13 +2,11 @@
 
 wallpaper="$1"
 [ ! $wallpaper ] && wallpaper=$(yad --window-icon="image-x-generic" --width 800 --height 600 --file --title="Select the image file")
-old=$RANDOM
 walldir="/usr/share/backgrounds"
 
 set_wallpaper() {
-  for i in $(ls $walldir --hide default.jpg); do rm $walldir/$i; done
-  if [ -f "$walldir/default.jpg" ]; then mv "$walldir/default.jpg" "$walldir/$old.jpg"; fi
-  cp $wallpaper $walldir/default.jpg
+  if [ -f "$walldir/default.jpg" ] && [ ! -L "$walldir/default.jpg" ]; then mv "$walldir/default.jpg" "$walldir/default_original.jpg"; fi
+  ln -sf $wallpaper $walldir/default.jpg
   imlibsetroot -p c -s f $walldir/default.jpg
   if [ "$(pidof conky)" ]; then
     killall conky; conky
Basically links to whatever file you want (so no size increase) and of course does not wipe out your backgrounds folder,
With this viewnior works fine as background setter
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

Scooby
Posts: 599
Joined: Sat 03 Mar 2012, 09:04

#204 Post by Scooby »

mavrothal wrote: Yes. If you install thunar volman instead is much bigger with all the dependencies.
612Kb VS ~60 Kb pup-volume-monitor
yeah a bit different. Maybe I can tolerate it, have to think about that
somehow spacefm doesnt sit well with me

I think I can live without automatic detection of plugging of USB
I mounted a USB m
anually but it didnt show after reload in thunar?
Why is this?
mavrothal wrote:
Do you see anything? Mine shows an empty directory. Apparently a known bug of thunar 1.6
Mine shows? Maybe cause I fixed dbus when questing for battery mon
Attachments
thunar.jpg
thunar image
(170.9 KiB) Downloaded 382 times

Scooby
Posts: 599
Joined: Sat 03 Mar 2012, 09:04

#205 Post by Scooby »

simargl wrote:Scooby original image cannot really be deleted, remove folder /initrd/pup_rw/usr/share/backgrounds, logout and it will be back
Yeah! snowflake is back :D

simargl

#206 Post by simargl »

Great marvothal, simple and perfect. No need to copy anything just symlink image, thanks once again.

Scooby, for me thunar showed USB drive only if it's plugged in on boot, but when I remove it, it would still
be shown in devices panel. Also newly inserted USB would never show.

I reported problem to pup-volume-monitor developer, but he never responded, so we must switch to other file manager
with proper USB drives handling.
Spacefm is very good for me, and it has some functions that are missing in Thunar like "Compress folder to archive"

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#207 Post by mavrothal »

simargl wrote: simple and perfect.
Not really! I could break it by trying to link to itself.
Here is a better patch that will prevent that.

Code: Select all

--- a/usr/sbin/wallpaper.sh	2013-01-07 23:30:06.000000000 +0200
+++ b/usr/sbin/wallpaper.sh	2013-01-30 20:18:11.000000000 +0200
@@ -2,16 +2,16 @@
 
 wallpaper="$1"
 [ ! $wallpaper ] && wallpaper=$(yad --window-icon="image-x-generic" --width 800 --height 600 --file --title="Select the image file")
-old=$RANDOM
 walldir="/usr/share/backgrounds"
 
+[ "`basename $wallpaper`" = "default.jpg" ] && exit 0
+
 set_wallpaper() {
-  for i in $(ls $walldir --hide default.jpg); do rm $walldir/$i; done
-  if [ -f "$walldir/default.jpg" ]; then mv "$walldir/default.jpg" "$walldir/$old.jpg"; fi
-  cp $wallpaper $walldir/default.jpg
+  if [ -f "$walldir/default.jpg" ] && [ ! -L "$walldir/default.jpg" ]; then mv "$walldir/default.jpg" "$walldir/default_original.jpg"; fi
+  ln -sf $wallpaper $walldir/default.jpg
   imlibsetroot -p c -s f $walldir/default.jpg
   if [ "$(pidof conky)" ]; then
-    killall conky; conky
+    killall conky; conky &
   fi
 }
 
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

Scooby
Posts: 599
Joined: Sat 03 Mar 2012, 09:04

#208 Post by Scooby »

simargl wrote: Scooby, for me thunar showed USB drive only if it's plugged in on boot, but when I remove it, it would still
be shown in devices panel. Also newly inserted USB would never show.
I mounted a usb from commandline and left computer for half an hour
When I came back it showed on thunar?

Spacefm is fine with original. I'm saying I probably could live with Thunars shortcomings.
Did you do something special on install or could I pacaman it on 132?

simargl

#209 Post by simargl »

Applied this new patch, also I remembered something more. What if someone mount a partition, then
set wallpaper located on that partition. On reboot default.jpg symbolic link would be broken. Should we think of that case?

@Scooby: You can install thunar using pacman, no problem. Actually I was patching thunar to
1.hide root warnings and 2.allow directly removing files without sending them to trash.
Found that patch in thunar-notrash in AUR.

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#210 Post by mavrothal »

simargl wrote:Applied this new patch, also I remembered something more. What if someone mount a partition, then
set wallpaper located on that partition. On reboot default.jpg symbolic link would be broken. Should we think of that case?
People can do strange things...

I guess /root/.start can be changed to something like this

Code: Select all

if [ -f /usr/share/backgrounds/default.jpg ] ; then
	imlibsetroot -p c -s f /usr/share/backgrounds/default.jpg &
else
	imlibsetroot -p c -s f /usr/share/backgrounds/default_original.jpg &
fi
Another option would be to check for errors after imlibsetroot and if present default to the file in pup_ro2 or pup_a (assuming is not a full install)

Code: Select all

imlibsetroot -p c -s f /usr/share/backgrounds/default.jpg ; [ $? -ne 0 ] && imlibsetroot -p c -s f  /initrd/pup_a/usr/share/backgrounds/default.jpg
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

Scooby
Posts: 599
Joined: Sat 03 Mar 2012, 09:04

#211 Post by Scooby »

more dbus errors of same variety but different application

installed udiskie

when run get error (same as with batti)
bus.exceptions.DBusException: org.freedesktop.DBus.Error.Spawn.ExecFailed: Failed to execute program /usr/lib/dbus-1.0/dbus-daemon-launch-helper:

I did som reaearch and
did

chmod +x /usr/lib/dbus-1.0/dbus-daemon-launch-helper

and then get a step further with error

dbus.exceptions.DBusException: org.freedesktop.DBus.Error.Spawn.ChildExited: Launch helper exited with unknown return code 127


Seems like there is a general problem with dbus?

stifiling
Posts: 388
Joined: Sun 30 Dec 2007, 03:56

#212 Post by stifiling »

scooby,

if you keep messing around with the udiskie/gvfs...it'll work. it's what i'm using. i used on the dbus-helper file "chmod +us" and restarting dbus-daemon and restarting x...and soon u'll see the combination and order that works. u also have to create the folder /run/media/root. that's where the drives get's mounted.

i like that volume monitor better because i like thunar better. Also because i use gvfs-smb...to browse the samba shares from my other computers. using thunar's intergrated "Network" icon.

another command i was using to check for errors is:

Code: Select all

udisks --enumerate
I'll try to find the exact order and let you know what it is, if i can find it before you do.

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#213 Post by mavrothal »

wrong post
Last edited by mavrothal on Wed 13 Feb 2013, 20:02, edited 1 time in total.
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

stifiling
Posts: 388
Joined: Sun 30 Dec 2007, 03:56

#214 Post by stifiling »

sim,

after the release of the much anticipated and long awaited 132...will you be doing the frequent updates like you were before? you know, like maybe 4-8 days later releasing 132-2, with the reported bugs fixed and workarounds included??

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#215 Post by mavrothal »

stifiling wrote:will you be doing the frequent updates like you were before?
From what I see, not so sure... :(
At least not here. :?
Hopefully is about something/someone else.
Attachments
simargl.jpg
(79.64 KiB) Downloaded 765 times
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

Post Reply