Tiny Core Linux
Tiny Core Base => TCB Talk => Topic started by: Rabie on January 17, 2022, 01:10:43 PM
-
Hi There,
i have wrote a script, that change the backgroud which the user select.
The script just edit the file setbackground and run it.
The Problem i am facing is that, after changing the the Background and run setbackground, the background doesn't get on both Monitors but in the middle of both. But after rebooting it does get on both Monitors.
So my question is, is there any way to get the Background on both Monitors without rebooting ?
Thnx
-
What setting did you use for hsetroot ?
I just compiled the latest version from github (https://github.com/himdel/hsetroot).
I gotta say, they behave differently even with the same command.
hsetroot -fill myfig.jpg
The old one stretchs the image across my two monitors.
The new one fills the monitors individually.
Makefile:
CFLAGS?=-mtune=generic -Os -pipe -flto -fno-exceptions -fuse-linker-plugin
LDFLAGS?=-Wl,-O1
Here's a quick comparison between the versions (Note that the binaries are stripped)
tc@box:~$ du /tmp/hsetroot/bin/*
24.0K /tmp/hsetroot/bin/hsetroot
16.0K /tmp/hsetroot/bin/hsr-outputs
tc@box:~$ du /tmp/tcloop/Xlibs/usr/local/bin/hs*
16.5K /tmp/tcloop/Xlibs/usr/local/bin/hsetroot
It appears that there's a new executable added. (hsr-outputs)
The old one:
tc@box:~$ hsetroot --help
hsetroot 1.0.2 - yet another wallpaper application
Syntaxis: hsetroot [command1 [arg1..]] [command2 [arg1..]]...
Gradients:
-add <color> Add color to range using distance 1
-addd <color> <distance> Add color to range using custom distance
-gradient <angle> Render gradient using specified angle
-clear Clear the color range
Solid:
-solid <color> Render a solid using the specified color
Image files:
-center <image> Render an image centered on screen
-tile <image> Render an image tiled
-full <image> Render an image maximum aspect
-fill <image> Render an image strechted
Manipulations:
-tint <color> Tint the current image
-blur <radius> Blur the current image
-sharpen <radius> Sharpen the current image
-contrast <amount> Adjust contrast of current image
-brightness <amount> Adjust brightness of current image
-gamma <amount> Adjust gamma level of current image
-flipv Flip the current image vertically
-fliph Flip the current image horizontally
-flipd Flip the current image diagonally
Misc:
-alpha <amount> Adjust alpha level for colors and images
-write <filename> Write current image to file
Colors are in the #rrbbgg or #rrggbbaa format.
Send bugreports to: hyriand@thegraveyard.org
The new one:
[tc@box:~$ /tmp/hsetroot/bin/hsetroot --help
hsetroot - yet another wallpaper application
Syntax: /tmp/hsetroot/bin/hsetroot [command1 [arg1..]] [command2 [arg1..]]...
Generic Options:
-root Treat multiple displays as one big screen (ignore xrandr outputs)
-screens <int> Set a screenmask to use
Gradients:
-add <color> Add color to range using distance 1
-addd <color> <distance> Add color to range using custom distance
-gradient <angle> Render gradient using specified angle
-clear Clear the color range
Solid:
-solid <color> Render a solid using the specified color
Image files:
-center <image> Render an image centered on screen
-cover <image> Render an image centered on screen scaled to fill the screen fully
-tile <image> Render an image tiled
-full <image> Render an image maximum aspect
-extend <image> Render an image max aspect and fill borders
-fill <image> Render an image stretched
Manipulations:
-tint <color> Tint the current image
-blur <radius> Blur the current image
-sharpen <radius> Sharpen the current image
-contrast <amount> Adjust contrast of current image
-brightness <amount> Adjust brightness of current image
-gamma <amount> Adjust gamma level of current image
-flipv Flip the current image vertically
-fliph Flip the current image horizontally
-flipd Flip the current image diagonally
Misc:
-alpha <amount> Adjust alpha level for colors and images
-write <filename> Write current image to file
Colors are in the #rgb, #rrggbb, #rrggbbaa, rgb:1/2/3 formats or a X color name.
Create issues at https://github.com/himdel/hsetroot/issues
/code]
-
Hi polikuo,
yes i think this ist what i exactly need.
This is the option i need -screens <int> Set a screenmask to use
Makefile:
CFLAGS?=-mtune=generic -Os -pipe -flto -fno-exceptions -fuse-linker-plugin
LDFLAGS?=-Wl,-O1
Could you tell me how did you compiled it from https://github.com/himdel/hsetroot ?
Cause there is no ./configure File
-
Hi Rabie
Which architecture are you using ?
If you're on x86_64, just edit the Makefile directly then type make.
Skipping the configure process.
Here are some other flags:
x86: -march=i486 -mtune=i686
x86_64: -mtune=generic
RPI32: -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp
RPI64: -march=armv8-a+crc -mtune=cortex-a72
Replace the parts according to your need.
-
Hi polikuo,
If you're on x86_64, just edit the Makefile directly then type make.
yes i have the x86_64 Version
i am getting an error
make
cc -g -O2 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -I/usr/local/include -I/usr/local/include -I/usr/local/include -c -o hsetroot.o hsetroot.c
In file included from hsetroot.c:1:
/usr/local/include/X11/Xlib.h:38:10: fatal error: sys/types.h: Datei oder Verzeichnis nicht gefunden
#include <sys/types.h>
^~~~~~~~~~~~~
compilation terminated.
make: *** [<builtin>: hsetroot.o] Error 1
this is the Makefile: (See Attachments)
what am i missing ? :-\
-
Hi Rabie
It looks like you did not install compiletc.tcz.
The missing file is in glibc_base-dev.tcz which is a dependency of compiletc.tcz.
-
Considering that hsetroot is a part of Xlibs.tcz
Will it be updated ? :)
The newer version DOES fix some bugs after all.
-
Hi Rabie
It looks like you did not install compiletc.tcz.
The missing file is in glibc_base-dev.tcz which is a dependency of compiletc.tcz.
Hi Rich,
OMG!
again so dumb! :P
Thx that did it
-
Hi Rabie
again so dumb! :P
That's OK. It makes other people think I might be smart. ::)
-
That's OK. It makes other people think I might be smart. ::)
you are ;D
By the Way.
The Topic can be marked as Solved.
Thank you @polikuo for your help
-
Hi Rabie
... The Topic can be marked as Solved. ...
Done. :)
-
oh just have one more question ;D
ist there a way to say that i dont want to setbackground at boot ?
Because after compiling the new hsetroot i edited /home/tc/.setbackground like this and it does what i want:
/usr/local/bin/hsetroot -screens 3 -gradient 0 -center background.jpg
and after rebooting the Background doesn't look like i set it until i start the command manually.
if you understand what i mean :-\
-
I think you should put hsetroot in your /home/tc/.local/bin
And undo the change to /home/tc/.setbackground
-
Considering that hsetroot is a part of Xlibs.tcz
Will it be updated ? :)
The newer version DOES fix some bugs after all.
I'll add it to the queue
Edit: I take it you mean to update hsetroot and not to add hsr-outputs?
-
hsetroot updated in Xlibs
-
I take it you mean to update hsetroot and not to add hsr-outputs?
Sorry, I have no clue, nor can I verify.
I can't access any TC boxes for this weekend.
-
Hi Juanito
... I take it you mean to update hsetroot and not to add hsr-outputs?
There aren't many descriptions of its purpose to be found. There is this:
hsr-outputs - command line tool to list screen sizes and positions
Found here:
https://github.com/himdel/hsetroot
Looking at the source code, it uses an Xinerama call to get a list of X offset, Y offset, width, and height for every
screen found. It has the option to print the results as text, csv, or json.