Skip to content

Commit 8b83e90

Browse files
Improve shortcut creation on Linux
1 parent c3e8298 commit 8b83e90

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

README.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Likewise, the current version of wxPython, is 4.2.4, but RIDE is known to work w
4646

4747
`pip install -U robotframework-ride`
4848

49-
(3.9 <= python <= 3.14) Install current development version (**2.2.2dev4**) with:
49+
(3.9 <= python <= 3.14) Install current development version (**2.2.2dev5**) with:
5050

5151
`pip install -U https://github.com/robotframework/RIDE/archive/develop.zip`
5252

src/robotide/postinstall/__init__.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -171,21 +171,20 @@ def _askdirectory(title, initialdir, frame=None):
171171

172172

173173
def _create_desktop_shortcut_linux(frame=None):
174-
from os.path import expanduser
174+
from os.path import expanduser, basename
175175
from os import chmod, chown
176176
from stat import S_IRWXU
177-
import subprocess
178177
import pwd
179178
import sysconfig
180179
# DEBUG: Add more languages
181180
desktop = {"de": "Desktop", "en": "Desktop", "es": "Escritorio",
182181
"fi": r"Työpöytä", "fr": "Bureau", "it": "Scrivania",
183182
"pt": r"Área de Trabalho", "zh": "Desktop"}
184-
user = getlogin()
183+
user = basename(expanduser('~'))
185184
try:
186185
ndesktop = desktop[DEFAULT_LANGUAGE[0][:2]]
187-
directory = join("/home", user, ndesktop)
188-
defaultdir = join("/home", user, "Desktop")
186+
directory = join(expanduser('~'), ndesktop)
187+
defaultdir = join(expanduser('~'), "Desktop")
189188
if not exists(directory):
190189
if exists(defaultdir):
191190
directory = defaultdir

src/robotide/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
#
1616
# Automatically generated by `tasks.py`.
1717

18-
VERSION = 'v2.2.2dev4'
18+
VERSION = 'v2.2.2dev5'

0 commit comments

Comments
 (0)