Soluții

Cum poti folosi laptopul pe post de PC cu clapeta inchisa (clamshell mode), economisind performanta si energie electrica

Implicit, atunci cand incercam sa folosim un laptop in clamshell mode(ca si cum am folosi laptopul pe post de unitate centrala/PC, cu capacul inchis), monitorul acestuia, dar si monitorul/monitoarele conectate se vor stinge, intrucat laptopul va detecta inchiderea clapetei si va intra automat in sleep mode. Ca sa putem utiliza laptopul in clamshell mode, trebuie sa facem laptopul sa nu mai intre in sleep mode in momentul in care clapeta este inchisa.

[mai mult...]

RetroArch on Raspberry Pi – Complete Installation & Configuration Guide

Flash Raspberry Pi OS:

    • Use Raspberry Pi Imager to install Raspberry Pi OS.

    • Enable SSH and Wi-Fi in advanced settings (optional but useful).

First Boot:

    • Insert the microSD, power up your Pi, and complete the OS setup.

Update your system:

bash
sudo apt update && sudo apt full-upgrade -y
sudo reboot

Install RetroArch

There are two main options to install RetroArch:

Option A: Install via RetroPie (Recommended for Ease + Full Emulation Suite)

RetroPie bundles RetroArch + EmulationStation and makes configuration easier.

  1. Install Git:

    bash
    sudo apt install git -y
  2. Clone and install RetroPie:

    bash
    git clone --depth=1 https://github.com/RetroPie/RetroPie-Setup.git
    cd RetroPie-Setup
    chmod +x retropie_setup.sh
    sudo ./retropie_setup.sh
  3. Choose:

    • Basic Install – installs RetroArch, EmulationStation, and core scripts.

  4. After install, reboot:

    bash
    sudo reboot

Option B: Install RetroArch Standalone from Source

If you want only RetroArch:

  1. Install dependencies:

    bash
    sudo apt install build-essential git libasound2-dev libudev-dev libsdl2-dev libv4l-dev \
    libxkbcommon-dev libdrm-dev libgbm-dev libpulse-dev libx11-dev libegl1-mesa-dev \
    libxrandr-dev libxi-dev libgl1-mesa-dev -y
  2. Clone RetroArch:

    bash
    git clone https://github.com/libretro/RetroArch.git
    cd RetroArch
    ./configure
    make -j$(nproc)
    sudo make install
  3. Launch RetroArch:

    bash
    retroarch

 You’ll need to install and manage cores and frontends manually if you choose Option B.

Step 3: Install Emulator Cores

From within RetroArch:

  1. Launch RetroArch:

    bash
    retroarch
  2. Navigate to:

    • Main Menu > Online Updater > Core Downloader

    • Select and download cores (emulators) such as:

      • NES: FCEUmm, Nestopia

      • SNES: SNES9x

      • GBA: mGBA

      • PS1: PCSX ReARMed (best for Raspberry Pi)

Step 4: Add ROMs

  1. Create ROM folders:

    bash
    mkdir -p ~/RetroPie/roms/nes
    mkdir -p ~/RetroPie/roms/snes
    mkdir -p ~/RetroPie/roms/psx
  2. Transfer ROMs:

    • Use SFTP (via FileZilla) or USB stick.

    • File path: ~/RetroPie/roms/[system]

Legal Note: Only use ROMs you legally own.

Step 5: Configure Controllers

Auto-Configuration:

  • On first launch, RetroArch will detect most gamepads.

  • Follow the on-screen prompts to map buttons.

Manual Configuration:

  • Main Menu > Settings > Input > Port 1 Binds

  • Save autoconfig:

    • Input > Save Autoconfig

Step 6: Enable Video and Shaders

  1. Settings > Video:

    • Enable Threaded Video

    • Set Scaling > Aspect Ratio to Core Provided or 4:3

  2. Shaders (for CRT filters):

    • Settings > Shaders > Load Shader Preset

    • Try crt-pi.glslp or crt-geom.glslp

Step 7: Save Configurations

Make sure to save settings:

bash
Settings > Configuration File > Save Current Configuration

Or save per-core config:

bash
Quick Menu > Overrides > Save Core Overrides

Step 8: Autostart RetroArch

To launch RetroArch on boot:

bash
nano ~/.bashrc

Add at the end:

bash
if [ $(tty) = "/dev/tty1" ]; then
retroarch
fi

Or use EmulationStation (from RetroPie) as the frontend.

Optional Enhancements

Add Hotkeys

  • Assign a “Hotkey Enable” button (e.g., Select)

  • Combine with:

    • Hotkey + Start = Exit

    • Hotkey + R = Reset

RetroAchievements

Overclock (Advanced)

  • Use raspi-config > Overclock

  • Improves performance but watch temps.

[mai mult...]

How I get an Email when someone logs into My Windows 11 PC

Create a Script to Send the Email

The first step is to write the script that sends an automatic email when someone signs in to a user account on your Windows 11 PC. This script contains your email account’s login details and the custom message that you receive when someone has signed to your PC.

This script stores your email password in plaintext. In theory, that is a security vulnerability if someone finds it and starts going through it. If you’re concerned about that security risk, you can create a throwaway email to use for this instead. That way there is no risk of someone gaining access to your real email.

To create the script, access Windows Search (press Windows+S), type Notepad, and launch the app. In a new document, type the following script:

# Email Settings
$smtpServer = "smtp.youremailprovider.com"
$smtpPort = "587"
$smtpUser = "yourname@youremailprovider.com"
$smtpPass = "youremailpassword"
$toEmail = "recipient@email.com"
$subject = "Login Alert on $env:COMPUTERNAME"
$body = "User $env:USERNAME has just logged in at $(Get-Date)."

# Send Email
$msg = New-Object System.Net.Mail.MailMessage $smtpUser, $toEmail, $subject, $body
$smtp = New-Object Net.Mail.SmtpClient($smtpServer, $smtpPort)
$smtp.EnableSsl = $true
$smtp.Credentials = New-Object System.Net.NetworkCredential($smtpUser, $smtpPass)
$smtp.Send($msg)

In the script, in the Email Settings section, replace the SMTP settings with those that reflect your email account. You can get these details from Gmail, Outlook, or another email provider that you use. In case you’ve enabled two-factor authentication for your email account, you’ll have to create an app-specific password and use that instead in the SMTP settings section.

  • After you’ve configured the settings in the script, save the script.
  • From Notepad’s menu bar, select File > Save As.
  • On the Save As window, choose the folder in which you want to save the file.
  • Select the “Save as Type” drop-down menu and choose “All Files”
  • Click the “File Name” field and type something like SendLoginEmail.ps1
  •  Then, choose “Save”.

Your email script is ready, and you’ll now use Task Scheduler to run the script each time someone logs in to a user account on your PC.

  • To do that, open Windows Search (press Windows+S), type Task Scheduler, and launch the utility. On the right pane, click “Create Task.”
  • In the General tab, select the “Name” field and type a name for the task. This could be something like Login Email Alert.
  • Turn on the “Run Whether User Is Logged On or Not” and “Run With Highest Privileges” options.
  • From the top bar, open the “Triggers” tab. Click “New” to add a new trigger. Select the “Begin the Task” drop-down menu and choose “At Log On.”
  • If you want to get an email alert when any user logs in to your PC, choose “Any User.” To only get an alert when someone logs in to a specific user account, enable “Specific User.” Then, click “Change User” and select the account.
  • Open the “Actions” tab and click “New” to add a new action.
  • Select the “Action” drop-down menu and choose “Start a Program”
  • Select the “Program/Script” field and type powershell.exe.
  • In the “Add Arguments (Optional)” field, type the following. Make sure to replace the script path with the path to the script you created earlier.
-ExecutionPolicy Bypass -File "C:\Scripts\SendLoginEmail.ps1"
  • Select “OK,” enter your admin password, and save the task.

From now on, Windows 11 will automatically send you an email when someone logs in to your PC. In the future, if you don’t want to receive these alerts, right-click your task in Task Scheduler and choose “Delete”. To quickly find these emails in your inbox, you can set up a label. The script above uses “Login Alert on” as the subject line, which you can use to filter all these emails.

Hide the PowerShell Window on Startup

To send you an email alert when someone logs in to your PC, Windows 11 launches PowerShell for a brief moment. This means anyone logging in to your PC will see that window. If you’d like to hide the window, do the following.

Open Notepad and type the following. Make sure to replace the script path with your script’s path.

Set objShell = CreateObject("Wscript.Shell")
objShell.Run "powershell.exe -ExecutionPolicy Bypass -File ""C:\Scripts\SendLoginEmail.ps1""", 0, False

From Notepad’s menu bar, select File > Save As. Select the folder in which you want to save the script. Click the “Save as Type” drop-down menu and choose “All Files.” Click the “File Name” field and type SendLoginEmail.vbs. Then, choose “Save.”

Open Task Scheduler and edit your task. For the action, change “Program/Script” to wscript.exe. In the “Add Arguments (Optional)” field, type the following, replacing the path with your script’s path.

"C:\Scripts\SendLoginEmail.vbs"
[mai mult...]