[-] promitheas@programming.dev 18 points 1 month ago* (last edited 1 month ago)

All my projects, which to be fair are mostly programming.

~/Documents/Projects doesn't make sense to me because theyre not strictly documents. In documents i have - well, documents like bill receipts, forms ive filled in, etc...

My projects are a first-order thing for me if that makes sense, so it makes sense to have them in the top-level of my home.

[-] promitheas@programming.dev 53 points 1 month ago

Everyone complaining, and here I am not having noticed the change because I've created that directory for myself years ago :-P

Personally its for organisation

[-] promitheas@programming.dev 82 points 2 months ago

This is so necessary and overdue, lets be honest. I hope it succeeds

50

A few days ago I made a post here inquiring as to why startmail addresses couldn't be used on steam, and what people thought I should/could do.

In the end after some suggestions, I opened a support ticket with steam asking why startmail was not supported, and in the end managed to convince them to support it as a valid email address (unless it gets abused - more on that later). For the record, here is my entire back-and-forth with them:

Me on Feb 13 @ 10:35am

Dear Steam Support,

I recently changed my email provider to startmail.com, but when I try to update it in my steam account to this address I get an error that its not valid or unsupported.

Since startmail.com is a paid service based in Europe, I would like clarification on why it is not supported by steam, and hopefully have it added to the valid email providers for steam.

The fact that its a paid service means scammers/people trying to abuse it is unlikely (it costs around 60 euro a year), so I really think there should be no issue accepting it as an email address.

I would really appreciate having this issue resolved so that I can change my email address to my new one, and close my previous email account eventually.

Thank you in advance, [My name]

Steam on Feb 14 @ 6:27pm

Hello,

Thank you for contacting Steam Support.

The email address you're trying to use on your Steam account is not currently valid for use with Steam. Typically this is because the email service has been identified as offering disposable emails, but it may also be because the email address domain or domain suffix has been marked as prohibited for use with Steam for one of a number of reasons.

At this time Steam does not offer an option to bypass this restriction. Please select a different address on a different domain/service to use with your Steam account.

Steam Support [Steam Support Person A's Name]

Me on Feb 14 @ 6:44pm

You are correct that they offer disposable addresses, but they have the format @use.startmail.com

The main address looks like @startmail.com

Is there any possibility of having a team look into this, and blacklist the disposable format but allow the regular format (of which you can only have a single address, like your main email).

Besides, gmail (which is my current address) also allows for creating disposable addresses: https://www.geeksforgeeks.org/techtips/how-to-create-a-disposable-email-address-with-gmail/

I think many people, myself included, would like to move away from big tech companies such as microsoft (hotmail) and google (gmail) and so would appreciate your consideration on the matter.

Many thanks, [My name]

Steam on Feb 16 @ 5:44am

Sorry about the previous message. We misunderstood your issue.

Anyway, we're unable to do your request, but we can help you update the email address on the account.

Please provide your new email address. Once we have your alternate address, we will update the account.

Steam Support [Steam Support Person B's Name]

Me on Feb 16 @ 7:56am

Hello, no worries.

I hope Im not misunderstanding your reply myself now, but as I understand it, you will manually change my account email to my new startmail address?

If that's the case, here it is:

my_email@startmail.com

Just in case I have not yet managed to convince you to whitelist the regular startmail addresses, here is an article discussing this from them: https://support.startmail.com/hc/en-us/articles/360007297457-Personal-Aliases

Note this paragraph: "Personal alias allows you to send and receive email at an email address different from your main StartMail account address. These email aliases end in @use.startmail.com instead of @startmail.com." (if address has use in it, is an alias, otherwise its the regular type)

Many thanks for your help. If I misunderstood what you need from me, I apologise, please clarify it for me.

Best regards, [My name]

Steam on Feb 17 @ 3:39am

Hello,

I'm sorry, it looks like our team provided some incorrect information that ended up being misleading.

Steam Support will occasionally manually allow single email addresses that use a personal domain, but large scale services like Startmail do not match what's intended for those cases. We're sorry the team provided false information above.

Your report will be passed on to Steam's developers, but please understand that Steam does not make decisions regarding email / domain viability lightly. When a domain is blocked, it's usually because that email service offers disposable or public email services which are by their very nature incompatible with Steam, or their requirements to sign up for a new email account are extremely permissive and thus allow wide scale misuse of emails on that service for hijacking, fraud, and even potentially illegal activity. Email services are only blocked from use with Steam after demonstrated, large scale misuse from users of that service.

Valve [Steam Support Person C's Name]

Me on Feb 17 @ 7:16am

Very well, however please pass on the following information to your team as well, which can be easily verified from startmail's own page and may be helpful in making a decision:

"their requirements to sign up for a new email account are extremely permissive and thus allow wide scale misuse of emails on that service for hijacking, fraud, and even potentially illegal activity."

As mentioned, startmail is a paid service. It costs about 60 euro a year to create an account. Thats not exactly permissive, certainly not more so than gmail for example.

"Email services are only blocked from use with Steam after demonstrated, large scale misuse from users of that service."

Again, as mentioned in my previous replies and the information available on their own page, they have 2 email formats - not unlike gmail with their '+ email addresses'. The @startmail.com is the main one, of which you can ONLY have one, and the aliases which are probably what your team determined might lead to abuse, have the format @use.startmail.com. It would be a terrific resolution if steam could start allowing the single main addresses (@startmail.com) and blocking only the alias addresses (@use.startmail.com).

https://www.startmail.com/pricing/ (Payment details required on account creation, and the not exactly inexpensive prices of the service)

Again, thank you for taking time to speak with me about this, and for forwarding to your developers for conaideration.

Steam on Feb 19 @ 1:47am

It looks like Steam's developers have decided to open access to startmail. This has been done despite their disposable email service which is not compatible with how Steam expects its users maintain their email account with Steam. The service will be monitored and blocked again if further misuse is detected.

Valve [Steam Support Person C's Name]

Me on Feb 19 @ 2:44am

Thats great to hear! I hate to repeat myself like a broken record, but in the interest of protecting every steam user, as well as the continued allowance of startmail, please only allow the @startmail.com addresses and BLOCK the @use.startmail.com addresses (alias format).

Once again, thank you for your patience, understanding, and consideration in this issue. I will now close my ticket if able to, otherwise please do feel free to close it for me.

[My name]

I haven't checked if they actually blocked the @use.startmail.com address format, but I successfully changed my steam email to my main @startmail.com address. Hopefully they go through with blocking the aliases, and keep the regular address format as valid.

43

A few days ago I made a post here inquiring as to why startmail addresses couldn't be used on steam, and what people thought I should/could do.

In the end after some suggestions, I opened a support ticket with steam asking why startmail was not supported, and in the end managed to convince them to support it as a valid email address (unless it gets abused - more on that later). For the record, here is my entire back-and-forth with them:

Me on Feb 13 @ 10:35am

Dear Steam Support,

I recently changed my email provider to startmail.com, but when I try to update it in my steam account to this address I get an error that its not valid or unsupported.

Since startmail.com is a paid service based in Europe, I would like clarification on why it is not supported by steam, and hopefully have it added to the valid email providers for steam.

The fact that its a paid service means scammers/people trying to abuse it is unlikely (it costs around 60 euro a year), so I really think there should be no issue accepting it as an email address.

I would really appreciate having this issue resolved so that I can change my email address to my new one, and close my previous email account eventually.

Thank you in advance, [My name]

Steam on Feb 14 @ 6:27pm

Hello,

Thank you for contacting Steam Support.

The email address you're trying to use on your Steam account is not currently valid for use with Steam. Typically this is because the email service has been identified as offering disposable emails, but it may also be because the email address domain or domain suffix has been marked as prohibited for use with Steam for one of a number of reasons.

At this time Steam does not offer an option to bypass this restriction. Please select a different address on a different domain/service to use with your Steam account.

Steam Support [Steam Support Person A's Name]

Me on Feb 14 @ 6:44pm

You are correct that they offer disposable addresses, but they have the format @use.startmail.com

The main address looks like @startmail.com

Is there any possibility of having a team look into this, and blacklist the disposable format but allow the regular format (of which you can only have a single address, like your main email).

Besides, gmail (which is my current address) also allows for creating disposable addresses: https://www.geeksforgeeks.org/techtips/how-to-create-a-disposable-email-address-with-gmail/

I think many people, myself included, would like to move away from big tech companies such as microsoft (hotmail) and google (gmail) and so would appreciate your consideration on the matter.

Many thanks, [My name]

Steam on Feb 16 @ 5:44am

Sorry about the previous message. We misunderstood your issue.

Anyway, we're unable to do your request, but we can help you update the email address on the account.

Please provide your new email address. Once we have your alternate address, we will update the account.

Steam Support [Steam Support Person B's Name]

Me on Feb 16 @ 7:56am

Hello, no worries.

I hope Im not misunderstanding your reply myself now, but as I understand it, you will manually change my account email to my new startmail address?

If that's the case, here it is:

my_email@startmail.com

Just in case I have not yet managed to convince you to whitelist the regular startmail addresses, here is an article discussing this from them: https://support.startmail.com/hc/en-us/articles/360007297457-Personal-Aliases

Note this paragraph: "Personal alias allows you to send and receive email at an email address different from your main StartMail account address. These email aliases end in @use.startmail.com instead of @startmail.com." (if address has use in it, is an alias, otherwise its the regular type)

Many thanks for your help. If I misunderstood what you need from me, I apologise, please clarify it for me.

Best regards, [My name]

Steam on Feb 17 @ 3:39am

Hello,

I'm sorry, it looks like our team provided some incorrect information that ended up being misleading.

Steam Support will occasionally manually allow single email addresses that use a personal domain, but large scale services like Startmail do not match what's intended for those cases. We're sorry the team provided false information above.

Your report will be passed on to Steam's developers, but please understand that Steam does not make decisions regarding email / domain viability lightly. When a domain is blocked, it's usually because that email service offers disposable or public email services which are by their very nature incompatible with Steam, or their requirements to sign up for a new email account are extremely permissive and thus allow wide scale misuse of emails on that service for hijacking, fraud, and even potentially illegal activity. Email services are only blocked from use with Steam after demonstrated, large scale misuse from users of that service.

Valve [Steam Support Person C's Name]

Me on Feb 17 @ 7:16am

Very well, however please pass on the following information to your team as well, which can be easily verified from startmail's own page and may be helpful in making a decision:

"their requirements to sign up for a new email account are extremely permissive and thus allow wide scale misuse of emails on that service for hijacking, fraud, and even potentially illegal activity."

As mentioned, startmail is a paid service. It costs about 60 euro a year to create an account. Thats not exactly permissive, certainly not more so than gmail for example.

"Email services are only blocked from use with Steam after demonstrated, large scale misuse from users of that service."

Again, as mentioned in my previous replies and the information available on their own page, they have 2 email formats - not unlike gmail with their '+ email addresses'. The @startmail.com is the main one, of which you can ONLY have one, and the aliases which are probably what your team determined might lead to abuse, have the format @use.startmail.com. It would be a terrific resolution if steam could start allowing the single main addresses (@startmail.com) and blocking only the alias addresses (@use.startmail.com).

https://www.startmail.com/pricing/ (Payment details required on account creation, and the not exactly inexpensive prices of the service)

Again, thank you for taking time to speak with me about this, and for forwarding to your developers for conaideration.

Steam on Feb 19 @ 1:47am

It looks like Steam's developers have decided to open access to startmail. This has been done despite their disposable email service which is not compatible with how Steam expects its users maintain their email account with Steam. The service will be monitored and blocked again if further misuse is detected.

Valve [Steam Support Person C's Name]

Me on Feb 19 @ 2:44am

Thats great to hear! I hate to repeat myself like a broken record, but in the interest of protecting every steam user, as well as the continued allowance of startmail, please only allow the @startmail.com addresses and BLOCK the @use.startmail.com addresses (alias format).

Once again, thank you for your patience, understanding, and consideration in this issue. I will now close my ticket if able to, otherwise please do feel free to close it for me.

[My name]

I haven't checked if they actually blocked the @use.startmail.com address format, but I successfully changed my steam email to my main @startmail.com address. Hopefully they go through with blocking the aliases, and keep the regular address format as valid.

19

Hey everyone. I recently created and started transitioning to my Startmail email address. I'm changing emails for all my accounts bit by bit, as new emails get forwarded to my new inbox from my old gmail (which I plan on leaving as is with forwarding for about a year). Just now I decided to update my steam email. I first created an alias from startmail's aliases UI, but steam didnt like that. It specifically gave me this message:

It appears you've entered a disposable email address, or are using an email provider that cannot be used on Steam. Please provide a different email address.

So then I decided to add my regular startmail address, but I got the exact same message.

How can I deal with this? Ideally I would love to contact them and explain and request that they allow startmail (I mean, its a paid service so unlikely people will be generating multiple email addresses - as for aliases, they could just disallow the @use.startmail.com addresses, which are the aliases).

What do you guys think is my best bet for this issue?

[-] promitheas@programming.dev 26 points 4 months ago

This seems like a good thing. As they state, instead of just using OSS they'll contribute back to existing projects and likely release some of their own stuff.

Hopefully they stick to it

18
submitted 5 months ago* (last edited 4 months ago) by promitheas@programming.dev to c/degoogle@lemmy.ml

Hello everybody! One of the last google software I use is my gmail, mainly since I've had it for so long and migrating seems daunting. It's time however.

I do eventually want to self-host my own email, possibly with something like this: https://docker-mailserver.github.io/docker-mailserver/latest/

But to do that I'd need to set up and maintain stability on a home lab for a short time first, something I can't do yet because of my living arrangements, which means self-hosted email may be a few years away.

In the mean time, I looked at https://www.startmail.com/ and https://tuta.com/secure-email (since tuta is very highly recommended on lemmy). Sadly, while tuta sounds great, it has the deal breaker (for me) that I can only use their clients.

That's why I'm leaning more towards startmail, though of course I'll take advantage of the 7 day free trial before committing to it.

Meanwhile, is there anything else that you can recommend which is:

  • an EU company
  • privacy and customer first
  • crucially can be used with Thunderbird
  • that will save me 59.88 Euro a year
  • That allows for the creation of folders in the Inbox (I use this constantly for organisation)

A very big bonus would be if I could somehow import my gmail emails to it, in a sensible manner, like I see startmail offering to do. CalDAV support would also be really nice.

Also, I'm thinking for about a year I keep both gmail and whatever I switch to, while having gmail forward everything to the new one, so that I make sure everything has been migrated over there.

Thanks in advance!

Edit: While looking at reviews for various services, I came across a video offering a startmail discount link, so I can now get it at 29.94 Euro for the first year. This makes it a lot more attractive even if I don't stick with it for more than a year, but I would still love to hear your suggestions or thoughts :)

Edit: since i found that discount link from the video, i decided to try startmail. Im still on the 7 day trial (just meaning i havent been billed yet), but so far i really like it. Ive already started changing my apps/services/websites emails to aliases i set up (the unlimited aliases of startmail are a godsend in this regard), and the importing tool they have really easily copied my gmail emails/folders over to the startmail account. From there, it was a simple matter of moving the folders from the resultant gmail folder to my actual SM inbox where i wanted them, adding the account to thunderbird, and re-setting up the rules for the SM account in Thunderbird. Id still love to hear all your suggestions in case I do decide SM isnt what i need, but so far it seems like its a winner

[-] promitheas@programming.dev 29 points 5 months ago* (last edited 5 months ago)

Also, if anyone suggests Electron or anything involving a browser, I will find them and remove one electron from each atom of theirs, turning them into smoke.

This made me laugh, it was so unexpected xD

Also, while its not an answer for your question, look up ncurses if you dont know it. It might be a middle ground for your future projects, if you prefer staying in the terminal but having a UI.

11
submitted 9 months ago* (last edited 9 months ago) by promitheas@programming.dev to c/neovim@programming.dev

Hello guys, my question is basically in the title. I would really like to be able to have the parameter names included when I cursor over a function and open the 'hover' window to show basic info about it. Currently it only shows me the expected types, which while still useful I feel is only a piece of the puzzle when working either with a new library, or a codebase you're not familiar with.

As an example I'm learning ncurses these past couple days, and its significantly flow-breaking to have to switch focus away from the editor to either search on the web what a particular function takes as parameters, or open a separate terminal to read the man page for it. I'm still not familiar with the library so I frequently need to look up what a parameter represents in the context of the code, in addition to what type I should give it. Is there any way to do this while still using clangd as my lsp server?

Ive also included a screenshot of one such hover window for the ncurses function mvprintw.

29
submitted 9 months ago* (last edited 9 months ago) by promitheas@programming.dev to c/python@programming.dev

Hello guys, Ive built a super simple web app to convert google maps urls to the osm format, mainly for my personal use but also for anyone who has this use case as well.

Most link formats work, but there are a couple that have been giving me particular trouble. Here are the formats that work as expected:

https://www.google.com/maps/place/Eiffel+Tower/@48.8584,2.2945,17z
https://google.com/maps/place/Statue+of+Liberty/@40.6892,-74.0445,17z
https://maps.app.goo.gl/SoDFgcPJKVPeZXqd8
https://www.google.co.uk/maps/place/Buckingham+Palace/@51.5014,-0.1419,17z
https://www.google.de/maps/place/Brandenburger+Tor/@52.5163,13.3777,17z

These 2 formats dont work on the server, but if I run the app locally they work and give a correct osm formatted link:

https://maps.app.goo.gl/jXqDkM2NWN55kZcd9?g_st=com.google.maps.preview.copy
https://maps.google.com/maps?q=Big+Ben%2C+London

You can test it on the actual website (gmaps2osm.de), but essentially if you try to convert links of this format on the actual website you get an Internal Server Error after around 10 seconds of it thinking.

Right now Im focusing on the .preview.copy formatted links. As you will see from the code below, I am using playwright to headlessly handle googles annoying redirects and consent forms:

from typing import final
from flask import Flask, request, render_template, jsonify
from datetime import datetime
import re
import urllib.parse
import requests
from playwright.sync_api import sync_playwright

# Test urls for regex:
# https://www.google.com/maps/place/Eiffel+Tower/@48.8584,2.2945,17z
# https://google.com/maps/place/Statue+of+Liberty/@40.6892,-74.0445,17z
# https://maps.google.com/maps?q=Big+Ben%2C+London # has an issue, doesnt work
# https://maps.app.goo.gl/4jnZLELvmpvBmFvx8
# https://maps.app.goo.gl/jXqDkM2NWN55kZcd9?g_st=com.google.maps.preview.copy
# https://www.google.co.uk/maps/place/Buckingham+Palace/@51.5014,-0.1419,17z
# https://www.google.de/maps/place/Brandenburger+Tor/@52.5163,13.3777,17z

debug_enabled = False
is_headless = not debug_enabled
print(f"is_headless: {is_headless}")
log_file_path = ""
app = Flask(__name__)

GMAPS_URL_RE = re.compile(
	r"""(?x)  # Verbose mode
	^https?://
	(
		(www\.)?
		(google\.[a-z.]+/maps)			  |		# www.google.com/maps, google.co.uk/maps, etc.
		(maps\.google\.[a-z.]+)			  |		# maps.google.com
		(goo\.gl/maps)					  |		# goo.gl/maps
		(maps\.app\.goo\.gl)					# maps.app.goo.gl
		# (maps\.app\.goo\.gl.*\.preview\.copy)	# maps.app.goo.gl(...).preview.copy
	)
	""",
	re.IGNORECASE
)

# ---- Dispatcher
def extract_coordinates(url: str):
	if ".preview.copy" in url:
		return handle_preview_copy_url(url)
	if "maps?q=" in url:
		return handle_browser_resolved_url(url)
	else:
		return handle_standard_url(url)

# ---- Handler: preview.copy links
def handle_preview_copy_url(url: str):
	url = url.split('?')[0]
	input_url = resolve_initial_redirect(url)
	if "consent.google.com" in input_url:
		parsed = urllib.parse.urlparse(input_url)
		query = urllib.parse.parse_qs(parsed.query)
		continue_url = query.get("continue", [""])[0]
		if continue_url:
			input_url = urllib.parse.unquote(continue_url)
		else:
			log_msg("ERROR", "No 'continue' parameter found.")
			return None, input_url
	final_url = extract_with_playwright(input_url)
	coord = extract_coords_from_url(final_url)
	return coord, final_url

# ---- Handler: links with only a query containing place names (https://maps.google.com/maps?q=Big+Ben%2C+London)
def handle_browser_resolved_url(url: str):
	input_url = resolve_initial_redirect(url)
	if "consent.google.com" in input_url:
		parsed = urllib.parse.urlparse(input_url)
		query = urllib.parse.parse_qs(parsed.query)
		continue_url = query.get("continue", [""])[0]
		if continue_url:
			input_url = urllib.parse.unquote(continue_url)
		else:
			log_msg("ERROR", "No 'continue' parameter found.")
			return None, input_url
	final_url = extract_with_playwright(input_url)
	coord = extract_coords_from_url(final_url)
	return coord, final_url

# ---- Handler: standard links
def handle_standard_url(url: str):
	try:
		# Follow redirect to get final destination
		response = requests.head(url, allow_redirects=True, timeout=10)
		final_url = response.url
		log_msg("DEBUG", "Final URL:", final_url)
	except requests.RequestException as e:
		raise RuntimeError(f"Failed to resolve standard URL: {e}")
	coords = extract_coords_from_url(final_url)
	return coords, final_url

# ---- Utility: redirect resolver
def resolve_initial_redirect(url: str):
	try:
		response = requests.get(url, allow_redirects=True, timeout=10)
		return response.url
	except Exception as e:
		log_msg("ERROR", "Redirect failed: ", e)
		return url

# ---- Utility: use playwright to get the final rendered URL
def extract_with_playwright(url:str):
	with sync_playwright() as p:
		browser = p.chromium.launch(headless=is_headless)
		page = browser.new_page()
		page.goto(url)
		# Click reject button if necessary
		try:
			page.locator('button:has-text("Reject all")').first.click(timeout=5000)
		except:
			pass # No reject button
		page.wait_for_function(
				"""() => window.location.href.includes('/@')""",
				timeout=15000
		)
		final_url = page.url
		log_msg("DEBUG", "Final URL: ", final_url)
		browser.close()
		return final_url

# ---- Utility: extract coordinates with regex patterns
def extract_coords_from_url(url: str):
	patterns = [
		r'/@([-.\d]+),([-.\d]+)',				 # Matches /@lat,lon
		r'/place/([-.\d]+),([-.\d]+)',			 # Matches /place/lat,lon
		r'/search/([-.\d]+),\+?([-.\d]+)',
		r'[?&]q=([-.\d]+),([-.\d]+)',			 # Matches ?q=lat,lon
		r'[?&]ll=([-.\d]+),([-.\d]+)',			 # Matches ?ll=lat,lon
		r'[?&]center=([-.\d]+),([-.\d]+)',		 # Matches ?center=lat,lon
		r'!3d([-.\d]+)!4d([-.\d]+)'				 # Matches !3dlat!4dlon
	]
	for pattern in patterns:
		match = re.search(pattern, url)
		if match:
			return match.groups()
	return None

# ---- Utility: logging function to output and write to file
def log_msg(level: str, msg: str, optional_arg = None):
	ts = datetime.now()
	iso_ts = ts.isoformat()
	if level == "DEBUG" and debug_enabled == False:
		return
	if optional_arg:
		log_line = f"[{iso_ts}]:[{level}]: {msg} {optional_arg}"
	else:
		log_line = f"[{iso_ts}]:[{level}]: {msg}"
	print(log_line)
	with open(log_file_path+"gmaps2osm_logs.txt", "a") as log_file:
		log_file.write(log_line+"\n")

@app.route("/", methods=["GET", "POST"])
def index():
	result = {}
	if request.method == "POST":
		url = request.form.get("gmaps_url", "").strip()
		log_msg("DEBUG", "URL:", url)
		if not url:
			result["error"] = "Please enter a Google Maps URL."
			log_msg("DEBUG", "Not a URL")
		else:
			try:
				if not GMAPS_URL_RE.search(url):
					result["error"] = "Please enter a valid Google Maps URL."
				else:
					coords, final_url = extract_coordinates(url)
					log_msg("DEBUG", "coords:", coords)
					if coords:
						lat, lon = coords
						result["latitude"] = lat
						result["longitude"] = lon
						result["osm_link"] = f"https://osmand.net/map?pin=%7Blat%7D%2C%7Blon%7D#16/{lat}/{lon}"
					else:
						raise ValueError("No coordinates found in the URL.")
			except ValueError as e:
				result["error"] = f"Error resolving or parsing URL: {e}"
	return render_template("index.html", **result)

if __name__ == "__main__":
	app.run(debug=True)

You can view all the code at the github: https://github.com/promitheas17j/gmaps2osm

But essentially its running as a docker container (my first project using docker woowoo) and this is the output of the logs on the server when I enter such a link:

$ docker logs -f gmaps2osm
[2025-08-15 17:42:00,132] ERROR in app: Exception on / [POST]
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 1511, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 919, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 917, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 902, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]
  File "/app/app.py", line 164, in index
    coords, final_url = extract_coordinates(url)
  File "/app/app.py", line 42, in extract_coordinates
    return handle_preview_copy_url(url)
  File "/app/app.py", line 61, in handle_preview_copy_url
    final_url = extract_with_playwright(input_url)
  File "/app/app.py", line 113, in extract_with_playwright
    page.wait_for_url("**/@**", timeout=15000)
  File "/usr/local/lib/python3.10/dist-packages/playwright/sync_api/_generated.py", line 9162, in wait_for_url
    self._sync(
  File "/usr/local/lib/python3.10/dist-packages/playwright/_impl/_sync_base.py", line 115, in _sync
    return task.result()
  File "/usr/local/lib/python3.10/dist-packages/playwright/_impl/_page.py", line 584, in wait_for_url
    return await self._main_frame.wait_for_url(**locals_to_params(locals()))
  File "/usr/local/lib/python3.10/dist-packages/playwright/_impl/_frame.py", line 263, in wait_for_url
    async with self.expect_navigation(
  File "/usr/local/lib/python3.10/dist-packages/playwright/_impl/_event_context_manager.py", line 33, in __aexit__
    await self._future
  File "/usr/local/lib/python3.10/dist-packages/playwright/_impl/_frame.py", line 239, in continuation
    event = await waiter.result()
playwright._impl._errors.TimeoutError: Timeout 15000ms exceeded.
=========================== logs ===========================
waiting for navigation to "**/@**" until 'load'
============================================================

This was when I gave this URL as input: https://maps.app.goo.gl/jXqDkM2NWN55kZcd9?g_st=com.google.maps.preview.copy

Anyone have any idea why playwright is throwing errors at me?

Thanks in advance, I really appreciate any help you can give me. Ive been banging my head about this issue on and off the past couple of months.

14
submitted 9 months ago* (last edited 9 months ago) by promitheas@programming.dev to c/linuxquestions@lemmy.zip

Hello everyone!

As the title says, I am trying to set up email alerts on my server whenever there is a successful ssh connection (will also setup the same for failed connections with fail2ban later). I already have the email script created and it works (I use it to monitor the directories containing all of these security scripts for changes so that I also get notified if anything critical is modified or deleted in those directories).

I also created a very basic user called test for - you guessed it - testing purposes. This user doesn't have a home directory or anything like that.

Here are the relevant scripts:

$ cat /usr/local/bin/login-alert.sh
#!/bin/bash

# Sends alerts only for real terminals not cron jobs
if [[ -n "$SSH_CONNECTION" ]]; then
	USERNAME=$(whoami)
	IP=$(echo $SSH_CONNECTION | awk '{print $1}')
	HOST=$(hostname)
	DATETIME=$(date)
	/usr/local/bin/semail \
		-s "[CRITICAL] SSH Login to $HOST" \
	 	-b "Login detected:\n\nUser: $USERNAME\nIP: $IP\nTime: $DATETIME\nTTY: $SSH_TTY"
fi

$ cat /usr/local/bin/semail
#!/bin/bash

# Default values
TO="my_email@here.com"
FROM="notifications@my_server.com"
SUBJECT=""
BODY=""
BODY_FILE=""


# Help function
show_help() {
cat <<EOF
Usage: $0 [OPTIONS]

Send a test email using Postfix.

Options:
  -t, --to EMAIL            Recipient email address (default: $TO)
  -s, --subject TEXT        Subject of the email (required)
  -b, --body TEXT           Body text of the email
  -f, --body-file FILE      File to read body text from (overrides --body)
  -h, --help                Show this help message

If no body or body-file is provided, you will be prompted to enter the body interactively.

Examples:
  $0 -s "Test subject" -b "Hello\nThis is a test"
  $0 --subject "Test" --body-file message.txt
EOF
}

# Parse arguments
while [[ "$#" -gt 0 ]]; do
	case "$1" in
		-t|--to)
			TO="$2"
			shift 2
			;;
		-s|--subject)
			SUBJECT="$2"
			shift 2
			;;
		-b|--body)
			BODY="$2"
			shift 2
			;;
		-f|--body-file)
			BODY_FILE="$2"
			shift 2
			;;
		-h|--help)
			show_help
			exit 0
			;;
		*)
			echo "Unknown option: $1"
			show_help
			exit 1
			;;
	esac
done

# Validate required parameters
if [[ -z "$SUBJECT" ]]; then
	echo "Error: --subject is required."
	show_help
	exit 1
fi

# Handle body input
if [[ -n "$BODY_FILE" ]]; then
	if [[ ! -f "$BODY_FILE" ]]; then
		echo "Error: Body file '$BODY_FILE' does not exist."
		exit 1
	fi
	BODY=$(<"$BODY_FILE")
elif [[ -z "$BODY" ]]; then
	echo "Enter the body of the email (end with Ctrl-D):"
	BODY=$(</dev/stdin)
fi

# Send email
{
	echo "From: $FROM"
	echo "To: $TO"
	echo "Subject: $SUBJECT"
	echo "Content-Type: text/plain; charset=UTF-8"
	echo
	printf "%b\n" "$BODY"
} | /usr/sbin/sendmail -t -f "$FROM"

# /usr/sbin/sendmail -f "$FROM" "$TO" <<EOF
# From: $FROM
# To: $TO
# Subject: $SUBJECT

# $BODY
# EOF

echo "Email sent to $TO"

And here is the output I see when I login as the test user:

ssh test@my_server.com
test@my_server.com's password:
dir=/ failed: exit code 2
dir=/ failed: exit code 2
Linux my_server 6.1.0-37-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.140-1 (2025-05-22) x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Fri Aug 15 07:08:24 2025 from my_ip_address
Could not chdir to home directory /home/test: No such file or directory

I don't get email alerts for any user, neither the test user nor my regular admin user.

Here is my /etc/pam.d/sshd relevant lines:

# Standard Un*x session setup and teardown.
account optional pam_exec.so seteuid dir=/ /usr/local/bin/login_notify.sh
@include common-session

I also tried with session instead of account and without the dir=/ part.

Can anyone help me troubleshoot this please?

Thanks in advance. Of course if you need any more info I'll do my best to provide it :)

10
submitted 11 months ago* (last edited 11 months ago) by promitheas@programming.dev to c/askandroid@lemdro.id

Hello guys. I have island installed and have my "work profile" installed, which contains among others my browser in the island tab. The situation is that I have several PWAs that I dont want to receive notifications for while I am at work as they are distracting and unnecessarily annoying, but I want to receive them normally while not at work.

I have been trying to figure out how to get it set up so that I can both trigger the actions at scheduled times, or manually through the quick tile I created from macrodroid (my work hours are not really stable/fixed).

However, when testing with a push notification testing site, regardless what I do I still get the notifications.

Here is my setup so far:

Macros:
Enable Work Profile
--------------------------
Triggers:
    Day/Time: 08:00 Mon, Fri
    Quick Tile On/Press

Actions:
    Action 1:
        Target: Broadcast
        Send Intent: island.intent.action.FREEZE_APP
        Extra 1: package_name = com.brave.browser
    Action 2:
        Display Notification (with a message saying work mode enabled)

Constraints: None

Disable Work Profile
--------------------------
Triggers:
    Quick Tile Off

Actions:
    Action 1:
        Target: Broadcast
        Send Intent: island.intent.action.UNFREEZE_APP
        Extra 1: package_name = com.brave.browser
    Action 2:
        Display Notification (with a message saying work mode disabled)

Constraints:
    Day of the Week: Mon
    Time of Day: 19:00 - 19:01
------------------- OR --------------------------
    Day of the Week: Fri
    Time of Day: 22:00 - 22:01

Some things to note:

I am using /e/os version 3.0.1-t-20250606498724-official-FP5 Android is version 13

What am I doing wrong here? Ideally I would like to have as few apps installed as possible to achieve a single task, but as I understand it macrodroid doesnt have the necessary permissions to affect other apps notifications (hence why island is necessary).

If there is another way which is easier to achieve what I am trying to do I'm all ears, however I do not want to use do not disturb for this purpose because obviously I need to be able to use my phone normally while at work except for those 2-3 apps I dont want to receive notifications for, but there are also situations where I want a full DND experience where I will get nothing coming through, not even alarms (e.g. meetings/classes, etc). Also for those unfamiliar with /e/os, it doesn't currently have the Focus Mode feature so that is also out of the picture.

Many thanks in advance!

13
submitted 1 year ago* (last edited 1 year ago) by promitheas@programming.dev to c/piracy@lemmy.dbzer0.com

[Solution at end]

Essentially what the title sais.

I want to give this genre a try, but I also want to use mods. Also, Im on Linux so if there are any extra steps I need to do if I install through lutris/steam (as non-steam game) then I would really appreciate your input. The only reason I am currently considering steam as a non-steam game for the install method is just so I dont fragment my games library too much across multiple platforms/apps. If there is any reason not to install it in steam please also let me know.

Much appreciated!!!

[SOLUTION]

Turns out the torrent I found was just a .rar file of the game with the crack file already there. All I had to do was unpack it, then add it through Lutris as a locally installed .exe. I did have to change the runner to proton-ge as the default wine would not start the game. I also had to go into the prefix it created and apply this fix (steamcommunity link) to get it to stop displaying an annoying pop-up message every 30 minutes or so (yet to test it out, but it should work. Will edit again if it doesnt remove the pop-up message).

Also, strangely enough at least for my experience with pirating games, the in-game mod "store" worked perfectly, and I didn't need to manually move files to a mods folder, though I'm sure that would also work just as well.

EDIT 2: The workaround to edit the playtime in the game files worked and I no longer get the pop-up message.

9

Hey guys. I just got a Genesis Thor 300 TKL keyboard which doesnt work from my brother. I've got a Glorious GMMK v1 TKL keyboard. Is it possible to desolder the MX Blue switches from the broken Genesis keyboard and use them in the Glorious keyboard which at least to my knowledge is hotswappable?

Thanks in advance!

27
submitted 1 year ago* (last edited 1 year ago) by promitheas@programming.dev to c/degoogle@lemmy.ml

Hello guys! A few days ago my current phone fell flat on its screen and it cracked. It's still usable, but its already quite old, and I've been wanting to switch to Fairphone because I like what they are doing as a company, and I like that I can get a device with a degoogled OS directly from them.

However, currently only the 128GB/6GB storage/ram version of the /e/os Fairphone 5 is in stock.

I mainly use my device for media (youtube -> free alternative, stremio, ebooks, etc), calls/texts, and texting through internet messenger apps.

Finally, my question: do you guys think I should wait for the 256GB/8GB version to be back in stock, or just get the currently available one. I don't play mobile games so I dont need anything fancy in that regard.

It is worth it to note that my current device has 128GB storage but 8GB ram, which is more what I am wondering about whether it will be enough. I don't want it to be unusably laggy a few years down the line, I plan on having my next device for at least 8 years, more if possible.

Anyway, thanks for all the help in advance!

Edit: will wait for the 256GB/8GB version to be back in stock. Thanks for all the advice!

[-] promitheas@programming.dev 18 points 1 year ago

After the situation with his former employee (i forget her name) coming out and exposing how toxic of a work environment that company is, i completely stopped watching (not that i was a regular viewer before) and do not give their vids the slightest bit of my time

13
submitted 1 year ago* (last edited 1 year ago) by promitheas@programming.dev to c/linux@lemmy.ml

Hello everyone! I recently decided to reignite my passion for learning about kernel development, so I printed out the third edition of Linux Device Drivers by J. Corbet + others. In the book it is stated that they assume you have the 2.6.10 kernel. I decided to set up a virtual machine using virt-manager so that I can work through most of the book (I realise VMs dont allow for many things when developing drivers, where physical access to hardware is required, but its the best option for now until I can get a RPi or something else).

I decided to go with Ubuntu Dapper Drake, as it has a kernel version pretty close to what is used in the book, so I figured there wouldn't be much friction when trying to install the specific 2.6.10 version (Dapper Drake is on 2.6.15, at least the one I got). However, I am encountering an issue with my networking. I have set up the NAT bridge from my regular WIFI internet connection to my virtual machines, set my dapper drake installation to use that in the NIC settings, but it doesnt connect.

Here are some commands and their output from the guest OS:

$ ifconfig -a
lo
<loopback information yada yada>

sit0
<yada yada>

$ lspci | grep -i ethernet
0000:01:00.0 Ethernet controller: Unknown device 1af4:1041 (rev 01)

The second command's output leads me to believe that a device is detected but the OS doesnt know what to do with it because I dont have the virtio drivers for networking installed.

I've searched everywhere for a way to download them either as source or as a .deb package so I can transfer them to the guest OS using a disk drive I will create, but I cant find them anywhere. Everywhere I look, everyone says that for linux they are already included in the kernel (might not be true for the distribution I have as a guest).

So here is my question(s) finally: Where can I find virtio-tools either as a .deb package or as source with instruction to build on a distribution of around the age of dapper drake, or if there is another way and I am wrongly fixated on this, how can I set up networking by passing through my regular internet from the host to the guest, so that I can use stuff like github to write the driver code on my host and easily transfer it to the guest for compilation/testing?

Please be gentle. Dapper drake released around 2006 and it wasn't until 2016 when I first used linux in any form, so I am used to a little more quality of life in my distributions xD /j

As always, many thanks in advance to everyone taking time to answer :)

[-] promitheas@programming.dev 47 points 2 years ago* (last edited 2 years ago)

Use chapstick

Read a book in public

Not go to gym

Play certain more "feminine" games

Those off the top of my head. I live in a nation of backwards idiots, so there for sure are more

[-] promitheas@programming.dev 129 points 2 years ago

Yea, why are Microsoft forums so bad? I have to use them sometimes as I work in IT and all our PCs run windows. Googling often leads me to their forums. The forums rarely lead me to a solution however

[-] promitheas@programming.dev 22 points 2 years ago

What you do for work might be a factor, but i dont think pain to that extent is normal. I would stress to your doctor that basic tasks are painful and that youd like to get checked out anyway. Youve got nothing to lose by getting it checked, only to gain. Im in my mid 20s too and while i get aches in my knees/back occasionally its not debilitating as you describe it.

[-] promitheas@programming.dev 125 points 2 years ago

Gives these vibes

[-] promitheas@programming.dev 33 points 2 years ago

As ive grown older i find myself disagreeing more and more with the jedi whom as a child i idolised as paragons of good. But palpatine, vader, and the empire are so many things before being "poor good revolutionaries" trying to take down the status quo simply from the good of their golden hearts. Theres always more than 2 choices people :)

view more: next ›

promitheas

joined 3 years ago