██╗ ███╗ ██╗██╗ ██╗ ██████╗ ███████╗ █████╗ ██████╗ ███████╗██████╗
██║ ████╗ ██║██║ ██╔╝ ██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔════╝██╔══██╗
██║ ██╔██╗ ██║█████╔╝ ██████╔╝█████╗ ███████║██║ ██║█████╗ ██████╔╝
██║ ██║╚██╗██║██╔═██╗ ██╔══██╗██╔══╝ ██╔══██║██║ ██║██╔══╝ ██╔══██╗
███████╗██║ ╚████║██║ ██╗ ██║ ██║███████╗██║ ██║██████╔╝███████╗██║ ██║
╚══════╝╚═╝ ╚═══╝╚═╝ ╚═╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═════╝ ╚══════╝╚═╝ ╚═╝
LNK Reader lets you open .lnk shortcut files on Linux and macOS.
A .lnk file is usually a shortcut created on Windows.
With LNK Reader, you can double-click a .lnk file and open its real target, even when the shortcut points to:
- another drive
- an external disk
- a mounted partition
- a shared network folder
- an SMB share like
\\server\share
The goal is simple:
Double-click the shortcut.
Open the real file or folder.
No terminal is needed for normal use.
Capture.video.du.24-09-2023.01.32.40.webm
LNK Reader is useful when you are on Linux or macOS and you receive .lnk files created on Windows.
For example, someone may send you a shortcut pointing to:
\\192.168.1.50\shared_folder\project
or:
F:\Documents\Project
Normally, Linux and macOS do not open .lnk files like Windows does.
LNK Reader reads the shortcut, tries to understand where it points, and opens the correct file, folder, or network location.
LNK Reader can open shortcuts pointing to:
- files
- folders
- mounted drives
- external disks
- network folders
- SMB shares
Examples:
F:\Documents\file.pdf
\\server\share\folder
\\192.168.1.50\share_name\folder\file.txt
LNK Reader does not give access to private folders.
If a network share needs a username or password, your operating system may still ask for it.
LNK Reader can help open the right address, but it cannot bypass permissions.
Run:
./setup.shThis installs the app and tries to set up desktop integration.
You can also build and install it manually:
make
sudo make installRun:
./uninstall.shThis removes the installed app and desktop integration.
It does not delete your personal files.
Double-click a .lnk file.
Or right-click it and choose:
Open With -> LNK Reader
On macOS, after installation, use:
Open With -> Open LNK
LNK Reader opens the target directly.
The target can be a file, a folder, a mounted drive, or a network location.
LNK Reader may show a small assistant window.
The assistant asks you where the drive or network share is mounted on your system.
For example, if a shortcut points to:
F:\Documents
LNK Reader may ask where drive F: is mounted.
Once you select the correct folder, LNK Reader remembers it for next time.
On macOS, the real command-line tool is called:
open_lnk
Finder usually does not show command-line tools in the “Open With” menu.
That is why the installer creates a small app wrapper:
Open LNK.app
After running setup.sh, you can set it as the default app for .lnk files:
Right-click a .lnk file
Get Info
Open with
Choose Open LNK
Change All
If Finder does not refresh immediately, restart Finder:
killall FinderMany .lnk files point to shared folders.
Example:
\\192.168.1.50\share_name
LNK Reader understands this kind of path.
On macOS, it can try to open it directly as:
smb://192.168.1.50/share_name
This helps avoid asking the user to manually select a mounted folder when the system can already handle SMB links.
The operating system may still ask for credentials if the share is protected.
A shortcut pointing to:
\\192.168.1.50\share_name\folder\file.txt
can be opened as:
smb://192.168.1.50/share_name/folder/file.txt
Sometimes a shortcut points to a Windows path, but your Linux or macOS system uses another path.
For example, the shortcut says:
F:\Projects
But on your system, that drive is mounted here:
/media/me/PROJECTS
You can tell LNK Reader how to translate paths using a mapping file.
Mapping file location:
~/.config/windows-link-reader/mappings.conf
F:=/media/me/PROJECTSThis means:
F:\something
becomes:
/media/me/PROJECTS/something
//server/share=/mnt/shareThis means:
\\server\share\folder
becomes:
/mnt/share/folder
//server/share=smb://server/shareThis means:
\\server\share\folder
becomes:
smb://server/share/folder
Another example:
//192.168.1.50/share_name=smb://192.168.1.50/share_nameThis is especially useful on macOS.
On the right side of a mapping, you can use:
~
~/folder
$HOME
$HOME/folder
${HOME}
${HOME}/folder
Example:
Z:=$HOME/my_driveFor network share names, you can also use:
$USER
${USER}
Example:
\\server\home\$USER=$HOME/server_homeNo other shell expansion is done.
LNK Reader remembers some choices so you do not have to repeat them every time.
Cache file:
~/.cache/windows-link-reader/links.conf
or:
$XDG_CACHE_HOME/windows-link-reader/links.conf
You usually do not need to edit this file manually.
To clear the cache:
open_lnk --clear-cacheThis can help if the wrong folder opens.
When launched from a graphical desktop, LNK Reader writes a small log file.
Default log file:
~/.cache/windows-link-reader/open_lnk.log
or:
$XDG_CACHE_HOME/windows-link-reader/open_lnk.log
This file can help when reporting a bug.
You can run the tool manually:
open_lnk file.lnkDebug mode:
open_lnk --debug file.lnkShow version:
open_lnk --versionClear cache:
open_lnk --clear-cache- C compiler, for example
gccorclang make
Linux:
xdg-open
macOS:
open, included by default
Optional on Linux:
zenity, for graphical dialogsnotify-send, for desktop notifications
LNK Reader is a best-effort tool.
It supports many common .lnk files, but not every possible advanced shortcut feature.
Network folders may still require login credentials.
SMB links depend on the operating system’s SMB support.
If a shortcut points to a file that does not exist anymore, LNK Reader cannot open it.
If a shortcut does not open, try running:
open_lnk --debug file.lnkThen check the log file:
~/.cache/windows-link-reader/open_lnk.log
If the wrong folder opens, clear the cache:
open_lnk --clear-cacheIf a network share asks for a password, that is normal if the share is protected.
LNK Reader can open the SMB address, but the operating system handles authentication.
Please open an issue here:
https://github.com/SECRET-GUEST/windows_link_reader/issues
When reporting a bug, please include:
- your operating system
- what the
.lnkfile points to, if possible - whether the target is local, mounted, or network-based
- the log file, if available
See the license file in this repository.
_ ._ _ , _ ._ _ ._ _ , _ ._ _ ._ _ , _ ._ _ ._ _ , _ .__ _ , _ ._ ._ _ , _ ._ _ , _ ._ .---. _ ._ _ , _ .__ _ , _ ._ ._ _ , _ ._ _ ._ _ , _ .__ _ , _ . .---<__. \ _
(_ ' ( ` )_ .__) (_ ' ( ` )_ .__ (_ ' ( ` )_ .__) (_ ' ___ ._( ` )_ .__) ( ` )_ .__) )_ .__)/ \(_ ' ( )_ ._( ` )_ .__) ( ` )_ .__) (_ ' ( ` )_ ._( `` )_ . `---._ \ \ \
( ( ( ) `) ) _) ( ( ( ) `) ) ( ( ) `) ) _ ( ( (o o) ) ) `) ) _ ) `) ) _ `) ) \.@-@./( ( ) `) ) `) ) _ ) `) ) _ ( ( ) `) `) ` ),----`- `.))
(__ (_ (_ . _) _) ,__) (__ (_ (_ . _) _) _ (_ (_ . _) _) ,__ (_ ( V ) _) (_ . _) _) ,_ (_ . _) _) ,_ . _) _) ,/`\_/`\ (_ ( . _) _) (_ . _) _) ,_ (_ . _) _) ,__ (_ (_ . _) _) (__. _) _)/ ,--. ) |
`~~`\ ' . /`~~` `~~`\ ' . /`~~` `~~`\ ' . /`~~` `~~`/--m-m- ~~`\ ' . /`~~` `\ ' . /`~~` `\ ' . / // _ \\ ``\ ' . /`~~`\ ' . /`~~` `\ ' . /`~~` `~~`\ ' . /`~~`\ ' . /`~~/_/ > |
; ; ; ; ; ; ; ; ; ; ; ; ; ; | \ )|_ ; ; ; ; ; ; ; ; ; ; |,\__-' |
/ \ / \ / \ / \ / \ / \ / \ /`\_`> <_/ \ / \ / \ / \ / \ / \ \__ \
________/_ __ \___________________/_ __ \___________/_ __ \______ __ ___/_ __ \____/_ __ \________/_ __ \_______/_ __ \\__/'---'\__/_/_ __ \____/_ __ \________/_ __ \_____ _______/_ __ \____/_ __ \____ __\___ )