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 18 Apr 2014, 01:34
All times are UTC - 4
 Forum index » Advanced Topics » Puppy Projects
ArchPup - First Puppy with pacman for installing apps
Moderators: Flash, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 14 of 17 [247 Posts]   Goto page: Previous 1, 2, 3, ..., 12, 13, 14, 15, 16, 17 Next
Author Message
mavrothal


Joined: 24 Aug 2009
Posts: 1384

PostPosted: Wed 30 Jan 2013, 08:14    Post subject:  

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)

_________________
Kids all over the world go around with an XO laptop. They deserve one puppy (or many) too Very Happy
Back to top
View user's profile Send private message 
simargl
Guest


PostPosted: Wed 30 Jan 2013, 08:34    Post subject:  

Here is one good news!
I've managed to patch viewnior Shocked 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?
viewnior-1.3-1-i686.pkg.tar.xz.gz
Description 
gz

 Download 
Filename  viewnior-1.3-1-i686.pkg.tar.xz.gz 
Filesize  61.17 KB 
Downloaded  88 Time(s) 
Back to top
Scooby

Joined: 03 Mar 2012
Posts: 251

PostPosted: Wed 30 Jan 2013, 11:55    Post subject:  

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?
Back to top
View user's profile Send private message 
mavrothal


Joined: 24 Aug 2009
Posts: 1384

PostPosted: Wed 30 Jan 2013, 12:54    Post subject:  

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?

_________________
Kids all over the world go around with an XO laptop. They deserve one puppy (or many) too Very Happy
Back to top
View user's profile Send private message 
simargl
Guest


PostPosted: Wed 30 Jan 2013, 12:55    Post subject:  

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.
Back to top
Scooby

Joined: 03 Mar 2012
Posts: 251

PostPosted: Wed 30 Jan 2013, 13:10    Post subject:  

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
Back to top
View user's profile Send private message 
simargl
Guest


PostPosted: Wed 30 Jan 2013, 13:27    Post subject:  

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


Joined: 24 Aug 2009
Posts: 1384

PostPosted: Wed 30 Jan 2013, 13:32    Post subject:  

simargl wrote:
Maybe this script needs some polishing Rolling Eyes .


Here is my patch to wallpaper.sh

Code:
--- 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

_________________
Kids all over the world go around with an XO laptop. They deserve one puppy (or many) too Very Happy
Back to top
View user's profile Send private message 
Scooby

Joined: 03 Mar 2012
Posts: 251

PostPosted: Wed 30 Jan 2013, 13:38    Post subject:  

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
thunar.jpg
Description  thunar image
jpg

 Download 
Filename  thunar.jpg 
Filesize  170.9 KB 
Downloaded  89 Time(s) 
Back to top
View user's profile Send private message 
Scooby

Joined: 03 Mar 2012
Posts: 251

PostPosted: Wed 30 Jan 2013, 13:58    Post subject:  

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 Very Happy
Back to top
View user's profile Send private message 
simargl
Guest


PostPosted: Wed 30 Jan 2013, 13:59    Post subject:  

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"
Back to top
mavrothal


Joined: 24 Aug 2009
Posts: 1384

PostPosted: Wed 30 Jan 2013, 14:22    Post subject:  

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:
--- 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
 }
 

_________________
Kids all over the world go around with an XO laptop. They deserve one puppy (or many) too Very Happy
Back to top
View user's profile Send private message 
Scooby

Joined: 03 Mar 2012
Posts: 251

PostPosted: Wed 30 Jan 2013, 15:09    Post subject:  

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?
Back to top
View user's profile Send private message 
simargl
Guest


PostPosted: Wed 30 Jan 2013, 15:17    Post subject:  

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.
Back to top
mavrothal


Joined: 24 Aug 2009
Posts: 1384

PostPosted: Wed 30 Jan 2013, 16:04    Post subject:  

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:
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:
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

_________________
Kids all over the world go around with an XO laptop. They deserve one puppy (or many) too Very Happy
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 14 of 17 [247 Posts]   Goto page: Previous 1, 2, 3, ..., 12, 13, 14, 15, 16, 17 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Puppy Projects
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.0802s ][ Queries: 13 (0.0074s) ][ GZIP on ]