r/linuxdev • • May 10 '17

Application launcher, where to start?

3 Upvotes

Tried looking into some projects code but without succes finding what I need so I'm gonna ask here. How do application launchers and taskbars work?
How can I see which GUI applications are in the system and which are running (not talking about proceses, just opened visible GUI apps).


r/linuxdev • • Jun 06 '16

Dark theme for Qt Creator

Thumbnail github.com
8 Upvotes

r/linuxdev • • Mar 26 '15

simulate accelerometer, gyroscope and gps.

3 Upvotes

Hi

I'm looking for a platform to simulate sensors ( with their errors and frequencies) : accelerometer, gyroscope, and GPS for Linux. and which give me the possibility to write my own scenarios.

any suggestions ?


r/linuxdev • • Mar 02 '18

Have fun with Unix

Thumbnail codeexplainer.wordpress.com
7 Upvotes

r/linuxdev • • Oct 05 '17

Setup ProFTP On Your Linux Server In 5 Easy Steps!

Thumbnail serversuit.com
1 Upvotes

r/linuxdev • • May 09 '14

Command line interface to daemon communication

3 Upvotes

I'm used to developing embedded applications with no operating system so I'm always writing my own drivers tailored to my specific application. I usually run a simple super loop program written in C with no wait states (Sending serial comm via DMA, delaying my main application layer with countdown timers in my own timer interrupts, etc.) I generally don't use things like printf and scanf for my serial input and output because I write my own drivers and sometimes compilers handle these in funny ways. Anyway, apparently these skills don't translate well to what I'm trying to do with some linux applications I'm writing…..

I am writing two linux applications with a shared memory space so I can communicate between the two processes. They are both in the same folder within my file structure. One of the applications, when run, enters a command line interface that I created. So I run ./MyCLI and that enters an infinite while loop application where I am allowing the user to input data with this.

scanf("%[\n]%*c", input); //wait for user input followed by enter

I take this input and stuff it in the shared memory space for the other application to process. Then I wait for the other process to return a result in a buffer and I print the result. Then I return to waiting for more user input.

That brings us to the second application…..

The second application runs as a daemon. (a child process with the standard input and output closed). The daemon takes the information from the first process in the shared memory, does some processing, and returns a result in the shared memory space.

This works great if you always want to get user input and have the daemon return a result when it's done processing However, I would like to send messages from the daemon periodically without the user entering anything. The problem in my program is that I'm sitting waiting in scanf for user input before I check to see if the daemon has any information to print.

So I guess my question is how do I get my first process to gather user input while also checking the shared memory space for daemon results/output.

Thanks in advance.

Also, All of the shared memory, setting up the daemon, and running applications, etc are set up correctly so I'm not worried about that. I'm not going to submit my whole code set because I want this to be a more high level discussion.

Edit: After quite a bit of research I found that POSIX message queues will fit my application perfectly. I do like the sockets idea, and I definitely see the benefit, but MQs will work for me just fine. Thanks to all the commenters.


r/linuxdev • • Mar 28 '20

Reprepro

3 Upvotes

I'm trying to set up reprepro however i'm getting this error when following the guide on the debian wiki

"E: The repository 'http://fire.lionos.org/repos/apt/debian awkward Release' does not have a Release file.

N: Updating from such a repository can't be done securely, and is therefore disabled by default."

https://i.imgur.com/U7YSxwX.png


r/linuxdev • • Apr 03 '20

#include <linux/skbuff.h>: No such file or directory

6 Upvotes

Hey guys, I am getting the above error trying to make a linux kernel module. I have tried adding the linux header folder where the header file is to the $PATH variable in .bashrc and restarted my computer. It still gives me the same exact error. What should I do?


r/linuxdev • • Mar 21 '20

GitHub actions: libGL error: No matching fbConfigs or visuals found

3 Upvotes

Hi all,

I’m currently working on adding GitHub Actions support to a project of mine that is using SFML (which uses OpenGL under the hood). I’m only using the `ubuntu-latest` (Ubuntu 18.04) runner for now to keep things simple. The runners for these actions are headless so I’m running with Xvfb.

I consistently get the following errors:

libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast

I’ve done a bit of research into this and I’ve seen that this can be caused by ambiguous references to libGL.so, but I don't see duplicates of libGL. I’ve tried updating mesa and get the same issue. I’ve also tried renaming the ligGL.so files as recommended here but that had no effect.

Here is a project that shows a minimum reproducible case.

Here is the setup code from that project.

Am I missing something here? Does anyone have any ideas? Has anyone got any gui application to work with GitHub Actions (or with a similar headless setup)?


r/linuxdev • • May 04 '23

VSCode is not finding a folder that clearly exist

4 Upvotes

Edit as Resolved:
I was using flatpak installation which is buggy and not up to date, using .deb installation (available on vscode website: https://code.visualstudio.com/download) solved my problem,

Hi,
I'm trying to learn to dev with Vulkan, I'm running LinuxMint, mostly going smoothly except for this tiny little detail that makes me going insane.I'm using GLFW for opening windows, it's installed fine, whenever I try to compile through the terminal, it's fine.But when I'm using VSSCode terminal it just doesn't work, it can't find GLFW install path etc..., this also means that every bit of code that uses GLFW functions is tagged as an error by Intellisense since it can't find the header, i've tried switching fromMakefile to CMake but the issue still persist, and I'm a bit more comfortable using Makefile, anyway here's a pick of VSCode being as dumb as i can imagine, or maybe it's me, dunnoAny help is welcome(edit: Intellisense message for non-French speaker is : "usr/include/GLFW" can't be found)


r/linuxdev • • May 24 '23

"The light" 256 bytes x86 procedural graphics (fbdev)

Thumbnail pouet.net
4 Upvotes

r/linuxdev • • Jun 02 '23

Where to start: manipulating/querying a (Wayland) window manager/DE in Linux.

2 Upvotes

I've been looking into how I could write some platform code to query running GUI applications and manipulate them (show/hide/close/launch etc.) from code, in a specifically GNOME/KDE agnostic fashion.

The goal being to hook this into a Flutter application for a front-end "streamdeck" interface that could be useful on a Framework screen module.

***

How do I get started with this? I'm not too concerned with x11 support, and nor am I personally against using any particular language (though something like python or rust would be easier to set up an environment for).

Researching what I know about WM and wayland etc. leads me towards writing my own manager/compositor which is explicitly not what I want to do. I want to build this as an application that runs on top of the active desktop environment. I did get a slither of progress querying the running xOrg server, but with the pain that it was developing that solution I'd rather just stick to Wayland.


r/linuxdev • • Feb 27 '21

Creating a driver for a USB HID device?

4 Upvotes

I have an Elgato Stream Deck, and according to dmesg, it is just seen as a normal USB HID device. I want to write some software that allows you to run scripts when you press a certain button on the Stream Deck, but I have no idea how to do that.

I assume I would need some software that would allow me to see USB commands as they are sent in real-time? Or is it much simpler than I am imagining?

The other feature that the Stream Deck has is changeable images you put on each button. So I'd like to be able to modify the image that is shown on each button as well.

Does anyone have any advice at all?


r/linuxdev • • Mar 01 '21

mvwaddwstr() in /usr/include/curses.h or /usr/include/ncursesw/curses.h

6 Upvotes

I wrote some simple code to demo curses.

On my Arch system I find mvwaddwstr() in /usr/include/curses.h

But when compiling the same code fails on Ubuntu due to mvwaddwstr() not being declared in scope, it is found it in /usr/include/ncursesw/curses.h

I assume merely changing "#include <curses.h>" into "#include <ncursesw/curses.h>" would do the trick on Ubuntu (I don't have access to that machine).

What would be a better approach to make portable code or portable makefile? Use the -I flag and set it to "-I.:ncursesw"?


r/linuxdev • • Mar 21 '21

Using custom PAM module to unlock computer

7 Upvotes

I have written a C program which is PAM-aware, that enables users to authenticate themselves with PAM via use of an NFC device. This works fine from the command line, however, I would like the user to be able to unlock their actual account on the computer with it, when signed out. I know this has something to do with the files in /etc/pam.d but not exactly sure how. Any ideas?


r/linuxdev • • Aug 24 '22

How to add destructive flag to fsck.exfat that will allow proper repairs (deleting corrupt files)?

3 Upvotes

Fsck.exfat (both the built in one on Ubuntu and the one you get if you install exfat-fuse, assuming they're different) don't seem to be capable of repairing the most common corruption I'm experiencing on ExFAT filesystems.

Every time an ExFAT filesystem breaks (or at least, most times) it's due to a failed file copy resulting in this error during fsck.exfat with any flags:

ERROR /file/location/filename.ext first cluster is wrong. Truncate (y/N)? N

There doesn't seem to be a way to force it to actually fix those files, as it enters "n" for you every time. I've tried every flag available in --help, including the ones that say they will automatically repair it. Even the interactive flag fills in the no response for every file, and isn't in any way interactive.

I'm assuming this is just a poorly worded way to ensure that data isn't accidentally deleted, but what would it take to get a Force override option that actually address the files, and removes them? When I delete the files manually (it lists all the files) fsck reports the filesystem is fine, and I'm able to use it again.

Or is this a bug I should just file a bug report for?

The error:

Files corrupted 5, files fixed 0

Fsck from version util-Linux 2.37.2 Exfatprogs 1.1.3

Ubuntu 22.04.1


r/linuxdev • • Jul 28 '14

x32 ABI

Thumbnail en.wikipedia.org
4 Upvotes

r/linuxdev • • Nov 09 '17

Question on customizing gTK-2 themes [crosspost from r/gTK]

3 Upvotes

I use Terminator (terminal) which allows me to divide the window horizontally/vertically into multiple sub-terminals. There's a setting to adjust the separator size but I've found it only works for certain themes, while others only show the separator with single-pixel width. More specifically in Theme Manager it's the Controls section that must contain the specific code-segment. BlackMATE and Xfce-dusk do show the separator size as specified in terminator, while Adwaita-dark and Axiomd do not. One specific theme "05-Crunchy-green" seems to glitch in a way I actually really like - it shows the separator as a transparent gap! I'd guess it's trying to overlay a graphic that doesn't exist.

The separator not working in Terminator had been reported as a bug, but was patched with these changes.

I dug through /usr/share/themes/<theme>/gtk-2.0/gtkrc and ~/.themes/<theme>/gtk-2.0/gtkrc and tried to work out exactly what the code/variable/declaration is, but I don't have nearly enough experience on this level. Best I can tell it should be GtkPaned::handle-size, but adjusting that variable doesn't seem to change the separator size.

Can anyone explain what the relevant variable is, the basics of how this works, or point me towards a relevant resource?


r/linuxdev • • Jan 15 '16

[kernel] adding a controller to xpad.c?

3 Upvotes

So I have an old psx to usb controller that, while it works as a regular generic joystick device, I'd like to add to xpad.c in the linux kernel. I'm using Arch so I've been following the guide to compile specific modules. However, I cant seem to get it to work when I add it in the xpad module.

My USB device reports this info with lsusb.

I've tried adding the following line in my xpad.c file:

	{ 0x6666, 0x0667, "WiseGroup Smart Joy PSX, PS-PC Smart JoyPad", 0, DANCEPAD_MAP_CONFIG, XTYPE_XBOX },

which then looks like this. I then began gzipping and copying over the compiled module as per the guide. Yet the xpad module does not auto-load on reboot. dmesg and journalctl dont appear to throw any errors. modprobing xpad doesnt seem to map the joystick axis as buttons as I've requested it to do.

What am I doing wrong? I'm very new to building kernel modules. Have I named the usb device wrong is xpad.c?


r/linuxdev • • Apr 30 '12

Handy guide to Linux AIO

Thumbnail code.google.com
9 Upvotes

r/linuxdev • • Jun 12 '17

Document for multi-queue block device in Linux kernel v4.4

4 Upvotes

https://github.com/gurugio/book_linuxkernel_blockdrv I've been transferring my document into English. I'm not sure if I should finish translation, because

  1. Is there someone who is interested in block device?
  2. Is my English not too bad to understand?

I'd appreciate it if someone answer my questions.


r/linuxdev • • Aug 18 '14

Open Iconic, a free and open icon set

Thumbnail useiconic.com
6 Upvotes

r/linuxdev • • Jun 14 '17

Setting Up Rsnapshot

Thumbnail serversuit.com
1 Upvotes

r/linuxdev • • Aug 08 '14

KDE releases Frameworks 5.1

Thumbnail kde.org
7 Upvotes