How can I start a wine application at startup without login?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
2
down vote

favorite












I want to start a wine application when system startup.



However this app need a Xwindow environment. I could only launch it manually by hand now, so I have to login first then start the app.



I have searched something about Xsession startup setting. I think applying that method would require a login. How can I start the app without login?










share|improve this question
















bumped to the homepage by Community♦ 5 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.














  • You have an application that uses X but you're running it through WINE? May I ask what program this is?
    – HalosGhost
    Jun 26 '14 at 6:35










  • Just an windows application with GUI & winsocks. @HalosGhost
    – Readon Shaw
    Jun 26 '14 at 6:45














up vote
2
down vote

favorite












I want to start a wine application when system startup.



However this app need a Xwindow environment. I could only launch it manually by hand now, so I have to login first then start the app.



I have searched something about Xsession startup setting. I think applying that method would require a login. How can I start the app without login?










share|improve this question
















bumped to the homepage by Community♦ 5 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.














  • You have an application that uses X but you're running it through WINE? May I ask what program this is?
    – HalosGhost
    Jun 26 '14 at 6:35










  • Just an windows application with GUI & winsocks. @HalosGhost
    – Readon Shaw
    Jun 26 '14 at 6:45












up vote
2
down vote

favorite









up vote
2
down vote

favorite











I want to start a wine application when system startup.



However this app need a Xwindow environment. I could only launch it manually by hand now, so I have to login first then start the app.



I have searched something about Xsession startup setting. I think applying that method would require a login. How can I start the app without login?










share|improve this question















I want to start a wine application when system startup.



However this app need a Xwindow environment. I could only launch it manually by hand now, so I have to login first then start the app.



I have searched something about Xsession startup setting. I think applying that method would require a login. How can I start the app without login?







x11 startup






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Sep 29 '15 at 17:34









Anthon

59.3k1798161




59.3k1798161










asked Jun 26 '14 at 5:42









Readon Shaw

112




112





bumped to the homepage by Community♦ 5 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community♦ 5 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.













  • You have an application that uses X but you're running it through WINE? May I ask what program this is?
    – HalosGhost
    Jun 26 '14 at 6:35










  • Just an windows application with GUI & winsocks. @HalosGhost
    – Readon Shaw
    Jun 26 '14 at 6:45
















  • You have an application that uses X but you're running it through WINE? May I ask what program this is?
    – HalosGhost
    Jun 26 '14 at 6:35










  • Just an windows application with GUI & winsocks. @HalosGhost
    – Readon Shaw
    Jun 26 '14 at 6:45















You have an application that uses X but you're running it through WINE? May I ask what program this is?
– HalosGhost
Jun 26 '14 at 6:35




You have an application that uses X but you're running it through WINE? May I ask what program this is?
– HalosGhost
Jun 26 '14 at 6:35












Just an windows application with GUI & winsocks. @HalosGhost
– Readon Shaw
Jun 26 '14 at 6:45




Just an windows application with GUI & winsocks. @HalosGhost
– Readon Shaw
Jun 26 '14 at 6:45










2 Answers
2






active

oldest

votes

















up vote
0
down vote













You CAN'T start an X11 application without login. I think you mean you don't want to enter your username and password every time.



If this is the case, first, you should set up autologin on your display manager. Since you haven't provided any information on what DM do you use, I can't help with the exact instruction (anyway, a quick search will do).



Second, you have to add the wine command line to your WM/DE autostart file. The autostart file varies per WM/DE. Search for it.



This should do.






share|improve this answer




















  • I am using lightdm as Debian default do. I want to use autologin, autostartup and lock screen function at the same time to work around this problem. But how to lock screen after my wine app launched.
    – Readon Shaw
    Jun 27 '14 at 4:07











  • You have to take a look at X screen lockers. There are plenty of them, my favorite is i3lock. Search for them.
    – psimon
    Jun 27 '14 at 8:25

















up vote
-1
down vote













UBUNTU 14.04 X64 - XFCE WITH VNC - AUTO LOGIN, AUTO START WINE APP



adduser rapid_vn
sudo add-apt-repository ppa:ubuntu-wine/ppa
sudo apt-get update
sudo apt-get install software-properties-common
sudo apt-get install xfce4
sudo apt-get install firefox
sudo apt-get install gnome-schedule
sudo apt-get install wine
sudo apt-get upgrade
sudo apt-get clean


INSTALL TIGHT VNC SERVER



apt-get install tightvncserver


CHANGE USER



su - rapid_vn


SET PASSWORD FOR VNC SERVER WITH USER rapid_vn



vncpasswd


LOGOUT USER rapid_vn



exit


CONFIG VNC SERVER



nano /etc/init.d/vncserver

#!/bin/bash
PATH="$PATH:/usr/bin/"
export USER="rapid_vn"
DISPLAY="1"
DEPTH="16"
DPI="96"
GEOMETRY="800x600"
OPTIONS="-depth $DEPTH -geometry $GEOMETRY -alwaysshared -dpi $DPI :$DISPLAY"
. /lib/lsb/init-functions

case "$1" in
start)
log_action_begin_msg "STARTING VNCSERVER FOR USER '$USER' ON LOCALHOST:$DISPLAY"
su $USER -c "/usr/bin/vncserver $OPTIONS"
;;

stop)
log_action_begin_msg "STOPING VNCSERVER FOR USER '$USER' ON LOCALHOST:$DISPLAY"
su $USER -c "/usr/bin/vncserver -kill :$DISPLAY"
;;

restart)
$0 stop
$0 start
;;
esac
exit 0

nano /home/rapid_vn/.vnc/xstartup

#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
startxfce4 &

chown -R rapid_vn. /home/rapid_vn/.vnc && chmod +x /home/rapid_vn/.vnc/xstartup
sed -i 's/allowed_users.*/allowed_users=anybody/g' /etc/X11/Xwrapper.config

chmod +x /etc/init.d/vncserver
service vncserver start

update-rc.d vncserver defaults

reboot


MAKE AUTO START FIREFOX ON REBOOT



mkdir /home/rapid_vn/.config
mkdir /home/rapid_vn/.config/autostart

chmod u=rwx,g=rwx,o=rwx /home/rapid_vn/.config
chmod u=rwx,g=rwx,o=rwx /home/rapid_vn/.config/autostart

nano /home/rapid_vn/.config/autostart/firefox.desktop

[Desktop Entry]
Encoding=UTF-8
Version=0.9.4
Type=Application
Name=Firefox Browser
Comment=Firefox Browser
Exec=/usr/bin/firefox
OnlyShowIn=XFCE;
StartupNotify=false
Terminal=false
Hidden=false


MAKE AUTO START MT4 ON REBOOT



nano /home/rapid_vn/.config/autostart/metatrader4.desktop

[Desktop Entry]
Encoding=UTF-8
Version=0.9.4
Type=Application
Name=MetaTrader 4
Comment=MetaTrader 4
Exec=wine "C:\Program Files (x86)\MetaTrader 4\Terminal.exe"
OnlyShowIn=XFCE;
StartupNotify=false
Terminal=false
Hidden=false


MAKE SCRIPT RESTART METATRADER 4



nano /home/rapid_vn/restart_mt4.sh

#!/bin/sh
pkill Terminal.exe &
pkill terminal.exe &
env DISPLAY=:1 wine "C:\Program Files (x86)\MetaTrader 4\Terminal.exe" &


MAKE TASK SCHEDULE RUN SCRIPT



mkdir /home/rapid_vn/.gnome
mkdir /home/rapid_vn/.gnome/gnome-schedule
mkdir /home/rapid_vn/.gnome/gnome-schedule/crontab

chmod u=rwx,g=rwx,o=rwx /home/rapid_vn/.gnome
chmod u=rwx,g=rwx,o=rwx /home/rapid_vn/.gnome/gnome-schedule
chmod u=rwx,g=rwx,o=rwx /home/rapid_vn/.gnome/gnome-schedule/crontab

nano /home/rapid_vn/.gnome/gnome-schedule/crontab/1

ver=5
title=Restart MetaTrader 4
desc=
output=0
display=0
command_d=sh /home/rapid_vn/restart_mt4.sh

echo 1 > /home/rapid_vn/.gnome/gnome-schedule/crontab/last_id


EDIT TIME RUN TASK SCHEDULE



su - rapid_vn
crontab -e

58 23 * * * sh /home/rapid_vn/restart_mt4.sh # JOB_ID_1

exit

reboot





share|improve this answer






















  • WHY ALL CAPS? You can use bold if it is really necessary to draw extra attention.
    – Anthon
    Sep 29 '15 at 17:36










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f139277%2fhow-can-i-start-a-wine-application-at-startup-without-login%23new-answer', 'question_page');

);

Post as a guest






























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote













You CAN'T start an X11 application without login. I think you mean you don't want to enter your username and password every time.



If this is the case, first, you should set up autologin on your display manager. Since you haven't provided any information on what DM do you use, I can't help with the exact instruction (anyway, a quick search will do).



Second, you have to add the wine command line to your WM/DE autostart file. The autostart file varies per WM/DE. Search for it.



This should do.






share|improve this answer




















  • I am using lightdm as Debian default do. I want to use autologin, autostartup and lock screen function at the same time to work around this problem. But how to lock screen after my wine app launched.
    – Readon Shaw
    Jun 27 '14 at 4:07











  • You have to take a look at X screen lockers. There are plenty of them, my favorite is i3lock. Search for them.
    – psimon
    Jun 27 '14 at 8:25














up vote
0
down vote













You CAN'T start an X11 application without login. I think you mean you don't want to enter your username and password every time.



If this is the case, first, you should set up autologin on your display manager. Since you haven't provided any information on what DM do you use, I can't help with the exact instruction (anyway, a quick search will do).



Second, you have to add the wine command line to your WM/DE autostart file. The autostart file varies per WM/DE. Search for it.



This should do.






share|improve this answer




















  • I am using lightdm as Debian default do. I want to use autologin, autostartup and lock screen function at the same time to work around this problem. But how to lock screen after my wine app launched.
    – Readon Shaw
    Jun 27 '14 at 4:07











  • You have to take a look at X screen lockers. There are plenty of them, my favorite is i3lock. Search for them.
    – psimon
    Jun 27 '14 at 8:25












up vote
0
down vote










up vote
0
down vote









You CAN'T start an X11 application without login. I think you mean you don't want to enter your username and password every time.



If this is the case, first, you should set up autologin on your display manager. Since you haven't provided any information on what DM do you use, I can't help with the exact instruction (anyway, a quick search will do).



Second, you have to add the wine command line to your WM/DE autostart file. The autostart file varies per WM/DE. Search for it.



This should do.






share|improve this answer












You CAN'T start an X11 application without login. I think you mean you don't want to enter your username and password every time.



If this is the case, first, you should set up autologin on your display manager. Since you haven't provided any information on what DM do you use, I can't help with the exact instruction (anyway, a quick search will do).



Second, you have to add the wine command line to your WM/DE autostart file. The autostart file varies per WM/DE. Search for it.



This should do.







share|improve this answer












share|improve this answer



share|improve this answer










answered Jun 26 '14 at 10:10









psimon

957726




957726











  • I am using lightdm as Debian default do. I want to use autologin, autostartup and lock screen function at the same time to work around this problem. But how to lock screen after my wine app launched.
    – Readon Shaw
    Jun 27 '14 at 4:07











  • You have to take a look at X screen lockers. There are plenty of them, my favorite is i3lock. Search for them.
    – psimon
    Jun 27 '14 at 8:25
















  • I am using lightdm as Debian default do. I want to use autologin, autostartup and lock screen function at the same time to work around this problem. But how to lock screen after my wine app launched.
    – Readon Shaw
    Jun 27 '14 at 4:07











  • You have to take a look at X screen lockers. There are plenty of them, my favorite is i3lock. Search for them.
    – psimon
    Jun 27 '14 at 8:25















I am using lightdm as Debian default do. I want to use autologin, autostartup and lock screen function at the same time to work around this problem. But how to lock screen after my wine app launched.
– Readon Shaw
Jun 27 '14 at 4:07





I am using lightdm as Debian default do. I want to use autologin, autostartup and lock screen function at the same time to work around this problem. But how to lock screen after my wine app launched.
– Readon Shaw
Jun 27 '14 at 4:07













You have to take a look at X screen lockers. There are plenty of them, my favorite is i3lock. Search for them.
– psimon
Jun 27 '14 at 8:25




You have to take a look at X screen lockers. There are plenty of them, my favorite is i3lock. Search for them.
– psimon
Jun 27 '14 at 8:25












up vote
-1
down vote













UBUNTU 14.04 X64 - XFCE WITH VNC - AUTO LOGIN, AUTO START WINE APP



adduser rapid_vn
sudo add-apt-repository ppa:ubuntu-wine/ppa
sudo apt-get update
sudo apt-get install software-properties-common
sudo apt-get install xfce4
sudo apt-get install firefox
sudo apt-get install gnome-schedule
sudo apt-get install wine
sudo apt-get upgrade
sudo apt-get clean


INSTALL TIGHT VNC SERVER



apt-get install tightvncserver


CHANGE USER



su - rapid_vn


SET PASSWORD FOR VNC SERVER WITH USER rapid_vn



vncpasswd


LOGOUT USER rapid_vn



exit


CONFIG VNC SERVER



nano /etc/init.d/vncserver

#!/bin/bash
PATH="$PATH:/usr/bin/"
export USER="rapid_vn"
DISPLAY="1"
DEPTH="16"
DPI="96"
GEOMETRY="800x600"
OPTIONS="-depth $DEPTH -geometry $GEOMETRY -alwaysshared -dpi $DPI :$DISPLAY"
. /lib/lsb/init-functions

case "$1" in
start)
log_action_begin_msg "STARTING VNCSERVER FOR USER '$USER' ON LOCALHOST:$DISPLAY"
su $USER -c "/usr/bin/vncserver $OPTIONS"
;;

stop)
log_action_begin_msg "STOPING VNCSERVER FOR USER '$USER' ON LOCALHOST:$DISPLAY"
su $USER -c "/usr/bin/vncserver -kill :$DISPLAY"
;;

restart)
$0 stop
$0 start
;;
esac
exit 0

nano /home/rapid_vn/.vnc/xstartup

#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
startxfce4 &

chown -R rapid_vn. /home/rapid_vn/.vnc && chmod +x /home/rapid_vn/.vnc/xstartup
sed -i 's/allowed_users.*/allowed_users=anybody/g' /etc/X11/Xwrapper.config

chmod +x /etc/init.d/vncserver
service vncserver start

update-rc.d vncserver defaults

reboot


MAKE AUTO START FIREFOX ON REBOOT



mkdir /home/rapid_vn/.config
mkdir /home/rapid_vn/.config/autostart

chmod u=rwx,g=rwx,o=rwx /home/rapid_vn/.config
chmod u=rwx,g=rwx,o=rwx /home/rapid_vn/.config/autostart

nano /home/rapid_vn/.config/autostart/firefox.desktop

[Desktop Entry]
Encoding=UTF-8
Version=0.9.4
Type=Application
Name=Firefox Browser
Comment=Firefox Browser
Exec=/usr/bin/firefox
OnlyShowIn=XFCE;
StartupNotify=false
Terminal=false
Hidden=false


MAKE AUTO START MT4 ON REBOOT



nano /home/rapid_vn/.config/autostart/metatrader4.desktop

[Desktop Entry]
Encoding=UTF-8
Version=0.9.4
Type=Application
Name=MetaTrader 4
Comment=MetaTrader 4
Exec=wine "C:\Program Files (x86)\MetaTrader 4\Terminal.exe"
OnlyShowIn=XFCE;
StartupNotify=false
Terminal=false
Hidden=false


MAKE SCRIPT RESTART METATRADER 4



nano /home/rapid_vn/restart_mt4.sh

#!/bin/sh
pkill Terminal.exe &
pkill terminal.exe &
env DISPLAY=:1 wine "C:\Program Files (x86)\MetaTrader 4\Terminal.exe" &


MAKE TASK SCHEDULE RUN SCRIPT



mkdir /home/rapid_vn/.gnome
mkdir /home/rapid_vn/.gnome/gnome-schedule
mkdir /home/rapid_vn/.gnome/gnome-schedule/crontab

chmod u=rwx,g=rwx,o=rwx /home/rapid_vn/.gnome
chmod u=rwx,g=rwx,o=rwx /home/rapid_vn/.gnome/gnome-schedule
chmod u=rwx,g=rwx,o=rwx /home/rapid_vn/.gnome/gnome-schedule/crontab

nano /home/rapid_vn/.gnome/gnome-schedule/crontab/1

ver=5
title=Restart MetaTrader 4
desc=
output=0
display=0
command_d=sh /home/rapid_vn/restart_mt4.sh

echo 1 > /home/rapid_vn/.gnome/gnome-schedule/crontab/last_id


EDIT TIME RUN TASK SCHEDULE



su - rapid_vn
crontab -e

58 23 * * * sh /home/rapid_vn/restart_mt4.sh # JOB_ID_1

exit

reboot





share|improve this answer






















  • WHY ALL CAPS? You can use bold if it is really necessary to draw extra attention.
    – Anthon
    Sep 29 '15 at 17:36














up vote
-1
down vote













UBUNTU 14.04 X64 - XFCE WITH VNC - AUTO LOGIN, AUTO START WINE APP



adduser rapid_vn
sudo add-apt-repository ppa:ubuntu-wine/ppa
sudo apt-get update
sudo apt-get install software-properties-common
sudo apt-get install xfce4
sudo apt-get install firefox
sudo apt-get install gnome-schedule
sudo apt-get install wine
sudo apt-get upgrade
sudo apt-get clean


INSTALL TIGHT VNC SERVER



apt-get install tightvncserver


CHANGE USER



su - rapid_vn


SET PASSWORD FOR VNC SERVER WITH USER rapid_vn



vncpasswd


LOGOUT USER rapid_vn



exit


CONFIG VNC SERVER



nano /etc/init.d/vncserver

#!/bin/bash
PATH="$PATH:/usr/bin/"
export USER="rapid_vn"
DISPLAY="1"
DEPTH="16"
DPI="96"
GEOMETRY="800x600"
OPTIONS="-depth $DEPTH -geometry $GEOMETRY -alwaysshared -dpi $DPI :$DISPLAY"
. /lib/lsb/init-functions

case "$1" in
start)
log_action_begin_msg "STARTING VNCSERVER FOR USER '$USER' ON LOCALHOST:$DISPLAY"
su $USER -c "/usr/bin/vncserver $OPTIONS"
;;

stop)
log_action_begin_msg "STOPING VNCSERVER FOR USER '$USER' ON LOCALHOST:$DISPLAY"
su $USER -c "/usr/bin/vncserver -kill :$DISPLAY"
;;

restart)
$0 stop
$0 start
;;
esac
exit 0

nano /home/rapid_vn/.vnc/xstartup

#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
startxfce4 &

chown -R rapid_vn. /home/rapid_vn/.vnc && chmod +x /home/rapid_vn/.vnc/xstartup
sed -i 's/allowed_users.*/allowed_users=anybody/g' /etc/X11/Xwrapper.config

chmod +x /etc/init.d/vncserver
service vncserver start

update-rc.d vncserver defaults

reboot


MAKE AUTO START FIREFOX ON REBOOT



mkdir /home/rapid_vn/.config
mkdir /home/rapid_vn/.config/autostart

chmod u=rwx,g=rwx,o=rwx /home/rapid_vn/.config
chmod u=rwx,g=rwx,o=rwx /home/rapid_vn/.config/autostart

nano /home/rapid_vn/.config/autostart/firefox.desktop

[Desktop Entry]
Encoding=UTF-8
Version=0.9.4
Type=Application
Name=Firefox Browser
Comment=Firefox Browser
Exec=/usr/bin/firefox
OnlyShowIn=XFCE;
StartupNotify=false
Terminal=false
Hidden=false


MAKE AUTO START MT4 ON REBOOT



nano /home/rapid_vn/.config/autostart/metatrader4.desktop

[Desktop Entry]
Encoding=UTF-8
Version=0.9.4
Type=Application
Name=MetaTrader 4
Comment=MetaTrader 4
Exec=wine "C:\Program Files (x86)\MetaTrader 4\Terminal.exe"
OnlyShowIn=XFCE;
StartupNotify=false
Terminal=false
Hidden=false


MAKE SCRIPT RESTART METATRADER 4



nano /home/rapid_vn/restart_mt4.sh

#!/bin/sh
pkill Terminal.exe &
pkill terminal.exe &
env DISPLAY=:1 wine "C:\Program Files (x86)\MetaTrader 4\Terminal.exe" &


MAKE TASK SCHEDULE RUN SCRIPT



mkdir /home/rapid_vn/.gnome
mkdir /home/rapid_vn/.gnome/gnome-schedule
mkdir /home/rapid_vn/.gnome/gnome-schedule/crontab

chmod u=rwx,g=rwx,o=rwx /home/rapid_vn/.gnome
chmod u=rwx,g=rwx,o=rwx /home/rapid_vn/.gnome/gnome-schedule
chmod u=rwx,g=rwx,o=rwx /home/rapid_vn/.gnome/gnome-schedule/crontab

nano /home/rapid_vn/.gnome/gnome-schedule/crontab/1

ver=5
title=Restart MetaTrader 4
desc=
output=0
display=0
command_d=sh /home/rapid_vn/restart_mt4.sh

echo 1 > /home/rapid_vn/.gnome/gnome-schedule/crontab/last_id


EDIT TIME RUN TASK SCHEDULE



su - rapid_vn
crontab -e

58 23 * * * sh /home/rapid_vn/restart_mt4.sh # JOB_ID_1

exit

reboot





share|improve this answer






















  • WHY ALL CAPS? You can use bold if it is really necessary to draw extra attention.
    – Anthon
    Sep 29 '15 at 17:36












up vote
-1
down vote










up vote
-1
down vote









UBUNTU 14.04 X64 - XFCE WITH VNC - AUTO LOGIN, AUTO START WINE APP



adduser rapid_vn
sudo add-apt-repository ppa:ubuntu-wine/ppa
sudo apt-get update
sudo apt-get install software-properties-common
sudo apt-get install xfce4
sudo apt-get install firefox
sudo apt-get install gnome-schedule
sudo apt-get install wine
sudo apt-get upgrade
sudo apt-get clean


INSTALL TIGHT VNC SERVER



apt-get install tightvncserver


CHANGE USER



su - rapid_vn


SET PASSWORD FOR VNC SERVER WITH USER rapid_vn



vncpasswd


LOGOUT USER rapid_vn



exit


CONFIG VNC SERVER



nano /etc/init.d/vncserver

#!/bin/bash
PATH="$PATH:/usr/bin/"
export USER="rapid_vn"
DISPLAY="1"
DEPTH="16"
DPI="96"
GEOMETRY="800x600"
OPTIONS="-depth $DEPTH -geometry $GEOMETRY -alwaysshared -dpi $DPI :$DISPLAY"
. /lib/lsb/init-functions

case "$1" in
start)
log_action_begin_msg "STARTING VNCSERVER FOR USER '$USER' ON LOCALHOST:$DISPLAY"
su $USER -c "/usr/bin/vncserver $OPTIONS"
;;

stop)
log_action_begin_msg "STOPING VNCSERVER FOR USER '$USER' ON LOCALHOST:$DISPLAY"
su $USER -c "/usr/bin/vncserver -kill :$DISPLAY"
;;

restart)
$0 stop
$0 start
;;
esac
exit 0

nano /home/rapid_vn/.vnc/xstartup

#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
startxfce4 &

chown -R rapid_vn. /home/rapid_vn/.vnc && chmod +x /home/rapid_vn/.vnc/xstartup
sed -i 's/allowed_users.*/allowed_users=anybody/g' /etc/X11/Xwrapper.config

chmod +x /etc/init.d/vncserver
service vncserver start

update-rc.d vncserver defaults

reboot


MAKE AUTO START FIREFOX ON REBOOT



mkdir /home/rapid_vn/.config
mkdir /home/rapid_vn/.config/autostart

chmod u=rwx,g=rwx,o=rwx /home/rapid_vn/.config
chmod u=rwx,g=rwx,o=rwx /home/rapid_vn/.config/autostart

nano /home/rapid_vn/.config/autostart/firefox.desktop

[Desktop Entry]
Encoding=UTF-8
Version=0.9.4
Type=Application
Name=Firefox Browser
Comment=Firefox Browser
Exec=/usr/bin/firefox
OnlyShowIn=XFCE;
StartupNotify=false
Terminal=false
Hidden=false


MAKE AUTO START MT4 ON REBOOT



nano /home/rapid_vn/.config/autostart/metatrader4.desktop

[Desktop Entry]
Encoding=UTF-8
Version=0.9.4
Type=Application
Name=MetaTrader 4
Comment=MetaTrader 4
Exec=wine "C:\Program Files (x86)\MetaTrader 4\Terminal.exe"
OnlyShowIn=XFCE;
StartupNotify=false
Terminal=false
Hidden=false


MAKE SCRIPT RESTART METATRADER 4



nano /home/rapid_vn/restart_mt4.sh

#!/bin/sh
pkill Terminal.exe &
pkill terminal.exe &
env DISPLAY=:1 wine "C:\Program Files (x86)\MetaTrader 4\Terminal.exe" &


MAKE TASK SCHEDULE RUN SCRIPT



mkdir /home/rapid_vn/.gnome
mkdir /home/rapid_vn/.gnome/gnome-schedule
mkdir /home/rapid_vn/.gnome/gnome-schedule/crontab

chmod u=rwx,g=rwx,o=rwx /home/rapid_vn/.gnome
chmod u=rwx,g=rwx,o=rwx /home/rapid_vn/.gnome/gnome-schedule
chmod u=rwx,g=rwx,o=rwx /home/rapid_vn/.gnome/gnome-schedule/crontab

nano /home/rapid_vn/.gnome/gnome-schedule/crontab/1

ver=5
title=Restart MetaTrader 4
desc=
output=0
display=0
command_d=sh /home/rapid_vn/restart_mt4.sh

echo 1 > /home/rapid_vn/.gnome/gnome-schedule/crontab/last_id


EDIT TIME RUN TASK SCHEDULE



su - rapid_vn
crontab -e

58 23 * * * sh /home/rapid_vn/restart_mt4.sh # JOB_ID_1

exit

reboot





share|improve this answer














UBUNTU 14.04 X64 - XFCE WITH VNC - AUTO LOGIN, AUTO START WINE APP



adduser rapid_vn
sudo add-apt-repository ppa:ubuntu-wine/ppa
sudo apt-get update
sudo apt-get install software-properties-common
sudo apt-get install xfce4
sudo apt-get install firefox
sudo apt-get install gnome-schedule
sudo apt-get install wine
sudo apt-get upgrade
sudo apt-get clean


INSTALL TIGHT VNC SERVER



apt-get install tightvncserver


CHANGE USER



su - rapid_vn


SET PASSWORD FOR VNC SERVER WITH USER rapid_vn



vncpasswd


LOGOUT USER rapid_vn



exit


CONFIG VNC SERVER



nano /etc/init.d/vncserver

#!/bin/bash
PATH="$PATH:/usr/bin/"
export USER="rapid_vn"
DISPLAY="1"
DEPTH="16"
DPI="96"
GEOMETRY="800x600"
OPTIONS="-depth $DEPTH -geometry $GEOMETRY -alwaysshared -dpi $DPI :$DISPLAY"
. /lib/lsb/init-functions

case "$1" in
start)
log_action_begin_msg "STARTING VNCSERVER FOR USER '$USER' ON LOCALHOST:$DISPLAY"
su $USER -c "/usr/bin/vncserver $OPTIONS"
;;

stop)
log_action_begin_msg "STOPING VNCSERVER FOR USER '$USER' ON LOCALHOST:$DISPLAY"
su $USER -c "/usr/bin/vncserver -kill :$DISPLAY"
;;

restart)
$0 stop
$0 start
;;
esac
exit 0

nano /home/rapid_vn/.vnc/xstartup

#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
startxfce4 &

chown -R rapid_vn. /home/rapid_vn/.vnc && chmod +x /home/rapid_vn/.vnc/xstartup
sed -i 's/allowed_users.*/allowed_users=anybody/g' /etc/X11/Xwrapper.config

chmod +x /etc/init.d/vncserver
service vncserver start

update-rc.d vncserver defaults

reboot


MAKE AUTO START FIREFOX ON REBOOT



mkdir /home/rapid_vn/.config
mkdir /home/rapid_vn/.config/autostart

chmod u=rwx,g=rwx,o=rwx /home/rapid_vn/.config
chmod u=rwx,g=rwx,o=rwx /home/rapid_vn/.config/autostart

nano /home/rapid_vn/.config/autostart/firefox.desktop

[Desktop Entry]
Encoding=UTF-8
Version=0.9.4
Type=Application
Name=Firefox Browser
Comment=Firefox Browser
Exec=/usr/bin/firefox
OnlyShowIn=XFCE;
StartupNotify=false
Terminal=false
Hidden=false


MAKE AUTO START MT4 ON REBOOT



nano /home/rapid_vn/.config/autostart/metatrader4.desktop

[Desktop Entry]
Encoding=UTF-8
Version=0.9.4
Type=Application
Name=MetaTrader 4
Comment=MetaTrader 4
Exec=wine "C:\Program Files (x86)\MetaTrader 4\Terminal.exe"
OnlyShowIn=XFCE;
StartupNotify=false
Terminal=false
Hidden=false


MAKE SCRIPT RESTART METATRADER 4



nano /home/rapid_vn/restart_mt4.sh

#!/bin/sh
pkill Terminal.exe &
pkill terminal.exe &
env DISPLAY=:1 wine "C:\Program Files (x86)\MetaTrader 4\Terminal.exe" &


MAKE TASK SCHEDULE RUN SCRIPT



mkdir /home/rapid_vn/.gnome
mkdir /home/rapid_vn/.gnome/gnome-schedule
mkdir /home/rapid_vn/.gnome/gnome-schedule/crontab

chmod u=rwx,g=rwx,o=rwx /home/rapid_vn/.gnome
chmod u=rwx,g=rwx,o=rwx /home/rapid_vn/.gnome/gnome-schedule
chmod u=rwx,g=rwx,o=rwx /home/rapid_vn/.gnome/gnome-schedule/crontab

nano /home/rapid_vn/.gnome/gnome-schedule/crontab/1

ver=5
title=Restart MetaTrader 4
desc=
output=0
display=0
command_d=sh /home/rapid_vn/restart_mt4.sh

echo 1 > /home/rapid_vn/.gnome/gnome-schedule/crontab/last_id


EDIT TIME RUN TASK SCHEDULE



su - rapid_vn
crontab -e

58 23 * * * sh /home/rapid_vn/restart_mt4.sh # JOB_ID_1

exit

reboot






share|improve this answer














share|improve this answer



share|improve this answer








edited Sep 29 '15 at 17:44









KingKong89

32




32










answered Sep 29 '15 at 17:08









KingKong89

1




1











  • WHY ALL CAPS? You can use bold if it is really necessary to draw extra attention.
    – Anthon
    Sep 29 '15 at 17:36
















  • WHY ALL CAPS? You can use bold if it is really necessary to draw extra attention.
    – Anthon
    Sep 29 '15 at 17:36















WHY ALL CAPS? You can use bold if it is really necessary to draw extra attention.
– Anthon
Sep 29 '15 at 17:36




WHY ALL CAPS? You can use bold if it is really necessary to draw extra attention.
– Anthon
Sep 29 '15 at 17:36

















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f139277%2fhow-can-i-start-a-wine-application-at-startup-without-login%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay