*socket = wl_display_add_socket_auto (display);
if (!socket) {
fprintf (stderr, "unable to add socket to wayland display\n");
return 1;
}
printf ("running wayland display on %s\n", socket);
struct server_state state = { .data_f = NULL };
wl_global_create (display, &wl_output_interface,
wl_output_interface.version, &state, wl_output_handle_bind);
struct wl_event_loop *event = wl_display_get_event_loop (display);
wl_display_run (display);
wl_display_destroy (display);
return 0;
}
[client.c](https://pastebin.com/akjjUkX9)
#include <stdint.h>
#include <stdio.h>
#include <wayland-client.h> // (default include from wayland package)
struct server_state {
struct wl_display* output;
// struct wl_..;
};
static void display_handle_geometry (void *data,
struct wl_output *output,
int x, int y,
int physical_width,
int physical_height,
int subpixel,
const char *make,
const char *model,
int transform) {
printf ("info: triggering: display_handle_geometry");
}
static void display_handle_mode (void *data,
struct wl_output *wl_output,
uint32_t flags,
int width,
int height,
int refresh) {
printf ("info: triggering: display_handle_mode");
}
static const struct wl_output_listener output_listener = {
display_handle_geometry,
display_handle_mode
};
static void registry_handle_global (void* data,
struct wl_registry* registry,
uint32_t id,
const char* interface,
uint32_t version) {
struct server_state state;
printf ("info: %s\n", interface);
if (strcmp (interface, wl_output_interface.name) == 0) {
printf ("info: binding: output interface\n");
state.output = wl_registry_bind (registry, id, &wl_output_interface, wl_output_interface.version);
wl_output_add_listener (state.output, &output_listener, data);
}
}
static void registry_handle_global_remove (void* data,
struct wl_registry* registry,
uint32_t name) {
// free (..);
}
static const struct wl_registry_listener registry_listener = {
.global = registry_handle_global,
.global_remove = registry_handle_global_remove,
};
int main (int argc, char* argv[]) {
struct wl_display* display = wl_display_connect ("wayland-1");
struct wl_registry* registry = wl_display_get_registry (display);
if (display == NULL) { fprintf (stderr, "can't connect to display\n"); return 1; }
if (registry == NULL) { fprintf (stderr, "can't connect to registry\n"); return 1; }
wl_registry_add_listener (registry, ®istry_listener, NULL);
wl_display_roundtrip (display);
wl_display_dispatch (display);
return 0;
}
https://redd.it/ltk87t
@r_linux
if (!socket) {
fprintf (stderr, "unable to add socket to wayland display\n");
return 1;
}
printf ("running wayland display on %s\n", socket);
struct server_state state = { .data_f = NULL };
wl_global_create (display, &wl_output_interface,
wl_output_interface.version, &state, wl_output_handle_bind);
struct wl_event_loop *event = wl_display_get_event_loop (display);
wl_display_run (display);
wl_display_destroy (display);
return 0;
}
[client.c](https://pastebin.com/akjjUkX9)
#include <stdint.h>
#include <stdio.h>
#include <wayland-client.h> // (default include from wayland package)
struct server_state {
struct wl_display* output;
// struct wl_..;
};
static void display_handle_geometry (void *data,
struct wl_output *output,
int x, int y,
int physical_width,
int physical_height,
int subpixel,
const char *make,
const char *model,
int transform) {
printf ("info: triggering: display_handle_geometry");
}
static void display_handle_mode (void *data,
struct wl_output *wl_output,
uint32_t flags,
int width,
int height,
int refresh) {
printf ("info: triggering: display_handle_mode");
}
static const struct wl_output_listener output_listener = {
display_handle_geometry,
display_handle_mode
};
static void registry_handle_global (void* data,
struct wl_registry* registry,
uint32_t id,
const char* interface,
uint32_t version) {
struct server_state state;
printf ("info: %s\n", interface);
if (strcmp (interface, wl_output_interface.name) == 0) {
printf ("info: binding: output interface\n");
state.output = wl_registry_bind (registry, id, &wl_output_interface, wl_output_interface.version);
wl_output_add_listener (state.output, &output_listener, data);
}
}
static void registry_handle_global_remove (void* data,
struct wl_registry* registry,
uint32_t name) {
// free (..);
}
static const struct wl_registry_listener registry_listener = {
.global = registry_handle_global,
.global_remove = registry_handle_global_remove,
};
int main (int argc, char* argv[]) {
struct wl_display* display = wl_display_connect ("wayland-1");
struct wl_registry* registry = wl_display_get_registry (display);
if (display == NULL) { fprintf (stderr, "can't connect to display\n"); return 1; }
if (registry == NULL) { fprintf (stderr, "can't connect to registry\n"); return 1; }
wl_registry_add_listener (registry, ®istry_listener, NULL);
wl_display_roundtrip (display);
wl_display_dispatch (display);
return 0;
}
https://redd.it/ltk87t
@r_linux
Pastebin
client.c - Pastebin.com
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Trying to Find What is Going Wrong With my Install
I am attempting to test out this automatic ripping machine but encountering issues during the install.
I am following the "Install" section from the git page, but when I get into setting up and installing the repos I consistently run into the same issue:
for the "NumOnly" line I keep getting the failure echo and do not understand why. This command is a little foreign to me and I am not totally sure what I am trying to do with it so I struggle to know how to assess what is going on. If I just try to skip over it and go to the next couple of commands, the update goes fine, but the install of the makemkv repos doesn't seem to do what it is supposed to.
What am I missing here?
https://redd.it/ltl5yn
@r_linux
I am attempting to test out this automatic ripping machine but encountering issues during the install.
I am following the "Install" section from the git page, but when I get into setting up and installing the repos I consistently run into the same issue:
for the "NumOnly" line I keep getting the failure echo and do not understand why. This command is a little foreign to me and I am not totally sure what I am trying to do with it so I struggle to know how to assess what is going on. If I just try to skip over it and go to the next couple of commands, the update goes fine, but the install of the makemkv repos doesn't seem to do what it is supposed to.
What am I missing here?
https://redd.it/ltl5yn
@r_linux
GitHub
GitHub - automatic-ripping-machine/automatic-ripping-machine: Automatic Ripping Machine (ARM) Scripts
Automatic Ripping Machine (ARM) Scripts. Contribute to automatic-ripping-machine/automatic-ripping-machine development by creating an account on GitHub.
This week in KDE: a little bit of everything
https://pointieststick.com/2021/02/26/this-week-in-kde-a-little-bit-of-everything-2/
https://redd.it/ltio7v
@r_linux
https://pointieststick.com/2021/02/26/this-week-in-kde-a-little-bit-of-everything-2/
https://redd.it/ltio7v
@r_linux
Adventures in Linux and KDE
This week in KDE: a little bit of everything
Fixing up Plasma 5.21 continues, and we also did a lot of UI polishing this week: New Features A Task manager can now be configured to not cause its hidden panel to become visible when one of its a…
Can't format an old windows hdd on linux
I have an old hdd from a laptop I don't use anymore that had windows and I'm trying to get it up and running on my linux machine but when I use gparted to try and format it, it won't let me. I'm still pretty new to all this and have tried for a while to find the answer on how to fully wipe the drive so it's clean and able to be used for extra storage reasons and not running an os reasons. I should also add that this hardrive is partitioned because I was dual booting windows and linux back when I used that particular laptop. Currently running linux on a raspberry pi if that makes a difference. Basically tells me I don't have permission or it doesn't even highlight the option to format. If anyone can help or point me in the right direction I'd really appreciate it!
https://redd.it/ltm9xi
@r_linux
I have an old hdd from a laptop I don't use anymore that had windows and I'm trying to get it up and running on my linux machine but when I use gparted to try and format it, it won't let me. I'm still pretty new to all this and have tried for a while to find the answer on how to fully wipe the drive so it's clean and able to be used for extra storage reasons and not running an os reasons. I should also add that this hardrive is partitioned because I was dual booting windows and linux back when I used that particular laptop. Currently running linux on a raspberry pi if that makes a difference. Basically tells me I don't have permission or it doesn't even highlight the option to format. If anyone can help or point me in the right direction I'd really appreciate it!
https://redd.it/ltm9xi
@r_linux
reddit
Can't format an old windows hdd on linux
I have an old hdd from a laptop I don't use anymore that had windows and I'm trying to get it up and running on my linux machine but when I use...
How to easily download videos from Youtube as mp3!
This is just a little noscript I made. It's nothing special.
​
Depends on youtube-dl and id3v2
#!/bin/bash
cd ~/Music
read -p 'Link: ' link
read -p 'Title of the song: ' noscript
read -p 'Artist of the song: ' artist
read -p 'Album: ' album
youtube-dl -x --audio-format mp3 --audio-quality 0 -o ~/Music/"$noscript.%(ext)s" $link
id3v2 -t "$noscript" -a "$artist" -A "$album" "$noscript".mp3
tell me what you think about it
https://redd.it/ltnr3a
@r_linux
This is just a little noscript I made. It's nothing special.
​
Depends on youtube-dl and id3v2
#!/bin/bash
cd ~/Music
read -p 'Link: ' link
read -p 'Title of the song: ' noscript
read -p 'Artist of the song: ' artist
read -p 'Album: ' album
youtube-dl -x --audio-format mp3 --audio-quality 0 -o ~/Music/"$noscript.%(ext)s" $link
id3v2 -t "$noscript" -a "$artist" -A "$album" "$noscript".mp3
tell me what you think about it
https://redd.it/ltnr3a
@r_linux
reddit
How to easily download videos from Youtube as mp3!
This is just a little noscript I made. It's nothing special. Depends on youtube-dl and id3v2 #!/bin/bash cd ~/Music read -p...
WGet help. Trying to download site for offline viewing
The website is an auction that has a URL that ends in.html but has 6-7 pages which each have listings which I want the pictures from
No matter the flags I seem to chose it either tries to for everything from mainsite.com and down (including the specific auction I want ) OR just downloads the top level .html from the URL I Specify and nothing else
https://redd.it/ltn8ub
@r_linux
The website is an auction that has a URL that ends in.html but has 6-7 pages which each have listings which I want the pictures from
No matter the flags I seem to chose it either tries to for everything from mainsite.com and down (including the specific auction I want ) OR just downloads the top level .html from the URL I Specify and nothing else
https://redd.it/ltn8ub
@r_linux
reddit
WGet help. Trying to download site for offline viewing
The website is an auction that has a URL that ends in.html but has 6-7 pages which each have listings which I want the pictures from No matter...
Linux Cafe?
I have this idea for a cooperative internet cafe where the hardware is donated from the community and cheap ssds+linux are installed in them. It could be tip only that goes straight into the pockets of the people working there who are willing to work in a not so nice area to keep the price of rent low. Just brainstorming ideas here but, would you go?
https://redd.it/ltquw9
@r_linux
I have this idea for a cooperative internet cafe where the hardware is donated from the community and cheap ssds+linux are installed in them. It could be tip only that goes straight into the pockets of the people working there who are willing to work in a not so nice area to keep the price of rent low. Just brainstorming ideas here but, would you go?
https://redd.it/ltquw9
@r_linux
reddit
Linux Cafe?
I have this idea for a cooperative internet cafe where the hardware is donated from the community and cheap ssds+linux are installed in them. It...
GNU nano 5.6 "Wielewaal" released
https://lists.gnu.org/archive/html/nano-devel/2021-02/msg00017.html
https://redd.it/ltrla3
@r_linux
https://lists.gnu.org/archive/html/nano-devel/2021-02/msg00017.html
https://redd.it/ltrla3
@r_linux
You can now save your Plasma configuration in an instant!
I made a program named 'consave' which will let you save your current KDE Plasma customization and switch to another in an instant! I know you can already do that with the help of Plasma Customization Saver, but it is slow and doesn't save the GTK theme. Consave is a CLI based tool made with python which will save all configuration files in an instant. It creates different "profiles" and will load them whenever you ask it to! Here's the GitHub link: https://github.com/Prayag2/consave
---
# Consave (Save Plasma Customization)
A CLI program that will let you save and apply your KDE Plasma customizations with just one command!
!SS_2021-02-27_22-44-17
---
## Dependencies
There are no dependencies! Just make sure your python version is above
## Installation
- Clone This repo
- Make it executable
- Install
## Usage
### Get Help
### Save current configuration as a profile
### List all profiles
### Remove a profile
### Apply a profile
You may need to log out and log in to see all the changes.
## Contribution
You can contribute by reporting issues or fixing bugs!
## License
This project uses GNU General Public License 3.0
https://redd.it/ltsmfz
@r_linux
I made a program named 'consave' which will let you save your current KDE Plasma customization and switch to another in an instant! I know you can already do that with the help of Plasma Customization Saver, but it is slow and doesn't save the GTK theme. Consave is a CLI based tool made with python which will save all configuration files in an instant. It creates different "profiles" and will load them whenever you ask it to! Here's the GitHub link: https://github.com/Prayag2/consave
---
# Consave (Save Plasma Customization)
A CLI program that will let you save and apply your KDE Plasma customizations with just one command!
!SS_2021-02-27_22-44-17
---
## Dependencies
There are no dependencies! Just make sure your python version is above
3.8.## Installation
- Clone This repo
git clone https://github.com/Prayag2/consave ~/Downloads/consave- Make it executable
cd ~/Downloads/consavesudo chmod +x ./install.sh- Install
./install.sh## Usage
### Get Help
consave -h### Save current configuration as a profile
consave -s <profile name>### List all profiles
consave -l### Remove a profile
consave -r <profile id>### Apply a profile
consave -a <profile id> You may need to log out and log in to see all the changes.
## Contribution
You can contribute by reporting issues or fixing bugs!
## License
This project uses GNU General Public License 3.0
https://redd.it/ltsmfz
@r_linux
GitHub
Prayag2/konsave
Konsave lets use save your KDE Plasma customizatios and restore them very easily! - Prayag2/konsave
Documentation Improvements in KDE
https://carlschwan.eu/2021/02/26/documentation-improvements-in-kde/
https://redd.it/ltbvs4
@r_linux
https://carlschwan.eu/2021/02/26/documentation-improvements-in-kde/
https://redd.it/ltbvs4
@r_linux
carlschwan.eu
Documentation Improvements in KDE
There was many changes over the last few months in KDE developer documentation tooling. The hope is to make KDE development easier to both newcomers but also long-time KDE contributors to use KDE technologies to build cool stuff.
Api documentation The tooling…
Api documentation The tooling…
I think terminal is way better than GUI
It seems harder but, terminal is much convenient. 2+2 always makes 4, always. You know what the code does, well most of the time. But in gui you may not be so sure.
I think most book nerds like me, would like terminals if they used linux lol. It's like reading a book, man pages that is lol. You know some people just always tries to learn things first from the books, not from those fancy youtube videos.
https://redd.it/ltydy2
@r_linux
It seems harder but, terminal is much convenient. 2+2 always makes 4, always. You know what the code does, well most of the time. But in gui you may not be so sure.
I think most book nerds like me, would like terminals if they used linux lol. It's like reading a book, man pages that is lol. You know some people just always tries to learn things first from the books, not from those fancy youtube videos.
https://redd.it/ltydy2
@r_linux
reddit
I think terminal is way better than GUI
It seems harder but, terminal is much convenient. 2+2 always makes 4, always. You know what the code does, well most of the time. But in gui you...
TIFU with dd
So, I'm taking a midterm. Editing a docx in WPS writer. All is well, autosave is on. I get bored and wonder what it would look like if I created docx file by "dd if=/dev/random/ of=random.docx" and viewing it in WPS writer. Accidentally, I make a random file 30000 lines long because I've never actually used dd before. When I try to open it in WPS Writer, WPS freezes and I have to shut it down. I lost around 30 minutes of work on the midterm I was editing when I opened it back up.
https://redd.it/lu26ky
@r_linux
So, I'm taking a midterm. Editing a docx in WPS writer. All is well, autosave is on. I get bored and wonder what it would look like if I created docx file by "dd if=/dev/random/ of=random.docx" and viewing it in WPS writer. Accidentally, I make a random file 30000 lines long because I've never actually used dd before. When I try to open it in WPS Writer, WPS freezes and I have to shut it down. I lost around 30 minutes of work on the midterm I was editing when I opened it back up.
https://redd.it/lu26ky
@r_linux
reddit
TIFU with dd
So, I'm taking a midterm. Editing a docx in WPS writer. All is well, autosave is on. I get bored and wonder what it would look like if I created...
Clusters for Game server
I was wondering if I can run a small Minecraft server for me and a few of my friends off of two old desktops. I understand it would not be power efficient but that is not an issue to me. I wanted to know if I can run a Minecraft server in MOSIX. If not would there be any benefit to making them into a Beowulf cluster?
https://redd.it/lu7g35
@r_linux
I was wondering if I can run a small Minecraft server for me and a few of my friends off of two old desktops. I understand it would not be power efficient but that is not an issue to me. I wanted to know if I can run a Minecraft server in MOSIX. If not would there be any benefit to making them into a Beowulf cluster?
https://redd.it/lu7g35
@r_linux
reddit
Clusters for Game server
I was wondering if I can run a small Minecraft server for me and a few of my friends off of two old desktops. I understand it would not be power...
Do we need an alternative to the Filesystem Hierarchy Standard?
I recently stumpled upon Gobolinux. It's not a normal distro, but one with an alternate file system hierarchy.
The normal standard is the FHS. It describes, where some files should be. (E.g. header files in /usr/include and so on)
It is used by nearly every distro.
​
Gobolinux OTOH uses an homegrown tree: https://en.wikipedia.org/wiki/GoboLinux#File\_hierarchy
It allows that you can have different versions of an program. Furthermore every program has its own directory. (Further details)
​
What do you think? Is FHS still good and usable or is it just there, because it was always there? Do we need an alternative.
https://redd.it/luaii3
@r_linux
I recently stumpled upon Gobolinux. It's not a normal distro, but one with an alternate file system hierarchy.
The normal standard is the FHS. It describes, where some files should be. (E.g. header files in /usr/include and so on)
It is used by nearly every distro.
​
Gobolinux OTOH uses an homegrown tree: https://en.wikipedia.org/wiki/GoboLinux#File\_hierarchy
It allows that you can have different versions of an program. Furthermore every program has its own directory. (Further details)
​
What do you think? Is FHS still good and usable or is it just there, because it was always there? Do we need an alternative.
https://redd.it/luaii3
@r_linux
gobolinux.org
Announcing GoboLinux 017.01 - Passing the Torch 🔥
Eezy - Super Simple noscript running and management
https://github.com/simonmeulenbeek/Eezy
https://redd.it/lu07se
@r_linux
https://github.com/simonmeulenbeek/Eezy
https://redd.it/lu07se
@r_linux
GitHub
simonmeulenbeek/Eezy
Eezy is a super simple project automation system for all your projects. - simonmeulenbeek/Eezy
Why I hate Linux
There is so many tools, 80% are half working alpha experiments, when you need to install a tool you want to try out you need to compile it because half of the time it’s not available in the repository, if you finally manage to install it it probably has no GUI so you need to read the instructions which are always minimalist and do not include what you are looking for. So you decide to google it and the first links are just people complaining in forums with most replies suggesting tool xyz or some noscript modification.
You give up go for the next tool and it’s all the same story again.
When you finally find the tool, compile it configure it you do a mistake, you broke it, reinstall it and already forgot all the tweaks you did the last hour to get it working.
Yet I am here frustrated trying to figure out how to get 2 RTSP streams in VLC on my raspberry Pi.
PS it worked directly in Windows
Linux is great, but often requires too much time while on Windows or Mac stuff just works. Maybe they have 3 tools instead of 3000 but these 3 work
https://redd.it/lud726
@r_linux
There is so many tools, 80% are half working alpha experiments, when you need to install a tool you want to try out you need to compile it because half of the time it’s not available in the repository, if you finally manage to install it it probably has no GUI so you need to read the instructions which are always minimalist and do not include what you are looking for. So you decide to google it and the first links are just people complaining in forums with most replies suggesting tool xyz or some noscript modification.
You give up go for the next tool and it’s all the same story again.
When you finally find the tool, compile it configure it you do a mistake, you broke it, reinstall it and already forgot all the tweaks you did the last hour to get it working.
Yet I am here frustrated trying to figure out how to get 2 RTSP streams in VLC on my raspberry Pi.
PS it worked directly in Windows
Linux is great, but often requires too much time while on Windows or Mac stuff just works. Maybe they have 3 tools instead of 3000 but these 3 work
https://redd.it/lud726
@r_linux
reddit
Why I hate Linux
There is so many tools, 80% are half working alpha experiments, when you need to install a tool you want to try out you need to compile it because...
Looking for a tool to log network traffic on specific port.
I'm running a Ubuntu-server that runs a service that I specifically want to monitor.
To avoid irrelevant data, I'm looking to specifically log network traffic on a specific port.
Mainly I'm interested in logging the incoming connections IP addresses in a text file.
Is there any program that would be useful for this task?
https://redd.it/luhpx5
@r_linux
I'm running a Ubuntu-server that runs a service that I specifically want to monitor.
To avoid irrelevant data, I'm looking to specifically log network traffic on a specific port.
Mainly I'm interested in logging the incoming connections IP addresses in a text file.
Is there any program that would be useful for this task?
https://redd.it/luhpx5
@r_linux
reddit
Looking for a tool to log network traffic on specific port.
I'm running a Ubuntu-server that runs a service that I specifically want to monitor. To avoid irrelevant data, I'm looking to specifically log...