Skip to content

d3xt3rr0r/ramdisk-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

130 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation


Icon

RAMDisk Manager

Python Shell License

Version: 1.2.1

πŸ€– Simple & efficient RAMDisk manager for Linux β€” with CLI and modern GUI
πŸ’Ύ Creates volatile in-RAM filesystems, enables safe data persistence via sync with
persistent storage, and features one-click GUI control.


✨ Features

  • 🧠 RAM-based storage β€” Create high-speed, volatile tmpfs disks of configurable size
  • πŸ”„ Bi-directional sync β€” Automatic and manual sync between RAM disk and persistent RAMDisk_data/ folder
  • πŸ–₯ Dual interfaces β€” Full CLI for scripting & terminal workflows + modern GUI (built with PySide6) for daily use
  • πŸ”’ Secure password handling β€” Uses pkexec for privileged operations β€” no terminal password input needed
  • ⏱ Auto-sync scheduling β€” Configure periodic sync intervals in GUI (CLI requires manual triggers)
  • πŸ“Š Real-time status β€” GUI logs mount state, sync history, and warnings

πŸ“‹ Requirements

Component Requirement
OS Linux (tested on Ubuntu, Fedora, Arch)
Python β‰₯ 3.8 (python3 --version)
Runtime rsync, mount, umount (standard on all major distros)
GUI polkit + pkexec (for secure sudo-equivalent auth)
*Optional: zenity/yad for fallback auth
GUI lib PySide6 (pip install PySide6)

πŸ’‘ Note: pkexec is required for the GUI's mount/umount buttons. If missing, the app will fall back to warning the user (CLI still works with sudo).


πŸš€ Installation

1. Clone the repository

git clone https://github.com/d3xt3rr0r/ramdisk-manager.git
cd ramdisk-manager

2. Make the wrapper executable

chmod +x run.sh

3. Install GUI dependency (if using GUI)

pip install --user PySide6

πŸ’» Usage

CLI commands

First run via ./run.sh and wrapper will be installed to ~/.local/bin

Command Description
ramdisk-manager start [sizeGB] Mount RAM disk of given size (default: from config.json)
ramdisk-manager stop Sync RAM β†’ persistent store, then unmount & delete
ramdisk-manager sync One-time RAM β†’ persistent sync (CLI-only)
ramdisk-manager gui Launch GUI (requires PySide6)

⚠ Root permissions are requested via GUI dialog or terminal (via pkexec/sudo).

πŸ“ All program files should be stored in ~/.config/ramdisk-manager

πŸ“ Data paths:

  • RAM disk: ~/RAMDisk/
  • Persistent backup: ~/RAMDisk_data/

πŸ–₯ GUI Interface

Launch with:

ramdisk-manager gui

Main controls

  • ℹ️ Status: Shows mount state (NOT MOUNTED / MOUNTED)
  • πŸ”² Mount RAMDisk: Set size in GB (1-1024) & click "Start"
  • ⏹ Unmount: Click "Stop" (triggers sync first)
  • πŸ”„ Sync Now: For one-time manual sync, click "Sync"
  • ⏱ Auto-sync interval: Minutes (1-1440)
  • πŸ›  Config editor: Adjust defaults (size, interval)
  • πŸ“œ Log Panel: Real-time terminal output

Icon

Icon

Icon


πŸ—‚ Project Structure

~/.config/ramdisk-manager/
β”œβ”€β”€ ramdisk.py         # Core CLI logic (mount/umount/sync)
β”œβ”€β”€ gui.py             # PySide6 GUI (configurable widgets + logs)
β”œβ”€β”€ run.sh             # Bash wrapper (imports/invokes ramdisk.py)
β”œβ”€β”€ config.json        # Sample config (auto-generated on first run)
β”œβ”€β”€ icon.png           # Program icon
β”œβ”€β”€ README.md          # This file
└── LICENSE            # MIT License

πŸ“Œ Notes & Troubleshooting

Issue Solution
pkexec not found Install polkit (sudo apt install polkit, sudo pacman -S polkit, etc.)
GUI fails to start Check: python3 -m PySide6 β†’ install PySide6 if missing
Sync fails with rsync error Ensure rsync installed: sudo apt install rsync
Already mounted CLI prints warning; GUI shows current state & disables mount button

πŸ“„ License

Distributed under the MIT License.
Β© 2026 d3xt3rr0r


Happy RAM-hacking! πŸ§ πŸ’ΎπŸš€
Feedback, PRs & issues welcome!


About

RAMDisk Manager β€” πŸ€– Simple & efficient RAMDisk manager for Linux β€” with CLI and modern GUI πŸ’Ύ Creates volatile in-RAM filesystems, enables safe data persistence via sync with persistent storage, and features one-click GUI control.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors