i3wm feh ignoring --bg-scale - i3

I started working with i3wm and wanted to configure the layout. However, I am not able to get feh working properly:
In the .config/i3/config file I stated
exec --no-startup-id xrandr --output Virtual-1 --mode 1920x1080
exec --no-startup-id feh --no-fehbg --bg-center --randomize .wallpaper/*
exec --no-startup-id picom -CGb
However, feh does not care about --bg-center and the background picture is shown multiple times.
picom then shows all programs I execute (for example the terminal only as big as the first one of the background images.
I use i3 on parrotOS in a VM.
feh's ignoring --bg-scale
picom's reaction on feh's failure

Related

geany does not open terminal to run my code, unless there is another terminal window is open

I am using geany version 1.36 in linux, whenever I press f5 or click on run icon in toolbar, it does not open any terminal window to run my code in. but if I open another terminal window and do nothing in it, just let it be there, all of a sudden f5 and run button work perfectly.
how can I fix this issue?
Try this:
Go to : Edit --> Preferences --> Tools --> Terminal :
Refer here For more clarification
And replace the existing lines with any of the given texts...
(Adding Terminal path here)
x-terminal-emulator -e /bin/sh %c
mate-terminal "-e /bin/sh %c"
x-terminal-emulator -e "/bin/sh %c"
xterm -e "/bin/sh %c"
xfce4-terminal -e "/bin/sh %c"
The 1st one worked for me.
For More Information about this issue Refer This Link
May you don't have the correct path for the terminal, every Linux OS comes with different terminal.
Try installing xterm:
sudo apt-get install xterm
And go to Edit>Tools>Preferences>Terminal, change the path for:
xterm -e "/bin/sh %c"

Start calcurse upon log in with i3

I am trying to set my i3 configuration file in order to autostart calcurse when I log in.
I have added the line
exec --no-startup-id calcurse
but it doesn't work.
If you want calcurse in an open window on startup, try exec --no-startup-id [xterm/urxvt/whatever_terminal_you_use] -e calcurse. (most terminal use -e to execute a command, check the terminal help if it does not work)
If you want calcurse to run in the background (to get event notifications, and you will still be able to access the interface by executing calcurse in a terminal), go with exec --no-startup-id calcurse --daemon

Open GNU Screen with multiple windows

How to create a script that runs gnu screen with multiple windows, each window runs a command
For example
window 1 runs python3 -m http.server
window 2 runs webpack --watch
a screen with 2 windows start when I run script ./start.sh
I figured it out myselft, make a .screenrc file like this
startup_message off
caption always "%{= kw} %-w%{= gW} %n %t %{-}%+w %-="
screen -t http ./scripts/serve.sh
screen -t watch ./scripts/watch.sh
then run screen -c .screenrc

Use of watch to update image displayed in linux every N seconds fails

I have some codes that automatically generate Machine Learning plots on a server, sending plots to IoT clients at appropriate times for display.
The data pipeline works. However, my attempt to update the image in near real-time when a new plot is push is not working.
Currently my approach is:
user#client:~/data_viz $ watch -n3 feh -F plot0.png --zoom 200
where feh is some arbitrary lightweight Linux image viewer.
The problem is that even when the file (plot0.png) is overwritten successfully the viewer does not update until you kill it and restart it.
Update: I've acheived the world's worst version of this with the Bash approach below. The only problem now is that it flashes the desktop every second and will undoubtedly cause a seizure if I don't fix that...
$ watch -n2 sudo bash watch.sh
where watch.sh is
#!/bin/bash
i="0"
while [ $i -lt 4 ]
do
pkill feh
sleep 1
feh -F plot0.png --zoom 200&
sleep 1
pkill feh
done
There also seems to be no way to actually break the infinite loop even with Esc and ctrl+c. I want the loop to be infinite, but I also would prefer to be able to interrupt it when I have to.
While feh, like most image viewers/editors, does not watch the image-file for changes and automatically reload if changes occur, it does provide the -R, --reload <int> option that will cause feh to reload the image after the number of seconds specified as <int> transpire. For example:
feh --reload 5 image.png
will cause feh to reload image.png every 5 seconds. man 1 feh explains:
-R, --reload <int>
Reload filelist and current image after int seconds. Useful for viewing
HTTP webcams or frequently changing directories. (Note that the filelist
reloading is still experimental.)
If an image is removed, feh will either show the next one or quit.
However, if an image still exists, but can no longer be loaded, feh
will continue to try loading it.

Raspbian (jessie) open new terminal window

I'm pretty new to Linux / Raspberry PI.
I want to run a command from a shell script in a new shell window since commands like "cvlc music.mp3" (VLC PLAYER) would block the shell until playback has beenn finished.
Therefore it would be nice to export the playback command to another shell
Is this correct?
gnome-terminal && lxterminal don't seem to be an option for the distribution
for testing purpose I created two dumnmy shell-scripts:
[start.sh]
#!/bin/sh
lxterminal\
--title="MyScriptWindow" \
-e "bash -c ./exe.sh;bash"\
[exe.sh]
#!/bin/sh
echo "Hello World"
[output]
root#raspberrypi:/home/pi# ./start.sh
(lxterminal:1315): Gtk-WARNING **: cannot open display:
If I've understood correctly, you are doing all this only because you want the shell to be released at the execution of your cvlc.
You only need to detach it from shell standard output and run it as a background process
nohup cvlc music.mp3 &
is this enought ?
You could also run the program in background
$> ./test.sh &
Or use screen
Using these command you wont block your shell.

Resources