INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: MC24 wont run on startup in Debian stretch  (Read 3266 times)

mogman

  • Recent member
  • *
  • Posts: 9
MC24 wont run on startup in Debian stretch
« on: May 21, 2018, 08:07:34 am »

I have MediaCenter 24 installed on Debian 9 Stretch. In Options I have selected in Linux Startup to have Media Center run. Media Center does not run on Startup. Anyone else have this issue?
Logged

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7804
  • Autumn shade...
Re: MC24 wont run on startup in Debian stretch
« Reply #1 on: May 21, 2018, 08:30:00 am »

The startup options in MC don't work under Linux, only Windows and Mac. In my opinion, these options should be hidden on Linux since they don't do anything. It may be difficult to supporting startup options within MC on Linux due to the differences in desktop environments, X or Wayland being used, systemd being used (or not being used), might/likely would require root/sudo to add/enable things like systemd scripts, etc.

If you're using GNOME, the easiest way to start MC on Linux startup is to install the Tweak Tool (gnome-tweak-tool), open it and go to Startup Applications and manually add MC there.
Logged
I don't work for JRiver... I help keep the forums safe from "male enhancements" and other sources of sketchy pharmaceuticals.

Windows 11 24H2 Update 64-bit + Ubuntu 24.10 Oracular Oriole 64-bit | Windows 11 24H2 Update 64-bit (Intel N305 Fanless NUC 16GB RAM/500GB M.2 NVMe SSD)
JRiver Media Center 33 (Windows + Linux) | iFi ZEN DAC 3 | JBL 306P MkII Studio Monitors | Audio-Technica ATH-M50x Headphones

geier22

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 427
Re: MC24 wont run on startup in Debian stretch
« Reply #2 on: May 21, 2018, 08:52:39 am »

You can create a desktop file and copy it to the folder.
~ / .config / autostart /
That should work in all surfaces.
The delay can be a bit shorter. In any case, the desktop should be fully charged first.
For Xfce ~/.config/autostart/Mediacenter 24.desktop:
Code: [Select]
[Desktop Entry]
Encoding=UTF-8
Version=0.9.4
Type=Application
Name=Mediacenter 24
Comment=
Exec=sh -c "sleep 20; /usr/bin/mediacenter24"
StartupNotify=false
Terminal=false
Hidden=false
Logged
Debian Testing x64 (multiarch) Xfce
TEAC UD-H01 - Yamaha A-S1000 /
Midrange- Studiomonitore by FÖÖN
AsRock Z390 Extreme4- Intel Core i9 9900/ 32 GB Ram

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13870
Re: MC24 wont run on startup in Debian stretch
« Reply #3 on: May 21, 2018, 08:58:47 am »

The startup options in MC don't work under Linux, only Windows and Mac. In my opinion, these options should be hidden on Linux since they don't do anything. It may be difficult to supporting startup options within MC on Linux due to the differences in desktop environments, X or Wayland being used, systemd being used (or not being used), might/likely would require root/sudo to add/enable things like systemd scripts, etc.

If you're using GNOME, the easiest way to start MC on Linux startup is to install the Tweak Tool (gnome-tweak-tool), open it and go to Startup Applications and manually add MC there.
Agreed. I'll remove them.
Logged

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7804
  • Autumn shade...
Re: MC24 wont run on startup in Debian stretch
« Reply #4 on: May 21, 2018, 09:06:02 am »

You could also create a systemd service, something like mwillems posted here: https://yabb.jriver.com/interact/index.php/topic,115514.0.html
Logged
I don't work for JRiver... I help keep the forums safe from "male enhancements" and other sources of sketchy pharmaceuticals.

Windows 11 24H2 Update 64-bit + Ubuntu 24.10 Oracular Oriole 64-bit | Windows 11 24H2 Update 64-bit (Intel N305 Fanless NUC 16GB RAM/500GB M.2 NVMe SSD)
JRiver Media Center 33 (Windows + Linux) | iFi ZEN DAC 3 | JBL 306P MkII Studio Monitors | Audio-Technica ATH-M50x Headphones

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7804
  • Autumn shade...
Re: MC24 wont run on startup in Debian stretch
« Reply #5 on: May 21, 2018, 09:10:27 am »

Agreed. I'll remove them.

Actually, if indeed adding a Media Center 24.desktop file to ~/.config/autostart/ works for all desktop environments, X and Wayland (with XWayland), you might be able to add support for startup options on Linux. Just would need a normal entry (like geier22 posted above) and one for /MediaServer. Of course, if a Media Center 24.desktop already existed in that folder, it'd have to be overridden (or removed) when changing that option. Adding a startup delay (for the sleep variable) might be useful too on Linux.

This would need to be tested, obviously, but in theory it *should* work and it shouldn't require root/sudo to add a .desktop file to that directory - not sure if you'd have to set specific permissions for the file though so it could be edited/removed within MC if desired.

I'll test this right now and see if it works.
Logged
I don't work for JRiver... I help keep the forums safe from "male enhancements" and other sources of sketchy pharmaceuticals.

Windows 11 24H2 Update 64-bit + Ubuntu 24.10 Oracular Oriole 64-bit | Windows 11 24H2 Update 64-bit (Intel N305 Fanless NUC 16GB RAM/500GB M.2 NVMe SSD)
JRiver Media Center 33 (Windows + Linux) | iFi ZEN DAC 3 | JBL 306P MkII Studio Monitors | Audio-Technica ATH-M50x Headphones

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13870
Re: MC24 wont run on startup in Debian stretch
« Reply #6 on: May 21, 2018, 09:22:50 am »

Actually, if indeed adding a Media Center 24.desktop file to ~/.config/autostart/ works for all desktop environments, X and Wayland (with XWayland), you might be able to add support for startup options on Linux. Just would need a normal entry (like geier22 posted above) and one for /MediaServer. Of course, if a Media Center 24.desktop already existed in that folder, it'd have to be overridden (or removed) when changing that option. Adding a startup delay (for the sleep variable) might be useful too on Linux.

This would need to be tested, obviously, but in theory it *should* work and it shouldn't require root/sudo to add a .desktop file to that directory - not sure if you'd have to set specific permissions for the file though so it could be edited/removed within MC if desired.

I'll test this right now and see if it works.
Ok, interesting...
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13870
Re: MC24 wont run on startup in Debian stretch
« Reply #7 on: May 21, 2018, 09:26:18 am »

You can create a desktop file and copy it to the folder.
~ / .config / autostart /
That should work in all surfaces.
The delay can be a bit shorter. In any case, the desktop should be fully charged first.
For Xfce ~/.config/autostart/Mediacenter 24.desktop:
Code: [Select]
[Desktop Entry]
Encoding=UTF-8
Version=0.9.4
Type=Application
Name=Mediacenter 24
Comment=
Exec=sh -c "sleep 20; /usr/bin/mediacenter24"
StartupNotify=false
Terminal=false
Hidden=false
Instead of a delay, we could add a test here for X startup (like look for /tmp/.X0-lock existence).
Would also need a test for desktop startup which I assume will be more complex since there is more than one possibility.
Logged

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7804
  • Autumn shade...
Re: MC24 wont run on startup in Debian stretch
« Reply #8 on: May 21, 2018, 09:35:56 am »

I named it Media Center 24.desktop and used this to autostart normal MC on boot...

Code: [Select]
[Desktop Entry]
Type=Application
Name=Media Center 24
Comment=JRiver Media Center 24
Exec=/usr/bin/mediacenter24 %F
Terminal=false
StartupWMClass=Media_Center_24
StartupNotify=true
Hidden=false

It works. I tested this too for Media Server...

Code: [Select]
[Desktop Entry]
Type=Application
Name=Media Center 24
Comment=JRiver Media Center 24
Exec=/usr/bin/mediacenter24 %F /MediaServer
Terminal=false
StartupWMClass=Media_Center_24
StartupNotify=true
Hidden=false

Seems to work too, but it starts MC and minimizes it immediately. Though, honestly, this would be less than ideal since Media Server starts MC in the system tray on Windows and the menu bar on Mac. Of course, it's probably not easy to do on Linux due to differences in desktop environments.

I also tested using sleep like geier22 posted above...

Code: [Select]
[Desktop Entry]
Type=Application
Name=Media Center 24
Comment=JRiver Media Center 24
Exec=sh -c "sleep 10; /usr/bin/mediacenter24"
Terminal=false
StartupWMClass=Media_Center_24
StartupNotify=true
Hidden=false

This works, so startup delay could be used... now, let's test this with Media Server...

Code: [Select]
[Desktop Entry]
Type=Application
Name=Media Center 24
Comment=JRiver Media Center 24
Exec=sh -c "sleep 10; /usr/bin/mediacenter24 /MediaServer"
Terminal=false
StartupWMClass=Media_Center_24
StartupNotify=true
Hidden=false

Seems to work too. Now, we can consolidate this to two entries instead of four; Media Center and Media Server. Here's what I'd recommend to use for Media Center (sleep is optional. sleep 0 = no delay)...

Code: [Select]
[Desktop Entry]
Type=Application
Name=Media Center 24
Comment=JRiver Media Center 24
Exec=sh -c "sleep 0; /usr/bin/mediacenter24"
Terminal=false
StartupWMClass=Media_Center_24
StartupNotify=true
Hidden=false

And here's what I'd recommend to use for Media Server (again sleep is optional. sleep 0 = no delay)...

Code: [Select]
[Desktop Entry]
Type=Application
Name=Media Center 24
Comment=JRiver Media Center 24
Exec=sh -c "sleep 0; /usr/bin/mediacenter24 /MediaServer"
Terminal=false
StartupWMClass=Media_Center_24
StartupNotify=true
Hidden=false

Tada! I'll test these under Ubuntu, Linux Mint, Arch Linux, etc. It *should* work fine with all of them though.
Logged
I don't work for JRiver... I help keep the forums safe from "male enhancements" and other sources of sketchy pharmaceuticals.

Windows 11 24H2 Update 64-bit + Ubuntu 24.10 Oracular Oriole 64-bit | Windows 11 24H2 Update 64-bit (Intel N305 Fanless NUC 16GB RAM/500GB M.2 NVMe SSD)
JRiver Media Center 33 (Windows + Linux) | iFi ZEN DAC 3 | JBL 306P MkII Studio Monitors | Audio-Technica ATH-M50x Headphones

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7804
  • Autumn shade...
Re: MC24 wont run on startup in Debian stretch
« Reply #9 on: May 21, 2018, 09:38:04 am »

Instead of a delay, we could add a test here for X startup (like look for /tmp/.X0-lock existence).
Would also need a test for desktop startup which I assume will be more complex since there is more than one possibility.

Whichever's easier. :P

BTW, it works in Ubuntu, Linux Mint, Arch Linux, etc. Each with different desktop environments so it *should* work for everything. Also it doesn't require any special read/write permissions so it should work fine without needing sudo or chmod (or +x). Don't got any Raspberry Pis around so I can't test it on ARM/Raspbian but it should work there too.

IMO, using a slight delay as a default (e.g. sleep 5) would probably be a good idea otherwise MC pops up immediately when the DE is loading.
Logged
I don't work for JRiver... I help keep the forums safe from "male enhancements" and other sources of sketchy pharmaceuticals.

Windows 11 24H2 Update 64-bit + Ubuntu 24.10 Oracular Oriole 64-bit | Windows 11 24H2 Update 64-bit (Intel N305 Fanless NUC 16GB RAM/500GB M.2 NVMe SSD)
JRiver Media Center 33 (Windows + Linux) | iFi ZEN DAC 3 | JBL 306P MkII Studio Monitors | Audio-Technica ATH-M50x Headphones

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13870
Re: MC24 wont run on startup in Debian stretch
« Reply #10 on: May 21, 2018, 10:40:53 am »

Whichever's easier. :P

BTW, it works in Ubuntu, Linux Mint, Arch Linux, etc. Each with different desktop environments so it *should* work for everything. Also it doesn't require any special read/write permissions so it should work fine without needing sudo or chmod (or +x). Don't got any Raspberry Pis around so I can't test it on ARM/Raspbian but it should work there too.

IMO, using a slight delay as a default (e.g. sleep 5) would probably be a good idea otherwise MC pops up immediately when the DE is loading.
I assume this works after one logs in or if the computer is set to autologin on power-up ?
Logged

geier22

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 427
Re: MC24 wont run on startup in Debian stretch
« Reply #11 on: May 21, 2018, 11:17:03 am »

I assume this works after one logs in or if the computer is set to autologin on power-up ?

I only use autologin. It works in KDE / LXQT and Xfce. I think there is no difference to a manual login.
Logged
Debian Testing x64 (multiarch) Xfce
TEAC UD-H01 - Yamaha A-S1000 /
Midrange- Studiomonitore by FÖÖN
AsRock Z390 Extreme4- Intel Core i9 9900/ 32 GB Ram

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7804
  • Autumn shade...
Re: MC24 wont run on startup in Debian stretch
« Reply #12 on: May 21, 2018, 11:28:03 am »

No difference between normal login and auto login, works just the same. I tested GNOME, Cinnamon and KDE Plasma.
Logged
I don't work for JRiver... I help keep the forums safe from "male enhancements" and other sources of sketchy pharmaceuticals.

Windows 11 24H2 Update 64-bit + Ubuntu 24.10 Oracular Oriole 64-bit | Windows 11 24H2 Update 64-bit (Intel N305 Fanless NUC 16GB RAM/500GB M.2 NVMe SSD)
JRiver Media Center 33 (Windows + Linux) | iFi ZEN DAC 3 | JBL 306P MkII Studio Monitors | Audio-Technica ATH-M50x Headphones

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13870
Re: MC24 wont run on startup in Debian stretch
« Reply #13 on: May 21, 2018, 11:32:03 am »

I assume it won't startup unless you autologin?
Logged

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7804
  • Autumn shade...
Re: MC24 wont run on startup in Debian stretch
« Reply #14 on: May 21, 2018, 01:03:04 pm »

Okay, I've tested this some more...

I assume it won't startup unless you autologin?

It works logging in normally (meaning there's a login screen of the display manager, then inputting password then the DE starting and then MC will start) and it works when autologging in. So no, autologin isn't required for this to work. But I'd definitely recommend putting at least a 5 second delay/sleep or else the MC window will appear immediately when the DE starts.

Here's what I'm testing right now for starting Media Center itself at start...

Code: [Select]
[Desktop Entry]
Type=Application
Name=Media Center 24
Comment=JRiver Media Center 24
Exec=sh -c "sleep 5; /usr/bin/mediacenter24"
Terminal=false
StartupWMClass=Media_Center_24
StartupNotify=true
Hidden=false

And for starting Media Server itself at start...

Code: [Select]
[Desktop Entry]
Type=Application
Name=Media Center 24
Comment=JRiver Media Center 24
Exec=sh -c "sleep 5; /usr/bin/mediacenter24 /MediaServer"
Terminal=false
StartupWMClass=Media_Center_24
StartupNotify=true
Hidden=false

So far it's working fine in all tests, even under Wayland (with XWayland).
Logged
I don't work for JRiver... I help keep the forums safe from "male enhancements" and other sources of sketchy pharmaceuticals.

Windows 11 24H2 Update 64-bit + Ubuntu 24.10 Oracular Oriole 64-bit | Windows 11 24H2 Update 64-bit (Intel N305 Fanless NUC 16GB RAM/500GB M.2 NVMe SSD)
JRiver Media Center 33 (Windows + Linux) | iFi ZEN DAC 3 | JBL 306P MkII Studio Monitors | Audio-Technica ATH-M50x Headphones

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13870
Re: MC24 wont run on startup in Debian stretch
« Reply #15 on: May 21, 2018, 01:07:22 pm »

Okay, I've tested this some more...

It works logging in normally (meaning there's a login screen of the display manager, then inputting password then the DE starting and then MC will start) and it works when autologging in. So no, autologin isn't required for this to work. But I'd definitely recommend putting at least a 5 second delay/sleep or else the MC window will appear immediately when the DE starts.

Here's what I'm testing right now for Media Center itself...

Code: [Select]
[Desktop Entry]
Type=Application
Name=Media Center 24
Comment=JRiver Media Center 24
Exec=sh -c "sleep 5; /usr/bin/mediacenter24"
Terminal=false
StartupWMClass=Media_Center_24
StartupNotify=true
Hidden=false

And Media Server...

Code: [Select]
[Desktop Entry]
Type=Application
Name=Media Center 24
Comment=JRiver Media Center 24
Exec=sh -c "sleep 5; /usr/bin/mediacenter24 /MediaServer"
Terminal=false
StartupWMClass=Media_Center_24
StartupNotify=true
Hidden=false

So far it's working fine in all tests, even under Wayland (with XWayland).
I just implemented this, it will be in the next build.
Thanks for all the help Geier22 and A.D.
Logged

mogman

  • Recent member
  • *
  • Posts: 9
Re: MC24 wont run on startup in Debian stretch
« Reply #16 on: May 21, 2018, 01:21:39 pm »

Thanks all for the help. I used the gnome-tweak-tool and that took care of the problem
Logged

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7804
  • Autumn shade...
Re: MC24 wont run on startup in Debian stretch
« Reply #17 on: May 21, 2018, 02:21:48 pm »

Thanks all for the help. I used the gnome-tweak-tool and that took care of the problem

With the next build, the startup option(s) should work.
Logged
I don't work for JRiver... I help keep the forums safe from "male enhancements" and other sources of sketchy pharmaceuticals.

Windows 11 24H2 Update 64-bit + Ubuntu 24.10 Oracular Oriole 64-bit | Windows 11 24H2 Update 64-bit (Intel N305 Fanless NUC 16GB RAM/500GB M.2 NVMe SSD)
JRiver Media Center 33 (Windows + Linux) | iFi ZEN DAC 3 | JBL 306P MkII Studio Monitors | Audio-Technica ATH-M50x Headphones
Pages: [1]   Go Up